5.2 NGSI-LD Information Model
Figure 5.2-1 shows the NGSI-LD Information Model[i.3]. The key concept is the NGSI-LD Entity. An NGSI-LD Entity can represent an actual physical object, like a room or a table, or an abstract concept like a company. NGSI-LD Entities can have the following elements:
- NGSI-LD Entities have an identifier id, which is always a URI, following the linked data principles. "id" maps to "@id", which is defined by JSON-LD[i.4]. which is used for syntactically representing NGSI-LD information.
- NGSI-LD Entities have one or more _type_s. "type" maps to "@type", which is defined by JSON-LD[i.4]. which is used for syntactically representing NGSI-LD information.
- NGSI-LD Entities have zero or more Properties. A Property defines an aspect of an Entity. Each Property has a Value, which can have a simple datatype like a string or integer or be a complex JSON object.
- NGSI-LD Entities have zero or more Relationship. A Relationship points to another NGSI-LD Entity.
Figure 5.2-1: NGSI-LD Information Model
To enable meta data, both Properties and Relationships can themselves have Properties and Relationships, e.g. to encode a unit, an accuracy or the originator of the information, which may itself be modelled as an Entity.
Figure 5.2-2 shows a simple example of NGSI-LD Entity Instances. There are two cars modelled as Entities of type car. The car on the left has an "in front of" Relationship to the car on the right. The car on the right has a Property "speed", which in turn has the value "80", and the Property speed itself has another Property "source", which identifies the speedometer. If the speedometer had been modelled as an Entity, the "speed" Property would have a Relationship to the speedometer Entity instead.
Figure 5.2-2: Simple NGSI-LD Entity Example
Figure 5.2-3 shows the sketch of an Entity graph. The Entities and the Relationships between Entities form a graph with the Entities as nodes and the Relationships as edges. Not all information is suitable to be directly represented in NGSI-LD, e.g. a video stream or a complex 3D model would not be suitable. In such cases, there can be Properties pointing to the respective information in external systems and meta information can be added that allows application to access this information.
Figure 5.2-3: NGSI-LD Entity Graph Example Sketch
Figure 5.2-4 shows a detailed Entity graph example. It shows that all Entities have a type and that both Relationships and Properties can again have Relationships and Properties providing meta information regarding the original Property or Relationship.
Figure 5.2-4: NGSI-LD Conceptual Property Graph Example
As the NGSI-LD Information Model is a meta model, it only defines what kind of elements exist, i.e. Entities, Properties, Relationships etc. but not what Entity types exist and what Relationships and Properties instances of such an Entity Type have, see Figure 5.2-5.
This information is specified by Data Models. To be used with NGSI-LD, they have to be compatible with the NGSI-LD Information Model, and specify what types of Entities exist and what Properties and Relationships instances of the respective Entity types can have. An example of a collection of such data models are the Smart Data Models[i.5], which are supported by FIWARE, IUDX, OASC and tmforum. The specification of Data Models is considered out-of-scope of ETSI ISG CIM as it does not have the domain experts that would be required to create such models.
Figure 5.2-5: NGSI-LD Compatible Data Models