Xentara v2.0.3
User Manual
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:

Attributes
keyThe group’s primary key.
nameThe group’s name. The name is the last component of the primary key.
UUIDThe unique UUID of the group.
typeThe group’s element type. For element groups, this is always “element group”.
categoryThe group’s category. For element groups, this is always “element group”.