Skip to content

Commit

Permalink
OpenIt Context (#225)
Browse files Browse the repository at this point in the history
* fix: found a typo in user.jsonld, in particular subscribedToAlerts

* feat: added contexts for authorization, gate & key

* feat: added config examples for authorization, gate & key as well changes to contexts

* feat: added general authorization context & fixed codes into from typo

* fix: renamed payload files to follow correct syntax

* feat: updated context one one file, updated compound & name points to schema.org now

* fix: updated status to validationStatus as status is in core context already

* fix: fixed typo in validityStartDate

* fix: added datasetId key to codes
  • Loading branch information
JDFleury authored Sep 2, 2024
1 parent 27b071b commit 4d1b552
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 5 deletions.
9 changes: 9 additions & 0 deletions openIt/jsonld-contexts/openIt-compound.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"@context": [
"https://easy-global-market.github.io/ngsild-api-data-models/openIt/jsonld-contexts/openIt.jsonld",
"https://easy-global-market.github.io/ngsild-api-data-models/user/user.jsonld",
"https://easy-global-market.github.io/ngsild-api-data-models/device/jsonld-contexts/device.jsonld",
"https://easy-global-market.github.io/ngsild-api-data-models/authorization/jsonld-contexts/authorization.jsonld",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld"
]
}
16 changes: 16 additions & 0 deletions openIt/jsonld-contexts/openIt.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"@context": {
"Authorization": "https://vocab.egm.io/Authorization",
"Gate": "https://vocab.egm.io/Gate",
"Key": "https://vocab.egm.io/Key",
"codes": "https://vocab.egm.io/codes",
"from": "https://vocab.egm.io/from",
"initDate": "https://vocab.egm.io/initDate",
"name": "https://schema.org/name",
"rotationPeriod": "https://vocab.egm.io/rotationPeriod",
"to": "https://vocab.egm.io/to",
"validationStatus": "https://vocab.egm.io/validationStatus",
"validityEndDate": "https://vocab.egm.io/validityEndDate",
"validityStartDate": "https://vocab.egm.io/validityStartDate"
}
}
57 changes: 57 additions & 0 deletions openIt/ngsild-payloads/authorization.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"id": "urn:ngsi-ld:Authorization:01",
"type": "Authorization",
"validationStatus": {
"type": "Property",
"value": "accepted",
"from": {
"type": "Property",
"value": "2024-09-01T11:00:00.000Z"
},
"to": {
"type": "Property",
"value": "2024-09-02T11:00:00.000Z"
}
},
"codes": [
{
"type": "Property",
"value": "1234",
"datasetId": "urn:ngsi-ld:Dataset:1234",
"validityStartDate": {
"type": "Property",
"value": "2024-09-01T11:00:00.000Z"
},
"validityEndDate": {
"type": "Property",
"value": "2024-09-02T11:00:00.000Z"
}
},
{
"type": "Property",
"value": "8931",
"datasetId": "urn:ngsi-ld:Dataset:8931",
"validityStartDate": {
"type": "Property",
"value": "2024-08-30T11:00:00.000Z"
},
"validityEndDate": {
"type": "Property",
"value": "2024-08-31T11:00:00.000Z"
}
},
{
"type": "Property",
"value": "3910",
"datasetId": "urn:ngsi-ld:Dataset:3910",
"validityStartDate": {
"type": "Property",
"value": "2024-08-29T11:00:00.000Z"
},
"validityEndDate": {
"type": "Property",
"value": "2024-08-30T11:00:00.000Z"
}
}
]
}
18 changes: 18 additions & 0 deletions openIt/ngsild-payloads/gate.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"id": "urn:ngsi-ld:Gate:AwesomeGateName",
"type": "Gate",
"name": {
"type": "Property",
"value": "AwesomeGateName"
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [
1.5,
1.5
]
}
}
}
16 changes: 16 additions & 0 deletions openIt/ngsild-payloads/key.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "urn:ngsi-ld:Key:AwesomeKeyName",
"type": "Key",
"name": {
"type": "Property",
"value": "AwesomeKeyName"
},
"rotationPeriod": {
"type": "Property",
"value": "P1D"
},
"initDate": {
"type": "Property",
"value": "2024-09-02T11:00:00.000Z"
}
}
10 changes: 5 additions & 5 deletions user/user.jsonld
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context": {
"UserProfile": "https://smartdatamodels.org/UserProfile",
"subcribedToAlerts": "https://vocab.egm.io/subcribedToAlerts",
"userInfos": "https://vocab.egm.io/userInfos"
}
"@context": {
"UserProfile": "https://smartdatamodels.org/UserProfile",
"subscribedToAlerts": "https://vocab.egm.io/subscribedToAlerts",
"userInfos": "https://vocab.egm.io/userInfos"
}
}

0 comments on commit 4d1b552

Please sign in to comment.