Layer precedence

 
As mentioned in the previous Layer Manager-related topics, in order to properly manage multiple Layers for a single object we introduced the idea of the Layer precedence list, which is somewhat analogous to what z-ordering does for drawing precedence.
In this solution, regardless of how many Layers are associated with a given object, IRM just looks down the precedence list until it finds the first one that applies, and uses that to render the object. There is one layer precedence list for each Super Category that contains objects that get drawn (e.g. one precedence list for all Equipment objects).
 
Layer precedence is implemented as a user setting allowing each user to set their own layer precedence independently of other users. Administrator level users have the ability to promote the global default level for layers based on provided requirements.
 
Layer Variety
Description
Type Layers
There is an implicit layer for each Type of Managed objects. A Layer object is stored in each Type object (Equipment Type, Cable Type, etc.). This variety does not apply to Categorized objects.
Category Layers
There is an implicit layer for each Category of Managed Objects. A Layer object is stored in each Category object
Grouping Layers
There is an implicit layer for each Grouping object. A Layer object is stored in each Grouping object
Field Value Layers
There is an implicit layer for each possible value of each specially designated (Layer Creator) field in Managed Objects. A set of Layer objects are stored in each Field object that uses a (non-semantic) Field Specification with the Layer Creator property. There is one Layer object per value of the field. To avoid potentially large numbers of Layer objects from being created, IRM has the restriction that the Layer Creator property can only be set only for List fields
 
Since a single object can be in a given Category, Type, Grouping, and have a specially designated Layer field, it can clearly be associated with at least four layers. In fact, an object can be in more than four layers, because it can be in multiple Groupings, have multiple specially designated Layer fields, and even have more than one Category.  However, even though an object can be in multiple Layers at once, only one of the layers can be “active” at a given point in time, which is necessary so that the drawing engine knows whether and how to draw that object.  That is what the layer precedence list is for -- to help determine with Layer is active for a given object.
 
For each one of the applicable super categories (Equipment, Cable, Pathways, Maintenance Holes, Locations, Spaces) a separate active layer variety can be selected. That is, each of the applicable Super Categories has its own active layer variety. Therefore, Equipment may have the Type layer variety set as active, whereas Pathways may simultaneously have a Grouping layer variety set. Given that a single drawable object is in only one of the six listed Super Categories, this cannot lead to a single object having more than one active layer variety.
 
The Equipment Super Category provides a good example because it supports all four layer varieties and there are typically enough Equipment objects in an Area that making good use of Layers is useful in order to get the best visualizations.
 
For a sample TP Link Switch instance, the following is a list of all the related Layers:
 
Category layers
  • Sample Equipment
  • Rack Equipment
  • Switches
     
Type layers
  • TP Link 5 Port Switch
     
Grouping layers
  • IRM Developers
  • Engineering Department
  • Personnel Department
     
Field Value layers
  • By Security Classification: Unclassified
 
The following screenshot displays all Category Variety Layers for the Equipment Super Category:
Layer precedence
 
The Category variety layers for the sample Switch layers listed earlier (Sample Equipment, Rack Equipment, Switches) are sorted in the grid above in such a precedence order that, with the assumption that all Category layers are enabled and Category is the active variety, an object will inherit the first layer (Sample Equipment Layer) from this grid. If disabled (checkbox at the end of the row is not checked), the next Layer would be the Rack Equipment Layer, and finally, if that one isn't enabled, the Switches Layer would be used for the sample Switch Equipment.
 
The following screenshot displays all Grouping Variety Layers for the Equipment Super Category:
 
 
The Grouping Variety Layers for the sample Switch listed earlier (IRM Developers, Engineering Department, Personnel Department) are sorted in the grid above in such a precedence order that, with the assumption that the Grouping Variety is active, the object will inherit the first grouping layer (IRM Developers Layer). If disabled, the next Layer it would inherit would be the Engineering Department Layer, and finally, if that one isn't enabled, the Personnel Department Layer would be used. Both of the Layer precedence and the Layer enabled flag are not in the Layer objects themselves, but are rather part of the View, which enables different users to have these properties set to custom values. 
 
The precedence order of these layers can be changed simply by dragging the appropriate row entry to higher position in the grid, or by selecting it and moving it by clicking on the arrow buttons on the right.
Another convenient way to set the active layer variety without re-shuffling the Layer list is setting the Enabled flag, which indicates whether the selected Layer is enabled or disabled. Disabled Layers can never be active, until they are re-enabled. 
 
In summary: for each variety, the highest precedence Layer that applies to an object and has the enabled checkbox selected (checked) is currently the active Layer for that object.