class Identifier(val id: String, val idType: IdentifierType, val parentID: Option[Identifier])
The immutable Identifier is a recursive data structure composed of a unique ID plus the ID of the parent. The ID, in turn, is a couple with unique identifier plus the type of the identifier.
The identifier (id,type) is the unique identifier of an element of the core. Even if not intuitive (and strongly discouraged), it is possible to have different elements like for example a DASU and an ASCE with the same ids because their types differ.
The parent of an item is the "owner" of the item itself:
the owner of a monitor point is the monitored system that produced it
the owner of a component is the DASU where the component runs
the owner of the DASU is the Supervisor where the DASU runs
the Supervisor has no owner, being a the top level of the inclusion
Another way to think of an Identifier is a way to describe the IAS components that contribute to generate a IASIO. The identifier of all the other IAS components can be deducted in the same way. There are 2 possible ways to generate a IASIO: getting a monitored value of alarm from a remote monitored system and inject into the core or the output of a ASCE/DASU. In the former case the IAS components that collaborate to produce the IASIOs are the monitored system, the plugin who gets the value, the converter that translated the value in a IAS data structure. In the latter case the components that collaborate to generate a IASIO are the the Supervisor, the DASU and the ASCE. There are therefore only 2 possible types of identifiers, for the 2 cases described upon:
Monitored system->->Plugin->Converter->IASIO
Supervisor->DASU->ASCE->IASIO
The constructor checks if the Identifier that is going to build is compatible with the type of the passed parent.
Dedicated auxiliary constructors support the generation of replicated items, being them ASCEs, DASUs or IASIOs, from and identifier and the the given instance number by appending to the passed ID, a suffix followed by the number of the instance and the suffix. The constructor does not make any check to ensure that the passed instance number matches with the definition of the template in the CDB. The method buildFromTemplate(String, Option[Int]) builds an identifier from a template.
This definition of the identifier shows the deployment because the parentID depends on where/how an element is calculated deployed. The id of an item is supposed to be unique in the system: the deployment information is mostly useful for debugging as it allows to follow the computation path of a IASIO.
At run-time, to avoid traversing the parents, a unique ID is generated in form of a string.
The class is Iterable by definition as it contains a reference to the Identifier of the parent.
Value parameters
id:
The not null nor empty identifier
idType:
The type of the identifier
parentID:
The identifier of the parent
Attributes
Constructor
Builds an identifier with a ID, a type and its parent
The runningID, composed of the id plus the id of the parents allows to uniquely identify at object at run time but note that it brings deployment information so it cannot be used as a unique identifier because changing the deployment would trigger a change of the ID.
The runningID, composed of the id plus the id of the parents allows to uniquely identify at object at run time but note that it brings deployment information so it cannot be used as a unique identifier because changing the deployment would trigger a change of the ID.
The runningID is composed of the IDs only i.e. without the types