diff --git a/NGSI-LD Merge-Patch and Put.postman_collection.json b/NGSI-LD Merge-Patch and Put.postman_collection.json index 11de5ec..5564d53 100644 --- a/NGSI-LD Merge-Patch and Put.postman_collection.json +++ b/NGSI-LD Merge-Patch and Put.postman_collection.json @@ -116,7 +116,7 @@ }, { "key": "Link", - "value": "<{{ngsi-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", + "value": "<{{user-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", "type": "text" }, { @@ -157,7 +157,7 @@ }, { "key": "Link", - "value": "<{{ngsi-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", + "value": "<{{user-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", "type": "text" } ], @@ -192,7 +192,7 @@ }, { "key": "Link", - "value": "<{{ngsi-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", + "value": "<{{user-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", "type": "text" } ], @@ -223,7 +223,7 @@ "header": [ { "key": "Link", - "value": "<{{ngsi-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", + "value": "<{{user-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", "type": "text" }, { @@ -269,7 +269,7 @@ "header": [ { "key": "Link", - "value": "<{{ngsi-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", + "value": "<{{user-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", "type": "text" }, { @@ -321,7 +321,7 @@ "header": [ { "key": "Link", - "value": "<{{ngsi-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", + "value": "<{{user-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", "type": "text" }, { @@ -377,7 +377,7 @@ "header": [ { "key": "Link", - "value": "<{{ngsi-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", + "value": "<{{user-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", "type": "text" } ], @@ -430,7 +430,7 @@ "header": [ { "key": "Link", - "value": "<{{ngsi-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", + "value": "<{{user-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", "type": "text" } ], @@ -483,7 +483,7 @@ "header": [ { "key": "Link", - "value": "<{{ngsi-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", + "value": "<{{user-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", "type": "text" } ], @@ -536,7 +536,7 @@ "header": [ { "key": "Link", - "value": "<{{ngsi-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", + "value": "<{{user-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", "type": "text" } ], @@ -584,7 +584,7 @@ "header": [ { "key": "Link", - "value": "<{{ngsi-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", + "value": "<{{user-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", "type": "text" } ], @@ -636,7 +636,7 @@ "header": [ { "key": "Link", - "value": "<{{ngsi-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", + "value": "<{{user-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", "type": "text" } ], @@ -692,7 +692,7 @@ "header": [ { "key": "Link", - "value": "<{{ngsi-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", + "value": "<{{user-context.jsonld}}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"", "type": "text" } ], @@ -775,6 +775,11 @@ "value": "http://context/ngsi-context.jsonld", "type": "string" }, + { + "key": "user-context.jsonld", + "value": "http://context/user-context.jsonld", + "type": "string" + }, { "key": "json-context.jsonld", "value": "http://context/json-context.jsonld", diff --git a/README.ja.md b/README.ja.md index cb28882..9963c40 100644 --- a/README.ja.md +++ b/README.ja.md @@ -423,7 +423,7 @@ Content-Length: ```console curl -L -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' ``` @@ -480,7 +480,7 @@ curl -L -X GET \ ```console curl -L -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:002' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'options=concise' ``` @@ -537,7 +537,7 @@ curl -L -X GET \ ```console curl -L -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ --data-raw '{ "temperature": { @@ -562,7 +562,7 @@ curl -L -X PATCH \ ```console curl -L -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ --data-raw '{ "temperature": 20, @@ -583,7 +583,7 @@ _Properties_ と、`unitCode` や `observedAt` などの _Properties of Properti ```console curl -L -X GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' ``` @@ -651,7 +651,7 @@ _Property of a Property_ が挿入されています。 ```console curl -L -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ --data-raw '{ "temperature": { @@ -672,7 +672,7 @@ curl -L -X PATCH \ ```console curl -L -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ --data-raw '{ "temperature": { @@ -694,7 +694,7 @@ curl -L -X PATCH \ ```console curl -G -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'attrs=temperature' \ ``` @@ -733,7 +733,7 @@ curl -G -X GET \ ```console curl -L -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:002' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ --data-raw '{ "humidity": 80, @@ -757,7 +757,7 @@ curl -L -X PATCH \ ```console curl -G -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:002' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'options=concise' ``` @@ -821,7 +821,7 @@ _Property of a Property_ がメタデータ属性であることを示してい ```console curl -L -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ --data-raw '{ "address": { @@ -841,7 +841,7 @@ curl -L -X PATCH \ ```console curl -G -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'attrs=address' \ ``` @@ -884,7 +884,7 @@ Merge-Patch は、キー・バリュー形式を使用して `values` を更新 ```console curl -G -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -d 'options=keyValues' \ -H 'Content-Type: application/json' \ --data-raw '{ @@ -912,7 +912,7 @@ curl -G -X PATCH \ ```console curl -G -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'attrs=address,temperature,location,runBy' \ ``` @@ -967,7 +967,7 @@ curl -G -X GET \ ```console curl -G -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ -d 'options=keyValues' \ -d 'observedAt=2022-10-10T10:10:00.000Z' \ @@ -991,7 +991,7 @@ curl -G -X PATCH \ ```console curl -G -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'attrs=temperature,location' \ ``` @@ -1033,7 +1033,7 @@ curl -G -X GET \ ```console curl -G -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ -d 'options=keyValues' \ -d 'lang=en' @@ -1049,7 +1049,7 @@ curl -G -X PATCH \ ```console curl -G -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'options=keyValues' \ -d 'attrs=temperature,population,name' @@ -1101,7 +1101,7 @@ curl -G -X GET \ curl -G -X PUT \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:002' \ -H 'Content-Type: application/json' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ --data-raw '{ "type": "City", @@ -1138,7 +1138,7 @@ curl -G -X PUT \ curl -G -X PUT \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:002' \ -H 'Content-Type: application/json' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ --data-raw '{ "type": "City", diff --git a/README.md b/README.md index 4d290e4..5fdaa4b 100644 --- a/README.md +++ b/README.md @@ -411,7 +411,7 @@ the entities have changed after each operation. ```console curl -L -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' ``` @@ -468,7 +468,7 @@ curl -L -X GET \ ```console curl -L -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:002' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'options=concise' ``` @@ -523,7 +523,7 @@ normalized format, but concise format is also supported: ```console curl -L -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ --data-raw '{ "temperature": { @@ -548,7 +548,7 @@ curl -L -X PATCH \ ```console curl -L -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ --data-raw '{ "temperature": 20, @@ -569,7 +569,7 @@ _Properties_ and _Properties of Properties_ such as `unitCode` and `observedAt` ```console curl -L -X GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' ``` @@ -635,7 +635,7 @@ a concise _Relationship_ or a _LanguageProperty_ include `object` or `languageMa ```console curl -L -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ --data-raw '{ "temperature": { @@ -656,7 +656,7 @@ curl -L -X PATCH \ ```console curl -L -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ --data-raw '{ "temperature": { @@ -678,7 +678,7 @@ _Property of a Property_ has been inserted. ```console curl -G -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'attrs=temperature' \ ``` @@ -716,7 +716,7 @@ simultaneously. ```console curl -L -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:002' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ --data-raw '{ "humidity": 80, @@ -740,7 +740,7 @@ _Property_ has been inserted and the `name` updated. ```console curl -G -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:002' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'options=concise' ``` @@ -802,7 +802,7 @@ be updated and that `verified` the _Property of a Property_ is a metadata attrib ```console curl -L -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ --data-raw '{ "address": { @@ -822,7 +822,7 @@ Once again retrieving the `urn:ngsi-ld:City:001`, you can see that the `address` ```console curl -G -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'attrs=address' \ ``` @@ -863,7 +863,7 @@ broker. ```console curl -G -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -d 'options=keyValues' \ -H 'Content-Type: application/json' \ --data-raw '{ @@ -892,7 +892,7 @@ changed. ```console curl -G -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'attrs=address,temperature,location,runBy' \ ``` @@ -945,7 +945,7 @@ The following example updates both the location and temperature attributes ```console curl -G -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ -d 'options=keyValues' \ -d 'observedAt=2022-10-10T10:10:00.000Z' \ @@ -969,7 +969,7 @@ time the timestamp has also changed. ```console curl -G -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'attrs=temperature,location' \ ``` @@ -1010,7 +1010,7 @@ support entities with LanguageProperties, it is necessary to be able to merge a ```console curl -G -X PATCH \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Content-Type: application/json' \ -d 'options=keyValues' \ -d 'lang=en' @@ -1026,7 +1026,7 @@ curl -G -X PATCH \ ```console curl -G -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/json' \ -d 'options=keyValues' \ -d 'attrs=temperature,population,name' @@ -1077,7 +1077,7 @@ As usual, both normalized and concise formats are supported. curl -G -X PUT \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:002' \ -H 'Content-Type: application/json' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ --data-raw '{ "type": "City", @@ -1114,7 +1114,7 @@ curl -G -X PUT \ curl -G -X PUT \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:002' \ -H 'Content-Type: application/json' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ --data-raw '{ "type": "City", diff --git a/data-models/ngsi-context.jsonld b/data-models/ngsi-context.jsonld index 4b61537..952032a 100644 --- a/data-models/ngsi-context.jsonld +++ b/data-models/ngsi-context.jsonld @@ -1,143 +1,6 @@ { - "@context": { - "type": "@type", - "id": "@id", - "ngsi-ld": "https://uri.etsi.org/ngsi-ld/", - "fiware": "https://uri.fiware.org/ns/dataModels#", - "schema": "https://schema.org/", - "tutorial": "https://ngsi-ld-tutorials.readthedocs.io/en/latest/datamodels.html#", - "Building": "https://uri.fiware.org/ns/dataModels#Building", - "Device": "fiware:Device", - "Animal": "fiware:Animal", - "Female": "schema:Female", - "FillingLevelSensor": "tutorial:FillingLevelSensor", - "Herbicide": "tutorial:Product", - "HVAC": "https://w3id.org/saref#HVAC", - "Male": "schema:Male", - "PartField": "tutorial:PartField", - "Person": "fiware:Person", - "SoilSensor": "tutorial:SoilSensor", - "TemperatureSensor": "tutorial:TemperatureSensor", - "Task": "fiware:Activity", - "Tractor": "tutorial:Tractor", - "Water": "tutorial:Water", - "actuator": "https://w3id.org/saref#actuator", - "additionalName": "schema:additionalName", - "address": "schema:address", - "addressCountry": "schema:addressCountry", - "addressLocality": "schema:addressLocality", - "addressRegion": "schema:addressRegion", - "airPollution": "https://w3id.org/saref#airPollution", - "atmosphericPressure": "https://w3id.org/saref#atmosphericPressure", - "barn": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dbarn", - "batteryLevel": "fiware:batteryLevel", - "category": "fiware:category", - "configuration": "fiware:configuration", - "conservatory": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dconservatory", - "containedInPlace": "fiware:containedInPlace", - "controlledAsset": "fiware:controlledAsset", - "controlledProperty": "fiware:controlledProperty", - "cowshed": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dcowshed", - "dataProvider": "fiware:dataProvider", - "dateCreated": "fiware:dateCreated", - "dateFirstUsed": "fiware:dateFirstUsed", - "dateInstalled": "fiware:dateInstalled", - "dateLastCalibration": "fiware:dateLastCalibration", - "dateLastValueReported": "fiware:dateLastValueReported", - "dateManufactured": "fiware:dateManufactured", - "dateModified": "fiware:dateModified", - "depth": "https://w3id.org/saref#depth", - "description": "ngsi-ld:description", - "deviceState": "fiware:deviceState", - "digester": "https://wiki.openstreetmap.org/wiki/Tag:building%3Ddigester", - "eatingActivity": "https://w3id.org/saref#eatingActivity", - "email": "schema:email", - "endgun": "https://w3id.org/saref#endgun", - "familyName": "schema:familyName", - "farm": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dfarm", - "farm_auxiliary": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dfarm_auxiliary", - "faxNumber": "schema:faxNumber", - "filling": "https://w3id.org/saref#fillingLevel", - "firmwareVersion": "fiware:firmwareVersion", - "floorsAboveGround": "fiware:floorsAboveGround", - "floorsBelowGround": "fiware:floorsBelowGround", - "gender": "schema:gender", - "givenName": "schema:givenName", - "greenhouse": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dgreenhouse", - "hangar": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dhangar", - "hardwareVersion": "fiware:hardwareVersion", - "honorificPrefix": "schema:honorificPrefix", - "honorificSuffix": "schema:honorificSuffix", - "humidity": "https://w3id.org/saref#humidity", - "hut": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dhut", - "implement": "https://w3id.org/saref#implement", - "ipAddress": "fiware:ipAddress", - "irrSection": "https://w3id.org/saref#irrSection", - "irrSystem": "https://w3id.org/saref#irrSystem", - "isicV4": "schema:isicV4", - "jobTitle": "schema:jobTitle", - "location": "https://w3id.org/saref#location", - "macAddress": "fiware:macAddress", - "mcc": "fiware:mcc", - "meter": "https://w3id.org/saref#meter", - "milking": "https://w3id.org/saref#milking", - "mnc": "fiware:mnc", - "motion": "https://w3id.org/saref#motion", - "movementActivity": "https://w3id.org/saref#movementActivity", - "multimedia": "https://w3id.org/saref#multimedia", - "name": "schema:name", - "network": "https://w3id.org/saref#network", - "observedAt": "ngsi-ld:observedAt", - "occupancy": "https://w3id.org/saref#occupancy", - "occupier": "fiware:occupier", - "openingHours": "fiware:openingHours", - "osVersion": "fiware:osVersion", - "owner": "fiware:owner", - "postalCode": "schema:postalCode", - "precipitation": "https://w3id.org/saref#precipitation", - "pressure": "https://w3id.org/saref#pressure", - "providedBy": "fiware:providedBy", - "provider": "fiware:provider", - "refDeviceModel": "fiware:refDeviceModel", - "refMap": "fiware:refMap", - "rssi": "fiware:rssi", - "sensor": "https://w3id.org/saref#sensor", - "serialNumber": "fiware:serialNumber", - "service": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dservice", - "shed": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dshed", - "softwareVersion": "fiware:softwareVersion", - "soilMoisture": "https://w3id.org/saref#soilMoisture", - "solarRadiation": "https://w3id.org/saref#solarRadiation", - "source": "fiware:source", - "stable": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dstable", - "streetAddress": "schema:streetAddress", - "sty": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dsty", - "supportedProtocol": "fiware:supportedProtocol", - "taxID": "schema:taxID", - "telephone": "schema:telephone", - "temperature": "https://w3id.org/saref#temperature", - "transformer_tower": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dtransformer_tower", - "unitCode": "ngsi-ld:unitCode", - "value": "fiware:value", - "vatID": "schema:vatID", - "waterConsumption": "https://w3id.org/saref#waterConsumption", - "water_tower": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dwater_tower", - "weatherConditions": "https://w3id.org/saref#weatherConditions", - "weight": "https://w3id.org/saref#weight", - "windDirection": "https://w3id.org/saref#windDirection", - "windSpeed": "https://w3id.org/saref#windSpeed", - "status": "https://saref.etsi.org/core/status", - "state": "https://saref.etsi.org/core/hasState", - "heartRate": "https://purl.bioontology.org/ontology/MESH/D006339", - "product": "fiware:refObject", - "worker": "fiware:refAgent", - "field": "fiware:refTarget", - - "on": "https://w3id.org/saref#on", - "off": "https://w3id.org/saref#off", - "verified": "fiware:verified", - "species": "fiware:species", - "sex": "fiware:sex", - "legalID": "fiware:legalID" - } -} + "@context": [ + "http://context/user-context.jsonld", + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld" + ] +} \ No newline at end of file diff --git a/data-models/user-context.jsonld b/data-models/user-context.jsonld new file mode 100644 index 0000000..4b61537 --- /dev/null +++ b/data-models/user-context.jsonld @@ -0,0 +1,143 @@ +{ + "@context": { + "type": "@type", + "id": "@id", + "ngsi-ld": "https://uri.etsi.org/ngsi-ld/", + "fiware": "https://uri.fiware.org/ns/dataModels#", + "schema": "https://schema.org/", + "tutorial": "https://ngsi-ld-tutorials.readthedocs.io/en/latest/datamodels.html#", + "Building": "https://uri.fiware.org/ns/dataModels#Building", + "Device": "fiware:Device", + "Animal": "fiware:Animal", + "Female": "schema:Female", + "FillingLevelSensor": "tutorial:FillingLevelSensor", + "Herbicide": "tutorial:Product", + "HVAC": "https://w3id.org/saref#HVAC", + "Male": "schema:Male", + "PartField": "tutorial:PartField", + "Person": "fiware:Person", + "SoilSensor": "tutorial:SoilSensor", + "TemperatureSensor": "tutorial:TemperatureSensor", + "Task": "fiware:Activity", + "Tractor": "tutorial:Tractor", + "Water": "tutorial:Water", + "actuator": "https://w3id.org/saref#actuator", + "additionalName": "schema:additionalName", + "address": "schema:address", + "addressCountry": "schema:addressCountry", + "addressLocality": "schema:addressLocality", + "addressRegion": "schema:addressRegion", + "airPollution": "https://w3id.org/saref#airPollution", + "atmosphericPressure": "https://w3id.org/saref#atmosphericPressure", + "barn": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dbarn", + "batteryLevel": "fiware:batteryLevel", + "category": "fiware:category", + "configuration": "fiware:configuration", + "conservatory": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dconservatory", + "containedInPlace": "fiware:containedInPlace", + "controlledAsset": "fiware:controlledAsset", + "controlledProperty": "fiware:controlledProperty", + "cowshed": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dcowshed", + "dataProvider": "fiware:dataProvider", + "dateCreated": "fiware:dateCreated", + "dateFirstUsed": "fiware:dateFirstUsed", + "dateInstalled": "fiware:dateInstalled", + "dateLastCalibration": "fiware:dateLastCalibration", + "dateLastValueReported": "fiware:dateLastValueReported", + "dateManufactured": "fiware:dateManufactured", + "dateModified": "fiware:dateModified", + "depth": "https://w3id.org/saref#depth", + "description": "ngsi-ld:description", + "deviceState": "fiware:deviceState", + "digester": "https://wiki.openstreetmap.org/wiki/Tag:building%3Ddigester", + "eatingActivity": "https://w3id.org/saref#eatingActivity", + "email": "schema:email", + "endgun": "https://w3id.org/saref#endgun", + "familyName": "schema:familyName", + "farm": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dfarm", + "farm_auxiliary": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dfarm_auxiliary", + "faxNumber": "schema:faxNumber", + "filling": "https://w3id.org/saref#fillingLevel", + "firmwareVersion": "fiware:firmwareVersion", + "floorsAboveGround": "fiware:floorsAboveGround", + "floorsBelowGround": "fiware:floorsBelowGround", + "gender": "schema:gender", + "givenName": "schema:givenName", + "greenhouse": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dgreenhouse", + "hangar": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dhangar", + "hardwareVersion": "fiware:hardwareVersion", + "honorificPrefix": "schema:honorificPrefix", + "honorificSuffix": "schema:honorificSuffix", + "humidity": "https://w3id.org/saref#humidity", + "hut": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dhut", + "implement": "https://w3id.org/saref#implement", + "ipAddress": "fiware:ipAddress", + "irrSection": "https://w3id.org/saref#irrSection", + "irrSystem": "https://w3id.org/saref#irrSystem", + "isicV4": "schema:isicV4", + "jobTitle": "schema:jobTitle", + "location": "https://w3id.org/saref#location", + "macAddress": "fiware:macAddress", + "mcc": "fiware:mcc", + "meter": "https://w3id.org/saref#meter", + "milking": "https://w3id.org/saref#milking", + "mnc": "fiware:mnc", + "motion": "https://w3id.org/saref#motion", + "movementActivity": "https://w3id.org/saref#movementActivity", + "multimedia": "https://w3id.org/saref#multimedia", + "name": "schema:name", + "network": "https://w3id.org/saref#network", + "observedAt": "ngsi-ld:observedAt", + "occupancy": "https://w3id.org/saref#occupancy", + "occupier": "fiware:occupier", + "openingHours": "fiware:openingHours", + "osVersion": "fiware:osVersion", + "owner": "fiware:owner", + "postalCode": "schema:postalCode", + "precipitation": "https://w3id.org/saref#precipitation", + "pressure": "https://w3id.org/saref#pressure", + "providedBy": "fiware:providedBy", + "provider": "fiware:provider", + "refDeviceModel": "fiware:refDeviceModel", + "refMap": "fiware:refMap", + "rssi": "fiware:rssi", + "sensor": "https://w3id.org/saref#sensor", + "serialNumber": "fiware:serialNumber", + "service": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dservice", + "shed": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dshed", + "softwareVersion": "fiware:softwareVersion", + "soilMoisture": "https://w3id.org/saref#soilMoisture", + "solarRadiation": "https://w3id.org/saref#solarRadiation", + "source": "fiware:source", + "stable": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dstable", + "streetAddress": "schema:streetAddress", + "sty": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dsty", + "supportedProtocol": "fiware:supportedProtocol", + "taxID": "schema:taxID", + "telephone": "schema:telephone", + "temperature": "https://w3id.org/saref#temperature", + "transformer_tower": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dtransformer_tower", + "unitCode": "ngsi-ld:unitCode", + "value": "fiware:value", + "vatID": "schema:vatID", + "waterConsumption": "https://w3id.org/saref#waterConsumption", + "water_tower": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dwater_tower", + "weatherConditions": "https://w3id.org/saref#weatherConditions", + "weight": "https://w3id.org/saref#weight", + "windDirection": "https://w3id.org/saref#windDirection", + "windSpeed": "https://w3id.org/saref#windSpeed", + "status": "https://saref.etsi.org/core/status", + "state": "https://saref.etsi.org/core/hasState", + "heartRate": "https://purl.bioontology.org/ontology/MESH/D006339", + "product": "fiware:refObject", + "worker": "fiware:refAgent", + "field": "fiware:refTarget", + + "on": "https://w3id.org/saref#on", + "off": "https://w3id.org/saref#off", + "verified": "fiware:verified", + "species": "fiware:species", + "sex": "fiware:sex", + "legalID": "fiware:legalID" + } +} diff --git a/docker-compose/common.yml b/docker-compose/common.yml index 818fb89..f9b06ac 100644 --- a/docker-compose/common.yml +++ b/docker-compose/common.yml @@ -34,7 +34,7 @@ services: target: /usr/local/apache2/conf/mime.types read_only: true healthcheck: - test: (wget --server-response --spider --quiet http://ld-context/ngsi-context.jsonld 2>&1 | awk 'NR==1{print $$2}'| grep -q -e "200") || exit 1 + test: (wget --server-response --spider --quiet http://context/user-context.jsonld 2>&1 | awk 'NR==1{print $$2}'| grep -q -e "200") || exit 1 # Databases mongo-db: diff --git a/services b/services index ff2d32e..9b53686 100755 --- a/services +++ b/services @@ -19,7 +19,7 @@ STELLIO="http://stellio:8080/actuator/health" SCORPIO="http://scorpio:9090/scorpio/" ORION="http://orion:1026/version" STELLIO="http://localhost:8080/actuator/health" -CONTEXT="http://context/ngsi-context.jsonld" +CONTEXT="http://context/user-context.jsonld" CORE_CONTEXT="https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld" dockerCmd="docker compose" @@ -147,7 +147,7 @@ loadData () { docker run --rm -v $(pwd)/import-data:/import-data \ --network fiware_default \ -e CONTEXT_BROKER=${CONTEXT_BROKER} \ - -e TUTORIAL_DATA_MODELS_CONTEXT="http://context/ngsi-context.jsonld" \ + -e TUTORIAL_DATA_MODELS_CONTEXT="http://context/user-context.jsonld" \ --entrypoint /bin/ash quay.io/curl/curl:${CURL_VERSION} /import-data echo "" }