Commit 09a0df74 authored by Giuseppe Tropea's avatar Giuseppe Tropea
Browse files

Merge branch 'fix/auxiliary' into 'master'

DATA(25)000168_NGSI-LD_Core_Clarify_Auxilliary

See merge request !14
parents ac2bc32c 07f7d5b2
Loading
Loading
Loading
Loading
+207 −85

File changed.

Preview size limit exceeded, changes collapsed.

+34 −8
Original line number Original line Diff line number Diff line
@@ -54,6 +54,7 @@ Implementations shall exhibit the following behaviour:
- If an **exclusive** [Context Source Registration]{.HTML-Keyboard} already
- If an **exclusive** [Context Source Registration]{.HTML-Keyboard} already
  exists for this Entity id (URI), Attributes from matching input data are
  exists for this Entity id (URI), Attributes from matching input data are
  forwarded for remote processing:
  forwarded for remote processing:

  - For matching Registrations where the "Create or Update (Upsert) Temporal
  - For matching Registrations where the "Create or Update (Upsert) Temporal
    Evolution of an Entity" operation is supported, the operation is forwarded
    Evolution of an Entity" operation is supported, the operation is forwarded
    to the registration endpoint. If the endpoint then raises an error, this
    to the registration endpoint. If the endpoint then raises an error, this
@@ -72,6 +73,7 @@ Implementations shall exhibit the following behaviour:
- If any **redirect** [Context Source Registrations]{.HTML-Keyboard} exist that
- If any **redirect** [Context Source Registrations]{.HTML-Keyboard} exist that
  match against the input data, that input data is forwarded for remote
  match against the input data, that input data is forwarded for remote
  processing by one or more matching endpoints:
  processing by one or more matching endpoints:

  - For matching Registrations where the "Create or Update (Upsert) Temporal
  - For matching Registrations where the "Create or Update (Upsert) Temporal
    Evolution of an Entity" operation is supported, matching input data is
    Evolution of an Entity" operation is supported, matching input data is
    forwarded. If any such endpoint then raises an error, this shall result in
    forwarded. If any such endpoint then raises an error, this shall result in
@@ -151,10 +153,10 @@ The following behaviour shall be exhibited by compliant implementations:
  as a parameter held locally and no matching registrations apply, an error of
  as a parameter held locally and no matching registrations apply, an error of
  type [ResourceNotFound]{.HTML-Error} shall be raised.
  type [ResourceNotFound]{.HTML-Error} shall be raised.
- The behaviour defined in Clause+++clause-8+++root.2.3 on JSON-LD validation.
- The behaviour defined in Clause+++clause-8+++root.2.3 on JSON-LD validation.
- If an **exclusive** or **redirect** [Context Source
- If an **exclusive** [Context Source Registration]{.HTML-Keyboard} matches
  Registration]{.HTML-Keyboard} matches against the input data, the Attributes
  against the input data, the Attributes from matching input data are forwarded
  from matching input data are forwarded for remote processing. For each
  for remote processing. For each matching registration:
  matching registration:

  - If the "Add Attributes to Temporal Evolution of an Entity" operation is
  - If the "Add Attributes to Temporal Evolution of an Entity" operation is
    supported by the matched registration, matching input data is forwarded to
    supported by the matched registration, matching input data is forwarded to
    the Registration endpoint.
    the Registration endpoint.
@@ -164,8 +166,26 @@ The following behaviour shall be exhibited by compliant implementations:
    Evolution of an Entity"operation failed or in a partial success if some
    Evolution of an Entity"operation failed or in a partial success if some
    parts of it succeeded.
    parts of it succeeded.


  The matching Attributes are then removed from the Fragment and not processed
  The Attributes matching the **exclusive** [Context Source
  further.
  Registration]{.HTML-Keyboard} are then removed from the EntityTemporal
  Fragment and not processed further.

- If a **redirect** [Context Source Registration]{.HTML-Keyboard} matches
  against the input data, the Attributes from matching input data are forwarded
  for remote processing. For each matching registration:

  - If the "Add Attributes to Temporal Evolution of an Entity" operation is
    supported by the matched registration, matching input data is forwarded to
    the Registration endpoint.
  - If the "Add Attributes to Temporal Evolution of an Entity" operation is not
    supported by the matched registration, this shall result in an error of type
    [Conflict]{.HTML-Error} if the complete "Add Attributes to Temporal
    Evolution of an Entity"operation failed or in a partial success if some
    parts of it succeeded.

  The Attributes matching the **redirect** [Context Source
  Registration]{.HTML-Keyboard} are then removed from the EntityTemporal
  Fragment and not processed further.


- For any **inclusive** [Context Source Registrations]{.HTML-Keyboard} that
- For any **inclusive** [Context Source Registrations]{.HTML-Keyboard} that
  match against the remaining input data, that input data is also forwarded for
  match against the remaining input data, that input data is also forwarded for
@@ -173,8 +193,8 @@ The following behaviour shall be exhibited by compliant implementations:
- If the target [Temporal Evolution of an Entity]{.HTML-Keyboard} exists locally
- If the target [Temporal Evolution of an Entity]{.HTML-Keyboard} exists locally
  and matches against the remaining input data, implementations shall do the
  and matches against the remaining input data, implementations shall do the
  following:
  following:
  - For each Attribute instance included by the _EntityTemporal_ Fragment at
  - For each Attribute instance included by the EntityTemporal Fragment at root
    root level:
    level:
  - The Attribute (considering term expansion rules as mandated by
  - The Attribute (considering term expansion rules as mandated by
    Clause+++clause-8+++root.2.4) instance(s) shall be added to the target
    Clause+++clause-8+++root.2.4) instance(s) shall be added to the target
    [Temporal Evolution of an Entity]{.HTML-Keyboard}.
    [Temporal Evolution of an Entity]{.HTML-Keyboard}.
@@ -237,6 +257,7 @@ Figure: Delete Attribute from Temporal Evolution of an Entity use case
- If an **exclusive** or **redirect** [Context Source
- If an **exclusive** or **redirect** [Context Source
  Registration]{.HTML-Keyboard} matches against the input data, the input data
  Registration]{.HTML-Keyboard} matches against the input data, the input data
  is forwarded. For each matching registration:
  is forwarded. For each matching registration:

  - If the "Delete Attribute from Temporal Evolution of an Entity" operation is
  - If the "Delete Attribute from Temporal Evolution of an Entity" operation is
    supported by the matched registration, matching input data is forwarded to
    supported by the matched registration, matching input data is forwarded to
    the Registration endpoint.
    the Registration endpoint.
@@ -326,6 +347,7 @@ Figure: Modify Attribute Instance in Temporal Evolution of an Entity use case
- If an **exclusive** or **redirect** [Context Source
- If an **exclusive** or **redirect** [Context Source
  Registration]{.HTML-Keyboard} matches against the input data, the input data
  Registration]{.HTML-Keyboard} matches against the input data, the input data
  is forwarded. For each matching registration:
  is forwarded. For each matching registration:

  - If the "Modify Attribute instance in Temporal Evolution of an Entity"
  - If the "Modify Attribute instance in Temporal Evolution of an Entity"
    operation is supported by the matched registration, matching input data is
    operation is supported by the matched registration, matching input data is
    forwarded to the Registration endpoint.
    forwarded to the Registration endpoint.
@@ -412,6 +434,7 @@ Figure: Delete Attribute Instance from Temporal Evolution of an Entity use case
- If an **exclusive** or **redirect** [Context Source
- If an **exclusive** or **redirect** [Context Source
  Registration]{.HTML-Keyboard} matches against the input data, the input data
  Registration]{.HTML-Keyboard} matches against the input data, the input data
  is forwarded. For each matching registration:
  is forwarded. For each matching registration:

  - If the "Delete Attribute instance from Temporal Evolution of an Entity"
  - If the "Delete Attribute instance from Temporal Evolution of an Entity"
    operation is supported by the matched registration, matching input data is
    operation is supported by the matched registration, matching input data is
    forwarded to the Registration endpoint.
    forwarded to the Registration endpoint.
@@ -484,6 +507,7 @@ Figure: Delete Temporal Evolution of an Entity use case
- If an **exclusive** or **redirect** [Context Source
- If an **exclusive** or **redirect** [Context Source
  Registration]{.HTML-Keyboard} matches against the input data, the input data
  Registration]{.HTML-Keyboard} matches against the input data, the input data
  is forwarded. For each matching registration:
  is forwarded. For each matching registration:

  - If the "Delete Temporal Evolution of Entity" operation is supported by the
  - If the "Delete Temporal Evolution of Entity" operation is supported by the
    matched registration, matching input data is forwarded to the Registration
    matched registration, matching input data is forwarded to the Registration
    endpoint.
    endpoint.
@@ -783,12 +807,14 @@ Clause+++clause-8+++root.6 ), no further restrictions have to be provided.
  temporal property (by default _observedAt_) within the concerned temporal
  temporal property (by default _observedAt_) within the concerned temporal
  interval.
  interval.
- Otherwise,
- Otherwise,

  - Let S be the set of selected Entities i.e. the query result set.
  - Let S be the set of selected Entities i.e. the query result set.
  - If split entities flag is explicitly set to true or, if not explicitly set,
  - If split entities flag is explicitly set to true or, if not explicitly set,
    the default setting of the deployment allows split entities, and local scope
    the default setting of the deployment allows split entities, and local scope
    is not specified, implementations shall run a query that shall return an
    is not specified, implementations shall run a query that shall return an
    Entity Array containing all the Entities found locally, that meet all of the
    Entity Array containing all the Entities found locally, that meet all of the
    following conditions (given the respective parameter is provided):
    following conditions (given the respective parameter is provided):

    - If id(s) is provided, keep in S only those Entities whose id is equivalent
    - If id(s) is provided, keep in S only those Entities whose id is equivalent
      to any of the id(s) passed as a parameter.
      to any of the id(s) passed as a parameter.
    - If an id pattern is provided, keep in S only those Entities whose id
    - If an id pattern is provided, keep in S only those Entities whose id
+5 −0
Original line number Original line Diff line number Diff line
@@ -354,6 +354,7 @@ Figure: Discover context source registrations use case
  here to identify relevant GeoProperties and for geographical scoping) as per
  here to identify relevant GeoProperties and for geographical scoping) as per
  Clause+++clause-7+++7.2.4 (optional).
  Clause+++clause-7+++7.2.4 (optional).
- In the case of GeoJSON representation:
- In the case of GeoJSON representation:

  - The name of the _GeoProperty_ attribute to use as the geometry for the
  - The name of the _GeoProperty_ attribute to use as the geometry for the
    GeoJSON representation as mandated by Clause+++clause-5+++5.3.3 (optional).
    GeoJSON representation as mandated by Clause+++clause-5+++5.3.3 (optional).
  - A _datasetId_ specifying which instance of the value is to be selected if
  - A _datasetId_ specifying which instance of the value is to be selected if
@@ -506,6 +507,7 @@ Figure: Subscribe Context Source Registration use case
- The behaviour shall be as described in Clause+++clause-10+++10.5.2.4,
- The behaviour shall be as described in Clause+++clause-10+++10.5.2.4,
  restricted to the local case (where Subscriptions cannot be received from
  restricted to the local case (where Subscriptions cannot be received from
  remote Brokers), with the following exceptions:
  remote Brokers), with the following exceptions:

  - If all checks described in Clause+++clause-10+++10.5.2.4 pass,
  - If all checks described in Clause+++clause-10+++10.5.2.4 pass,
    implementations shall add a new [Context Source
    implementations shall add a new [Context Source
    Registration]{.HTML-Keyboard} Subscription. The parameters of the created
    Registration]{.HTML-Keyboard} Subscription. The parameters of the created
@@ -541,6 +543,7 @@ Figure: Subscribe Context Source Registration use case
    ["modifiedAt"or "deletedAt",]{.HTML-Code} the temporal query is matched
    ["modifiedAt"or "deletedAt",]{.HTML-Code} the temporal query is matched
    against the _`managementInterval`_ (if present). If the relevant interval is
    against the _`managementInterval`_ (if present). If the relevant interval is
    not present, there is no match:
    not present, there is no match:

    - The semantics of the match is that the _`timeAt`_ in the case of the
    - The semantics of the match is that the _`timeAt`_ in the case of the
      ["before"]{.HTML-Code} and ["after"]{.HTML-Code} relation is contained in
      ["before"]{.HTML-Code} and ["after"]{.HTML-Code} relation is contained in
      or is an endpoint of a time period included in the specified time
      or is an endpoint of a time period included in the specified time
@@ -783,6 +786,7 @@ following exceptions:
  information relevant for the subscription, in particular only matching
  information relevant for the subscription, in particular only matching
  _RegistrationInfo_ elements.
  _RegistrationInfo_ elements.
- A csource notification shall be sent as follows:
- A csource notification shall be sent as follows:

  - The structure of the csource notification message shall be as mandated by
  - The structure of the csource notification message shall be as mandated by
    Clause+++clause-5+++5.2.6.9.4.
    Clause+++clause-5+++5.2.6.9.4.
  - A csource notification shall be sent to the _`endpoint`_.
  - A csource notification shall be sent to the _`endpoint`_.
@@ -790,6 +794,7 @@ following exceptions:
  - The _`notification.lastNotification`_ member shall be updated with the
  - The _`notification.lastNotification`_ member shall be updated with the
    current timestamp.
    current timestamp.
  - If the notification is sent successfully:
  - If the notification is sent successfully:

    - Update _`notification.lastSuccess`_ with the current timestamp.
    - Update _`notification.lastSuccess`_ with the current timestamp.


  - If the notification is not sent successfully:
  - If the notification is not sent successfully:
+8 −3
Original line number Original line Diff line number Diff line
@@ -693,18 +693,21 @@ described as follows and shall be supported by compliant implementations:
- **Unequal** operator (production rule named [unequal]{.HTML-Sample}). A
- **Unequal** operator (production rule named [unequal]{.HTML-Sample}). A
  matching entity shall contain the target element and meet none of the
  matching entity shall contain the target element and meet none of the
  conditions defined in clause 7.2.3.4
  conditions defined in clause 7.2.3.4

  - If the data type of the target value and the data type of the Query Term
  - If the data type of the target value and the data type of the Query Term
    value are different, then they shall be considered unequal.
    value are different, then they shall be considered unequal.


- **Greater than** operator (production rule named [greater]{.HTML-Sample}). For
- **Greater than** operator (production rule named [greater]{.HTML-Sample}). For
  an entity to match, it shall contain the target element and the target value
  an entity to match, it shall contain the target element and the target value
  has to be strictly greater than the Query Term value:
  has to be strictly greater than the Query Term value:

  - If there is no equality between the target value data type and the Query
  - If there is no equality between the target value data type and the Query
    Term value data type then it shall be considered as not matching.
    Term value data type then it shall be considered as not matching.


- **Less than** operator (production rule named [less]{.HTML-Sample}). For an
- **Less than** operator (production rule named [less]{.HTML-Sample}). For an
  entity to match, it shall contain the target element and the target value
  entity to match, it shall contain the target element and the target value
  shall be strictly less than the value:
  shall be strictly less than the value:

  - If there is no equality between the target value data type and the Query
  - If there is no equality between the target value data type and the Query
    Term value data type then it shall be considered as not matching.
    Term value data type then it shall be considered as not matching.


@@ -719,6 +722,7 @@ described as follows and shall be supported by compliant implementations:
- **Match pattern** (production rule named [patternOp]{.HTML-Sample}). A
- **Match pattern** (production rule named [patternOp]{.HTML-Sample}). A
  matching entity shall contain the target element and the target value shall be
  matching entity shall contain the target element and the target value shall be
  in the L(R) of the regular pattern specified by the Query Term:
  in the L(R) of the regular pattern specified by the Query Term:

  - If the target value data type is different than _String_ then it shall be
  - If the target value data type is different than _String_ then it shall be
    considered as not matching.
    considered as not matching.


@@ -1165,6 +1169,7 @@ The semantics of the different geospatial relationships defined above is as
follows, and shall be supported by compliant implementations:
follows, and shall be supported by compliant implementations:


- **near** statement (production rule named [nearRel]{.HTML-Sample}):
- **near** statement (production rule named [nearRel]{.HTML-Sample}):

  - [maxDistance]{.HTML-Sample} modifier. For an entity to match it has to be
  - [maxDistance]{.HTML-Sample} modifier. For an entity to match it has to be
    within the buffer geometric object (as defined by [n.21]) given by the
    within the buffer geometric object (as defined by [n.21]) given by the
    reference geometry, with distance (in meters) equal to the number conveyed
    reference geometry, with distance (in meters) equal to the number conveyed
@@ -2002,9 +2007,9 @@ Entities could result in payloads of an excessive length. Therefore to mitigate
this, the default depth of retrieval (or _`joinLevel`_) shall be set to one,
this, the default depth of retrieval (or _`joinLevel`_) shall be set to one,
meaning that only one level of _Relationships_ are traversed, though this may be
meaning that only one level of _Relationships_ are traversed, though this may be
overridden on request. Furthermore, to avoid unnecessary duplication, whenever a
overridden on request. Furthermore, to avoid unnecessary duplication, whenever a
[Linked Entity]{.HTML-Keyboard} has already been previously encountered during graph
[Linked Entity]{.HTML-Keyboard} has already been previously encountered during
traversal at a shallower depth, its [Linked Entities]{.HTML-Keyboard} shall not undergo
graph traversal at a shallower depth, its [Linked Entities]{.HTML-Keyboard}
further expansion for a second time.
shall not undergo further expansion for a second time.


## 7.8 Tenants
## 7.8 Tenants


+31 −5
Original line number Original line Diff line number Diff line
@@ -37,11 +37,6 @@ kind of context data a [Context Broker]{.HTML-Keyboard} can exchange such as
Entity IDs, entity types, attribute names, geofenced areas, etc. Ultimately, all
Entity IDs, entity types, attribute names, geofenced areas, etc. Ultimately, all
constraints specified in the registration shall be respected.
constraints specified in the registration shall be respected.


When a [Context Source]{.HTML-Keyboard} is registered, an operation mode is
selected. This defines the basis for distributed operations and also defines
whether or not the [Context Broker]{.HTML-Keyboard} is permitted to hold context
data about the Entities and Attributes locally itself.

If two registered [Context Sources]{.HTML-Keyboard} are providing context data
If two registered [Context Sources]{.HTML-Keyboard} are providing context data
for the same Attribute, the Attribute instances can be distinguished by
for the same Attribute, the Attribute instances can be distinguished by
_`datasetId`_. The mechanism for determining which data shall be returned is
_`datasetId`_. The mechanism for determining which data shall be returned is
@@ -275,6 +270,11 @@ defined as ["federationOps"]{.HTML-Code}.


### 9.3.1 Introduction
### 9.3.1 Introduction


When a [Context Source]{.HTML-Keyboard} is registered, one of four modes of
operation is selected. This defines the basis for distributed operations and
also defines whether or not the [Context Broker]{.HTML-Keyboard} is permitted to
hold context data about the Entities and Attributes locally itself.

### 9.3.2 Additive registrations
### 9.3.2 Additive registrations


For additive registrations, the [Context Broker]{.HTML-Keyboard} is permitted to
For additive registrations, the [Context Broker]{.HTML-Keyboard} is permitted to
@@ -347,6 +347,32 @@ conflict to the registration. In the case that multiple overlapping **redirect**
registrations are defined, operations are distributed to all registered [Context
registrations are defined, operations are distributed to all registered [Context
Sources]{.HTML-Keyboard}.
Sources]{.HTML-Keyboard}.


### 9.3.4 Precedence of distributed operations

The presence of a matching **exclusive** [Context Source
Registration]{.HTML-Keyboard} indicates that no further local or distributed
operations shall occur on the specified Attribute of a given Entity. Operations
associated with an **exclusive** [Context Source Registration]{.HTML-Keyboard}
are always processed before any other local or distributed operations.

Thereafter, distributed operations triggered by **redirect** [Context Source
Registrations]{.HTML-Keyboard} shall take place. These also indicate that no
additional local or distributed operations shall occur on matching Attributes.

Distributed operations triggered by **inclusive** [Context Source
Registrations]{.HTML-Keyboard} can take place in parallel to local operations.
When retrieving Entities, the algorithm defined in clause 8.5.3 shall apply in
case of conflict.

Finally, **auxiliary** [Context Source Registrations]{.HTML-Keyboard} only apply
during context information consumption operations, and any data retrieved from a
distributed operation associated with an **auxiliary** [Context Source
Registration]{.HTML-Keyboard} shall only be added to the payload where no
matching data has been received from all previously encountered [Context
Sources]{.HTML-Keyboard}, so that the possibility of data retrieval from local
and all other matching distributed [Context Sources]{.HTML-Keyboard} has been
exhausted.

## 9.4 Matching Context Source registrations
## 9.4 Matching Context Source registrations


When querying [Context Source Registrations]{.HTML-Keyboard} as described in
When querying [Context Source Registrations]{.HTML-Keyboard} as described in
+1 −1

File changed.

Contains only whitespace changes.

Loading