Commit 0cbbf4fa authored by Jason Fox's avatar Jason Fox
Browse files

Add prettier

parent 6b117cc6
Loading
Loading
Loading
Loading
+18 −10
Original line number Diff line number Diff line
@@ -892,11 +892,15 @@ If the execution of the operation is limited to the local scope (see clause

- At least one of the following input data shall be provided:

  - a. selector of Entity Types;
  - b. list of Attribute names, including at least one non-system Attribute;
  - c. NGSI-LD Query, including at least one non-system Attribute;
  - d. NGSI-LD GeoQuery;
  - e. local scope (see clause 8.6).
<!-- prettier-ignore-start -->

  a. selector of Entity Types;
  b. list of Attribute names, including at least one non-system Attribute;
  c. NGSI-LD Query, including at least one non-system Attribute;
  d. NGSI-LD GeoQuery;
  e. local scope (see clause 8.6).

<!-- prettier-ignore-end -->

- If none of the above is provided, then an error of type
  [BadRequestData]{.HTML-Error}
@@ -1861,11 +1865,15 @@ If the execution of the operation is limited to the local scope (see clause

- At least one of the following input data shall be provided:

  - a. selector of Entity Types;
  - b. list of Attribute names, including at least one non-system Attribute;
  - c. NGSI-LD Query, including at least one non-system Attribute;
  - d. NGSI-LD GeoQuery;
  - e. local scope (see clause 8.6).
<!-- prettier-ignore-start -->

  a. selector of Entity Types;
  b. list of Attribute names, including at least one non-system Attribute;
  c. NGSI-LD Query, including at least one non-system Attribute;
  d. NGSI-LD GeoQuery;
  e. local scope (see clause 8.6).

<!-- prettier-ignore-end -->

- If none of the above is provided, then an error of type
  [BadRequestData]{.HTML-Error}
+8 −4
Original line number Diff line number Diff line
@@ -375,10 +375,14 @@ Attribute names, or implicitly, within an NGSI-LD query or geoquery.
  validation.
- At least one of the following input data shall be provided:

  - a. selector of Entity Types;
  - b. list of Attribute names;
  - c. NGSI-LD Query;
  - d. NGSI-LD GeoQuery.
<!-- prettier-ignore-start -->

  a. selector of Entity Types;
  b. list of Attribute names;
  c. NGSI-LD Query;
  d. NGSI-LD GeoQuery.

<!-- prettier-ignore-edn -->

- If none of them is provided, then an error of type
  [BadRequestData]{.HTML-Error} with a _list of Attribute names_
+25 −12
Original line number Diff line number Diff line
@@ -253,12 +253,19 @@ Clause+++clause-8+++root.6), no further restrictions have to be provided.
### 14.5.4 Behaviour

- At least one of the following input data shall be provided:
  - a. selector of Entity Types;
  - b. list of Attribute names, including at least one non-system Attribute;
  - c. NGSI-LD Query, including at least one non-system Attribute;
  - d. NGSI-LD GeoQuery;
  - e. local scope (see Clause+++clause-8+++root.6). If none of the above is
    provided, then an error of type [BadRequestData]{.HTML-Error}

<!-- prettier-ignore-start -->

  a. selector of Entity Types;
  b. list of Attribute names, including at least one non-system Attribute;
  c. NGSI-LD Query, including at least one non-system Attribute;
  d. NGSI-LD GeoQuery;
  e. local scope (see Clause+++clause-8+++root.6).

  If none of the above is provided, then an error of type [BadRequestData]{.HTML-Error}

<!-- prettier-ignore-start -->

- If the list of Entity identifiers includes a URI which it is not valid, or the
  query, geoquery or context source filter are not syntactically valid (as per
  the referred Clause+++clause-7+++root.2.3 and Clause+++clause-7+++root.2.4) an
@@ -435,12 +442,18 @@ Clause+++clause-8+++root.6), no further restrictions have to be provided.
- If a temporal query is not provided then an error of type
  [BadRequestData]{.HTML-Error} shall be raised.
- At least one of the following input data shall be provided:
  - a. selector of Entity Types;
  - b. list of Attribute names, including at least one non-system Attribute;
  - c. NGSI-LD Query, including at least one non-system Attribute;
  - d. NGSI-LD GeoQuery;
  - e. local scope (see Clause+++clause-8+++root.6). If none of the above is

<!-- prettier-ignore-start -->

  a. selector of Entity Types;
  b. list of Attribute names, including at least one non-system Attribute;
  c. NGSI-LD Query, including at least one non-system Attribute;
  d. NGSI-LD GeoQuery;
  e. local scope (see Clause+++clause-8+++root.6). If none of the above is
     provided, then an error of type [BadRequestData]{.HTML-Error}.

<!-- prettier-ignore-end -->

- If projection attributes or filter conditions indicate the use of [Linked
  Entity]{.HTML-Keyboard} retrieval, an error of type
  [BadRequestData]{.HTML-Error} shall be raised.
+1 −1
Original line number Diff line number Diff line
@@ -1182,7 +1182,7 @@ Scope /Madrid:

Scope /Madrid/Gardens and the whole scope tree below:

``` json
```text
/Madrid/Gardens/#,
/Madrid/Gardens, /Madrid/Gardens/ParqueNorte, /Madrid/Gardens/ParqueNorte/Parterre1, /Madrid/Gardens/ParqueSur
```
+63 −55
Original line number Diff line number Diff line
@@ -69,10 +69,10 @@ data held within it, may belong to an external third party.
For the endpoints served, all registered [Context Sources]{.HTML-Keyboard} shall
support the normalized representation of Entities as default. Support of
additional representation formats is optional and will depend on the
implementation. System generated attributes such as _`modifiedAt`_
and _`createdAt`_ (see Clause+++clause-5+++5.2.4) should be
supported by registered [Context Sources]{.HTML-Keyboard}, at a minimum no error
shall be returned if they are not available when requested.
implementation. System generated attributes such as _`modifiedAt`_ and
_`createdAt`_ (see Clause+++clause-5+++5.2.4) should be supported by registered
[Context Sources]{.HTML-Keyboard}, at a minimum no error shall be returned if
they are not available when requested.

## 9.2 Distributed operation names

@@ -296,11 +296,11 @@ default mode of operation.
An **auxiliary** [Context Source Registration]{.HTML-Keyboard} never overrides
data held directly within a [Context Broker]{.HTML-Keyboard}. Auxiliary
distributed operations are limited to context information consumption operations
(see Clause+++clause-10+++10.4). Context data from auxiliary [Context Sources]{.HTML-Keyboard} is
only included if it is supplementary to the context data otherwise available to
the [Context Broker]{.HTML-Keyboard}. Auxiliary [Context Source
Registrations]{.HTML-Keyboard} are always accepted as there can never be a
conflict.
(see Clause+++clause-10+++10.4). Context data from auxiliary [Context
Sources]{.HTML-Keyboard} is only included if it is supplementary to the context
data otherwise available to the [Context Broker]{.HTML-Keyboard}. Auxiliary
[Context Source Registrations]{.HTML-Keyboard} are always accepted as there can
never be a conflict.

### 9.3.3 Proxied registrations

@@ -361,14 +361,13 @@ Registrations]{.HTML-Keyboard} are the selector of Entity Types (if present),
the list of Entity identifiers (if present), the id pattern (if present) and the
list of Attribute names (if present). In the case of subscriptions to [Context
Source Registrations]{.HTML-Keyboard}, it is the Entities as specified in the
array of type _EntitySelector_ in the Subscription, the
_`watchedAttributes`_ element of the Subscription and the attributes specified
as part of the _NotificationParams_ element of the Subscription.
If the attributes in the _NotificationParams_ element are empty
or not present, the matching is done as if no attribute identifiers have been
specified, otherwise the combination of the _`watchedAttributes`_ and the
attributes in the _NotificationParams_ element are used as the
specified attribute identifiers for the matching.
array of type _EntitySelector_ in the Subscription, the _`watchedAttributes`_
element of the Subscription and the attributes specified as part of the
_NotificationParams_ element of the Subscription. If the attributes in the
_NotificationParams_ element are empty or not present, the matching is done as
if no attribute identifiers have been specified, otherwise the combination of
the _`watchedAttributes`_ and the attributes in the _NotificationParams_ element
are used as the specified attribute identifiers for the matching.

Even though the way relevant Entities are specified differs in queries and
subscriptions, they consist of the same information, so for the purpose of this
@@ -377,8 +376,12 @@ elements for matching, i.e. Entity Types, Entity identifiers, id pattern and
Attribute names. A specification of Entity Types or Attributes shall contain at
least one of:

- a. selector of Entity Types
- b. list of Attribute names.
<!-- prettier-ignore-start -->

a. selector of Entity Types
b. list of Attribute names.

<!-- prettier-ignore-end -->

A specification of Entity Types or Attributes matches a [Context Source
Registration]{.HTML-Keyboard} if at least one of the _RegistrationInfo_ elements
@@ -431,11 +434,12 @@ CSourceRegistration _`contextSourceAlias`_ can be found within the listing of
previously encountered [Context Sources]{.HTML-Keyboard}.

Note that distributed queries (see Clause+++clause-9+++9.6), can be supplied
with an _EntityMap_ (see Clause+++clause-5+++5.2.6.5.5) which lists all Entity ids
successfully matched during a previous request. If the location of an [Entity Map]{.HTML-Keyboard}
is passed into a subsequent request, the retrieved [Entity Map]{.HTML-Keyboard} shall be used in
preference to the matching algorithm described above, provided that the
[Entity Map]{.HTML-Keyboard} is valid and has not expired.
with an _EntityMap_ (see Clause+++clause-5+++5.2.6.5.5) which lists all Entity
ids successfully matched during a previous request. If the location of an
[Entity Map]{.HTML-Keyboard} is passed into a subsequent request, the retrieved
[Entity Map]{.HTML-Keyboard} shall be used in preference to the matching
algorithm described above, provided that the [Entity Map]{.HTML-Keyboard} is
valid and has not expired.

## 9.5 Contacting Context Sources

@@ -712,37 +716,41 @@ other [Context Sources]{.HTML-Keyboard} do not have to be considered.

In the case that a client wishes to indicate to a [Context
Broker]{.HTML-Keyboard} that a request is part of a unitary sequence of
requests, the [Context Broker]{.HTML-Keyboard} shall create and cache an
[Entity Map]{.HTML-Keyboard} for future use and should return the location of said [Entity Map]{.HTML-Keyboard} in a
specific field. The caching strategy and expiry time shall take into account a
suggested expiry time, if present, and depend on implementation specific
configurations. [Context Sources]{.HTML-Keyboard} should indicate that they do
not support [Entity Maps]{.HTML-Keyboard}, through declining to return the location of an [Entity Map]{.HTML-Keyboard}
when requested to do so.
requests, the [Context Broker]{.HTML-Keyboard} shall create and cache an [Entity
Map]{.HTML-Keyboard} for future use and should return the location of said
[Entity Map]{.HTML-Keyboard} in a specific field. The caching strategy and
expiry time shall take into account a suggested expiry time, if present, and
depend on implementation specific configurations. [Context
Sources]{.HTML-Keyboard} should indicate that they do not support [Entity
Maps]{.HTML-Keyboard}, through declining to return the location of an [Entity
Map]{.HTML-Keyboard} when requested to do so.

This Entity mapping is an internal operation, not usually exposed to the end
user, however it is necessary to explicitly define a consistent mechanism for
Entity map creation, caching and retrieval.

A specific field pointing to the location of a cached [Entity Map]{.HTML-Keyboard} (e.g. a custom
header in the response in case of HTTP binding, see [i.24] ~table 7.2.3.1-2)
shall be returned within the response of a query, whenever this is requested by
the client. Similarly, the reuse of a previously created [Entity Map]{.HTML-Keyboard} can be
requested by passing the same specific field into a request.

If a subsequent request references an existent [Entity Map]{.HTML-Keyboard}, it shall be used for
the purposes of Entity registration matching, and queries shall be filtered to
only consider the Entities listed. Subsequent requests referencing an [Entity Map]{.HTML-Keyboard}
shall use the same parameters as in the original request that created the
[Entity Map]{.HTML-Keyboard}, except for the specification of Entity identifiers or parameters
related to pagination, or, in the case of temporal requests, the temporal query.
If an [Entity Map]{.HTML-Keyboard} has expired, or cannot be accessed, no inference can be made as
to which entities are held within the [Context Sources]{.HTML-Keyboard} and a
new one shall be created. An [Entity Map]{.HTML-Keyboard} fixes the Entities to be considered for
subsequent requests based on it. The creating [Context Source]{.HTML-Keyboard}
shall remove Entities from the [Entity Map]{.HTML-Keyboard} that do not match the filters of the
query at the time of processing. Other components shall only be allowed to
update the expiry timestamp of the [Entity Map]{.HTML-Keyboard}, which can optionally be extended
A specific field pointing to the location of a cached [Entity
Map]{.HTML-Keyboard} (e.g. a custom header in the response in case of HTTP
binding, see [i.24] ~table 7.2.3.1-2) shall be returned within the response of a
query, whenever this is requested by the client. Similarly, the reuse of a
previously created [Entity Map]{.HTML-Keyboard} can be requested by passing the
same specific field into a request.

If a subsequent request references an existent [Entity Map]{.HTML-Keyboard}, it
shall be used for the purposes of Entity registration matching, and queries
shall be filtered to only consider the Entities listed. Subsequent requests
referencing an [Entity Map]{.HTML-Keyboard} shall use the same parameters as in
the original request that created the [Entity Map]{.HTML-Keyboard}, except for
the specification of Entity identifiers or parameters related to pagination, or,
in the case of temporal requests, the temporal query. If an [Entity
Map]{.HTML-Keyboard} has expired, or cannot be accessed, no inference can be
made as to which entities are held within the [Context Sources]{.HTML-Keyboard}
and a new one shall be created. An [Entity Map]{.HTML-Keyboard} fixes the
Entities to be considered for subsequent requests based on it. The creating
[Context Source]{.HTML-Keyboard} shall remove Entities from the [Entity
Map]{.HTML-Keyboard} that do not match the filters of the query at the time of
processing. Other components shall only be allowed to update the expiry
timestamp of the [Entity Map]{.HTML-Keyboard}, which can optionally be extended
if the [Context Sources]{.HTML-Keyboard} implementation allows for it.

Since an **exclusive** [Context Source Registration]{.HTML-Keyboard} already
@@ -769,11 +777,11 @@ Broker]{.HTML-Keyboard} implementations should enable configuring a default for
this parameter, so deployments where no split Entities are to be expected can
filter locally and thus be more efficient.

In the case of split Entities, [Entity Maps]{.HTML-Keyboard} initially only store "candidate
Entities" as no filters could be applied, because only a part of the Entity was
available. In the process of pagination, the filters will be (re-)checked. Any
Entity not (or no longer) fulfilling the filter shall be removed from the
[Entity Map]{.HTML-Keyboard}.
In the case of split Entities, [Entity Maps]{.HTML-Keyboard} initially only
store "candidate Entities" as no filters could be applied, because only a part
of the Entity was available. In the process of pagination, the filters will be
(re-)checked. Any Entity not (or no longer) fulfilling the filter shall be
removed from the [Entity Map]{.HTML-Keyboard}.

## 9.7 Limiting cascading distributed operations