Xentara v1.2.1
User Manual
No Matches
Element Groups

An element group is simply a group of other elements. It adds no additional functionality to the model. Groups simply introduce intermediate nodes into the model tree.

A Flat Model

The following model for a home automation system, for example, is flat, and hence difficult to understand and work with:

Flat Model

The elements in this model would have the following primary keys with no structure or hierarchy:

  • Bathroom Light
  • Bedroom Light
  • Fire Alarm Bedroom
  • Fire Alarm Kitchen
  • Front Door
  • Garage Door
  • Hallway Light
  • Porch Light
  • Refrigerator Door
  • Stove

Creating a Simple Tree

To introduce some structure into the model, the devices could be grouped by type:

Grouped by Type

The elements in this model would have the following primary keys:

  • Lights
    • Lights.Bathroom
    • Lights.Bedroom
    • Lights.Hallway
    • Lights.Porch
  • Entries
    • Entries.Front Door
    • Entries.Garage Door
  • Appliances
    • Appliances.Refrigerator Door
    • Appliances.Stove
  • Fire Alarms
    • Fire Alarms.Bedroom
    • Fire Alarms.Kitchen

Creating a Complex Tree

Groups can be use to introduce as many layers of hierarchy as desired. In the following example, the devices are grouped by location, introducing multiple layers of hierarchy:

Grouped by Area

The elements in this model would have the following primary keys:

  • Interior
    • Interior.Downstairs
      • Interior.Downstairs.Kitchen
        • Interior.Downstairs.Kitchen.Fire Alarm
        • Interior.Downstairs.Kitchen.Refrigerator Door
        • Interior.Downstairs.Kitchen.Stove
      • Interior.Downstairs.Hallway
        • Interior.Downstairs.Hallway.Light
    • Interior.Upstairs
      • Interior.Upstairs.Bathroom
        • Interior.Upstairs.Bathroom.Light
      • Interior.Upstairs.Bedroom
        • Interior.Upstairs.Bedroom.Light
        • Interior.Upstairs.Bedroom.Fire Alarm
  • Exterior
    • Exterior.House
      • Exterior.House.Front Door
      • Exterior.House.Porch Light
    • Exterior.Garage
      • Exterior.Garage.Door

Accessing Element Groups

It is rarely necessary to access an element group directly. Usually, only the individual elements within the group are accessed. Nonetheless, element groups have the following members:

keyThe element group’s primary key.
nameThe element group’s name. The name is the last component of the primary key.
UUIDThe unique UUID of the element group.

To refer to a member, use its primary key. The primary key of the UUID attribute of an element group called “My.Element.Group” is “My.Element.Group.UUID”.