Skip to content

Commit

Permalink
Switching to user-context
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Jul 10, 2024
1 parent 5ba6c5c commit c565704
Show file tree
Hide file tree
Showing 7 changed files with 168 additions and 158 deletions.
14 changes: 9 additions & 5 deletions FIWARE Working with @context.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
{
"key": "Link",
"type": "text",
"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\""
},
{
"key": "Accept",
Expand Down Expand Up @@ -186,7 +186,7 @@
{
"key": "Link",
"type": "text",
"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\""
}
],
"body": {
Expand Down Expand Up @@ -218,7 +218,7 @@
{
"key": "Link",
"type": "text",
"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\"",
"disabled": true
},
{
Expand Down Expand Up @@ -261,7 +261,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"
}
],
Expand Down Expand Up @@ -402,7 +402,7 @@
{
"key": "Link",
"type": "text",
"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\""
},
{
"key": "Accept",
Expand Down Expand Up @@ -621,6 +621,10 @@
"key": "json-context.jsonld",
"value": "http://context/json-context.jsonld"
},
{
"key": "user-context.jsonld",
"value": "http://context/user-context.jsonld"
},
{
"key": "ngsi-context.jsonld",
"value": "http://context/ngsi-context.jsonld"
Expand Down
8 changes: 4 additions & 4 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ Core`@context`が**最後**に処理されるため、以前に同じ `@ id` で
```console
curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entities/' \
-H 'Content-Type: application/json' \
-H 'Link: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-d '{
"id": "urn:ngsi-ld:Building:barn002",
"type": "Building",
Expand Down Expand Up @@ -640,7 +640,7 @@ Link: <http://context/json-context.jsonld>; rel="http://www.w3.org/ns/json-ld#co
```console
curl -L -X GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:farm001' \
-H 'Accept: application/ld+json' \
-H 'Link: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
```

#### レスポンス:
Expand Down Expand Up @@ -711,7 +711,7 @@ Core `@context` が含まれることは常に暗示されることに注意し
```console
curl -G -X GET \
'http://localhost:1026/ngsi-ld/v1/entities' \
-H 'Link: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'Accept: application/ld+json' \
-d 'type=Building' \
-d 'options=keyValues'
Expand Down Expand Up @@ -919,7 +919,7 @@ curl -G -X GET \
```console
curl -G -X GET \
'http://localhost:1026/ngsi-ld/v1/entities/' \
-H 'Link: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'Accept: application/ld+json' \
-d 'type=Building' \
-d 'q=category==%22barn%22,%22farm_auxiliary%22' \
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ Each subsequent entity must have a unique `id` for the given `type`
```console
curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entities/' \
-H 'Content-Type: application/json' \
-H 'Link: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-d '{
"id": "urn:ngsi-ld:Building:barn002",
"type": "Building",
Expand Down Expand Up @@ -642,7 +642,7 @@ the resource in question. In the case of NGSI-LD, the metadata is a file in `app
```console
curl -L -X GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:farm001' \
-H 'Accept: application/ld+json' \
-H 'Link: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
```

#### Response:
Expand Down Expand Up @@ -708,7 +708,7 @@ parameter reduces the response down to standard JSON-LD.
```console
curl -G -X GET \
'http://localhost:1026/ngsi-ld/v1/entities' \
-H 'Link: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'Accept: application/ld+json' \
-d 'type=Building' \
-d 'options=keyValues'
Expand Down Expand Up @@ -898,7 +898,7 @@ done using the `q` parameter, comma separating the acceptable values.
```console
curl -G -X GET \
'http://localhost:1026/ngsi-ld/v1/entities/' \
-H 'Link: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'Accept: application/ld+json' \
-d 'type=Building' \
-d 'q=category==%22barn%22,%22farm_auxiliary%22' \
Expand Down
147 changes: 5 additions & 142 deletions data-models/ngsi-context.jsonld
Original file line number Diff line number Diff line change
@@ -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": "https://schema.org/Female",
"FillingLevelSensor": "tutorial:FillingLevelSensor",
"Herbicide": "tutorial:Product",
"HVAC": "https://w3id.org/saref#HVAC",
"Male": "https://schema.org/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": "https://schema.org/additionalName",
"address": "https://schema.org/address",
"addressCountry": "https://schema.org/addressCountry",
"addressLocality": "https://schema.org/addressLocality",
"addressRegion": "https://schema.org/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": "https://uri.fiware.org/ns/dataModels#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": "https://schema.org/email",
"endgun": "https://w3id.org/saref#endgun",
"familyName": "https://schema.org/familyName",
"farm": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dfarm",
"farm_auxiliary": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dfarm_auxiliary",
"faxNumber": "https://schema.org/faxNumber",
"filling": "https://w3id.org/saref#fillingLevel",
"firmwareVersion": "fiware:firmwareVersion",
"floorsAboveGround": "fiware:floorsAboveGround",
"floorsBelowGround": "fiware:floorsBelowGround",
"gender": "https://schema.org/gender",
"givenName": "https://schema.org/givenName",
"greenhouse": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dgreenhouse",
"hangar": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dhangar",
"hardwareVersion": "fiware:hardwareVersion",
"honorificPrefix": "https://schema.org/honorificPrefix",
"honorificSuffix": "https://schema.org/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": "https://schema.org/isicV4",
"jobTitle": "https://schema.org/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": "https://schema.org/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": "https://schema.org/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": "https://schema.org/streetAddress",
"sty": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dsty",
"supportedProtocol": "fiware:supportedProtocol",
"taxID": "https://schema.org/taxID",
"telephone": "https://schema.org/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": "https://schema.org/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"
]
}
Loading

0 comments on commit c565704

Please sign in to comment.