Commit 8d67dd78 authored by Jason Fox's avatar Jason Fox
Browse files

Formatting

parent 4d481ce6
Loading
Loading
Loading
Loading
+29 −29
Original line number Diff line number Diff line
@@ -69,8 +69,8 @@ Implementations support the NGSI-LD Meta-model as follows:
- An **NGSI-LD** **Relationship** is a subclass of rdfs:Resource [i.24].
- An **NGSI-LD** **Property** is a subclass of rdfs:Resource [i.24].
- An **NGSI-LD** **Value** is either a rdfs:Literal or a node object (in JSON-LD syntax) to represent complex data structures [i.24].
- An **NGSI-LD Property** has a **value,** stated through [hasValue]{.HTML-Variable}, which is of type rdf:Property [i.24]. An **NGSI-LD 
Relationship** has an **object** stated through [hasObject]{.HTML-Variable} which is of type rdf:Property [i.24].
- An **NGSI-LD Property** has a **value,** stated through _`hasValue`_, which is of type rdf:Property [i.24].
- An **NGSI-LD Relationship** has an **object** stated through _`hasObject`_ which is of type rdf:Property [i.24].

### 4.2.3	Cross-domain ontology

@@ -109,13 +109,13 @@ Clause+++clause-5+++root.2.6.4.3.
- **"scope" Property:** Is a Property that enables putting Entities into a hierarchical structure as defined in
 Clause+++clause-5+++root.2.7.
- **LanguageMaps:** Are a special type of NGSI-LD Value intended to convey the different values of Language Properties, stated through an 
[hasLanguageMap]{.HTML-Variable}, which is of type rdf:Property [i.24] and is itself a subproperty of *[hasValue]{.HTML-Variable}.*
_`hasLanguageMap`_, which is of type rdf:Property [i.24] and is itself a subproperty of _`hasValue`_.
- **Geometry Values:** Are a special type of NGSI-LD Value intended to convey geometries corresponding to geospatial properties as defined
in Clause+++clause-5+++root.2.6.4.5.
- **Time Values:** Are a special type of NGSI-LD Value intended to convey time instants or intervals representations as defined in 
Clause+++clause-5+++root.2.2.4.

Clause+++clause-4+++root.3.4.3 introduces the Core JSON-LD [\@context]{.HTML-Variable} which includes the URIs which correspond to the concepts 
Clause+++clause-4+++root.3.4.3 introduces the Core JSON-LD _`@context`_ which includes the URIs which correspond to the concepts
introduced above.

### 4.2.4	NGSI-LD domain-specific models and instantiation
@@ -130,9 +130,9 @@ Entity types can have further subtypes, e.g. ["OffStreetParking"]{.HTML-Code} as

**Figure 4.2.4-1: Cross-domain ontology and instantiation**

In addition, two different NGSI-LD Properties are introduced ([hasState]{.HTML-Variable} and [reliability]{.HTML-Variable}).
In addition, two different NGSI-LD Properties are introduced (_`hasState`_ and _`reliability`_).

The [adjacentTo]{.HTML-Variable} Relationship links entities of type ["Parking"]{.HTML-Code} with entities of type ["Street"]{.HTML-Code}.
The _`adjacentTo`_ Relationship links entities of type ["Parking"]{.HTML-Code} with entities of type ["Street"]{.HTML-Code}.

### 4.2.5	UML representation

@@ -361,22 +361,22 @@ Once all information has been aggregated and fitlered, the result is returned to

#### 4.3.4.1	Introduction

NGSI-LD serialization is based on JSON-LD [i.25], a JSON-based format for serializing Linked Data and a representation of RDF. The [\@context]{.HTML-Variable} in JSON-LD is used to 
NGSI-LD serialization is based on JSON-LD [i.25], a JSON-based format for serializing Linked Data and a representation of RDF. The _`@context`_ in JSON-LD is used to
expand terms, provided as short-hand strings, to concepts, specified as URIs, and vice versa, to compact URIs into terms. The motivation is to have, on the one hand, unique terms, 
on the other hand, a compact, easily readable representation based on short terms. NGSI-LD defines the terms of its vocabulary in the core @context, users can define further terms relevant for
their data model in a user \@context, in particular the Entity Types and Attribute names they need.
on the other hand, a compact, easily readable representation based on short terms. NGSI-LD defines the terms of its vocabulary in the core _`@context`_, users can define further terms relevant for
their data model in a user _`@context`_, in particular the Entity Types and Attribute names they need.

#### 4.3.4.2	Expansion and compaction

NGSI-LD API operations allow clients to use short-hand strings as non-qualified names, particularly for [Attribute]{.HTML-Definition} or [Entity Type]{.HTML-Definition} names.
For instance, an API client can refer to the term ["Store"]{.HTML-Code} as a non-qualified type name. When executing API operations where content is provided in the body, NGSI-LD systems
expand terms to URIs based on a provided user @context, or, as a fall-back, on the NGSI-LD core @context, in order to obtain and store Fully Qualified Names, e.g. 
["https://uri.etsi.org/ngsi-ld/example/Store"]{.HTML-Code}. The originally used short name is not stored anywhere, nor the user @context provided as part of the request. 
expand terms to URIs based on a provided user _`@context`_, or, as a fall-back, on the NGSI-LD core _`@context`_, in order to obtain and store Fully Qualified Names, e.g.
["https://uri.etsi.org/ngsi-ld/example/Store"]{.HTML-Code}. The originally used short name is not stored anywhere, nor the user _`@context`_ provided as part of the request.

Likewise, when returning results, NGSI-LD systems compact URIs (Fully Qualified Names) to short terms in order to provide short-hand strings to [Context Consumers]{.Keyboard}, based
on the user @context provided as part of the request, not any previously used user @context.
on the user _`@context`_ provided as part of the request, not any previously used user _`@context`_.

The term to URI expansion or compaction is performed using an [\@context]{.HTML-Variable} as described by the JSON-LD specification [i.25], section 5.1.
The term to URI expansion or compaction is performed using an _`@context`_ as described by the JSON-LD specification [i.25], section 5.1.

>>> [!tip] EXAMPLE:

@@ -393,7 +393,7 @@ The following NGSI-LD Entity is provided as input
}
```

together with the following user @context that contains the NGSI-LD core @context
together with the following user _`@context`_ that contains the NGSI-LD core _`@context`_

``` json
{
@@ -434,7 +434,7 @@ the NGSI-LD content will be expanded to the following representation

which is only used internally and is not visible to the user.

Using the following user @context when retrieveing the Entity
Using the following user _`@context`_ when retrieveing the Entity

``` json
{
@@ -463,34 +463,34 @@ results in the following compacted representation, where "store" has been replac

>>>

#### 4.3.4.3	Core @context
#### 4.3.4.3	Core \@context

The core NGSI-LD (JSON-LD) [\@context]{.HTML-Variable} is defined as a JSON-LD [\@context]{.HTML-Variable} which contains:
The core NGSI-LD (JSON-LD) _`@context`_ is defined as a JSON-LD _`@context`_ which contains:

- The core terms needed to uniquely represent the key concepts defined by the NGSI-LD Information Model.
- The terms needed to uniquely represent all the members that define the API-related Data Types.
- A fallback [\@vocab]{.HTML-Variable} rule to expand or compact user-defined terms to a default URI, in case there is no other possible expansion 
  or compaction as per the current [\@context]{.HTML-Variable}.
- The core NGSI-LD [\@context]{.HTML-Variable} defines the term ["id"]{.HTML-Code}, which is mapped to [\@id]{.HTML-Variable}, and the term ["type"]{.HTML-Code},
  which is mapped to [\@type]{.HTML-Variable}[.]{.HTML-Code} Since [\@id]{.HTML-Variable} and [\@type]{.HTML-Variable} are what is typically used in JSON-LD,
- A fallback _`@vocab`_ rule to expand or compact user-defined terms to a default URI, in case there is no other possible expansion
  or compaction as per the current _`@context`_.
- The core NGSI-LD _`@context`_ defines the term ["id"]{.HTML-Code}, which is mapped to _`@id`_, and the term ["type"]{.HTML-Code},
  which is mapped to _`@type`_. Since _`@id`_ and _`@type`_ are what is typically used in JSON-LD,
  they may also be used in NGSI-LD requests instead of ["id"]{.HTML-Code} and ["type"]{.HTML-Code} respectively, wherever this is applicable. 
  In NGSI-LD responses, only ["id"]{.HTML-Code} and ["type"]{.HTML-Code} are used.

NGSI-LD compliant implementations support such core [\@context]{.HTML-Variable}, which is considered implicitly present when processing or generating context information.
Furthermore, the Core [\@context]{.HTML-Variable} is protected and remainsD immutable and invariant during expansion or compaction of terms. Therefore, and as per the
JSON-LD processing rules [i.25], when processing NGSI-LD content, implementations are to consider the core [\@context]{.HTML-Variable} as if it were in the **last** position
of the [\@context]{.HTML-Variable} array. Nonetheless, for the sake of compatibility and cleanness, data providers are expected to generate JSON-LD content that conveys the
core [\@context]{.HTML-Variable} in the last position.
NGSI-LD compliant implementations support such core _`@context`_, which is considered implicitly present when processing or generating context information.
Furthermore, the Core _`@context`_ is protected and remainsD immutable and invariant during expansion or compaction of terms. Therefore, and as per the
JSON-LD processing rules [i.25], when processing NGSI-LD content, implementations are to consider the core _`@context`_ as if it were in the **last** position
of the _`@context`_ array. Nonetheless, for the sake of compatibility and cleanness, data providers are expected to generate JSON-LD content that conveys the
core _`@context`_ in the last position.

For the avoidance of doubt, when rendering NGSI-LD Elements, the core [\@context ]{.HTML-Variable} is always treated as if it had been originally placed **in the last position**, 
For the avoidance of doubt, when rendering NGSI-LD Elements, the core _`@context`_ is always treated as if it had been originally placed **in the last position**,
so that, if needed, upstream JSON-LD processors can properly expand as NGSI-LD or override the resulting JSON-LD documents provided by API implementations.

The NGSI-LD core [\@context]{.HTML-Variable} is publicly available at [https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.9.jsonld](https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.9.jsonld)
The NGSI-LD core _`@context`_ is publicly available at [https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.9.jsonld](https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.9.jsonld)
and contains all the terms as specified in annex b.

#### 4.3.4.4	User @context

In addition to the terms defined by the core NGSI-LD [\@context]{.HTML-Variable} (as specified in annex B), a user [\@context]{.HTML-Variable} is to be provided that contains the following terms:
In addition to the terms defined by the core NGSI-LD _`@context`_ (as specified in annex B), a user _`@context`_ is to be provided that contains the following terms:

- One term associated to the Entity Type, mapping the Entity Type name with its Type Identifier (URI).
- One term associated to the name of each Attribute or any of its subclasses mapping the Property name with its Property Identifier (URI).