Identifier

org.eso.ias.types.Identifier
See theIdentifier companion object
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

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Constructors

def this(id: String, idType: IdentifierType, parent: Identifier)

Auxiliary constructor, of a non-templated identifier mostly to ease java/scala inter-operability.

Auxiliary constructor, of a non-templated identifier mostly to ease java/scala inter-operability.

Value parameters

id:

the not null nor empty identifier

idType

the not null nor empty type of the identifier

parent

the parent of the identifier, can be null

Attributes

def this(id: String, idType: IdentifierType)

Auxiliary constructor of a non-templated identifier without parent, mostly to ease java/scala inter-operability.

Auxiliary constructor of a non-templated identifier without parent, mostly to ease java/scala inter-operability.

Value parameters

id:

the not null nor empty identifier

idType

the not null type of the identifier

Attributes

def this(id: String, instance: Option[Int], idType: IdentifierType, parentID: Option[Identifier])

Auxiliary constructor of possibly templated identifier

Auxiliary constructor of possibly templated identifier

Value parameters

id:

the not null nor empty identifier

idType

the not null type of the identifier

instance

the number of the instance of a templated identifier, if defined

parentID

the parent of the identifier, can be null

Attributes

def this(id: String, idType: IdentifierType, instance: Int, parentID: Identifier)

Auxiliary constructor of possibly templated identifier: this auxiliary constructor is meant to ease the construction of an identifier from java

Auxiliary constructor of possibly templated identifier: this auxiliary constructor is meant to ease the construction of an identifier from java

Value parameters

id:

the not null nor empty identifier

idType

the not null type of the identifier

instance

the number of the instance of a templated identifier, if not null

parentID

the parent of the identifier, can be null

Attributes

Concrete methods

def canEqual(other: Any): Boolean

canEqual method checks the class of the passed

canEqual method checks the class of the passed

Value parameters

other

the object to compare

Attributes

override def equals(other: Any): Boolean

Override equals

Override equals

For equality it is enough to check the fullRuningId

Attributes

Definition Classes
Any
def getIdOfType(idTypeToSearch: IdentifierType): Option[String]

Search and return in this Identifier or in its parent the id of the given type, if any.

Search and return in this Identifier or in its parent the id of the given type, if any.

Attributes

Returns

the ID of the identifier of the given type

override def hashCode: Int

Override hashCode

Override hashCode

Attributes

Definition Classes
Any
def isValidParentType(theType: IdentifierType, parent: Option[Identifier]): Boolean

Check if the passed identifier is compatible with the type of the passed parent.

Check if the passed identifier is compatible with the type of the passed parent.

As described in the constructor each type has a subset of types that can be set as parent.

Value parameters

parent

Its parent

theType:

the type whose compatibility must be checked

Attributes

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Concrete fields

lazy val baseId: String

The Identifier without the template part if template, otherwise it the same as the id

The Identifier without the template part if template, otherwise it the same as the id

Attributes

val fromTemplate: Boolean
lazy val fullRunningID: String

The fullRunning is the complete version of the runningID that includes also the type of each ID.

The fullRunning is the complete version of the runningID that includes also the type of each ID.

It brings deployment information for which aoolies the same consideration of runningID

Attributes

See also

runningID

val id: String
val idType: IdentifierType
val parentID: Option[Identifier]
lazy val runningID: String

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

Attributes

lazy val templateInstance: Option[Int]

The number of the instance or empty if the identifier is not generated from a template

The number of the instance or empty if the identifier is not generated from a template

Attributes