Skip to content

Commit

Permalink
Open it context v4 (#229)
Browse files Browse the repository at this point in the history
* feat: added givenBy, givenTo & opensGate which are all relationships

* feat: updated authorization payload & organized alphabetically

* refactor: organized alphabetically

* feat: updated key payload with opensGate

* refactor: organized gate payload alphabetically
  • Loading branch information
JDFleury authored Sep 12, 2024
1 parent 8cd4134 commit d58e9fb
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 33 deletions.
3 changes: 3 additions & 0 deletions openIt/jsonld-contexts/openIt.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
"Key": "https://vocab.egm.io/Key",
"codes": "https://vocab.egm.io/codes",
"forGate": "https://vocab.egm.io/forGate",
"givenBy": "https://vocab.egm.io/givenBy",
"givenTo": "https://vocab.egm.io/givenTo",
"initDate": "https://vocab.egm.io/initDate",
"keyNumber": "https://vocab.egm.io/keyNumber",
"name": "https://schema.org/name",
"opensGate": "https://vocab.egm.io/opensGate",
"period": "https://vocab.egm.io/period",
"rotationPeriod": "https://vocab.egm.io/rotationPeriod",
"usesKey": "https://vocab.egm.io/usesKey",
Expand Down
50 changes: 29 additions & 21 deletions openIt/ngsild-payloads/authorization.jsonld
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
{
"id": "urn:ngsi-ld:Authorization:01",
"type": "Authorization",
"validationStatus": {
"type": "Property",
"value": "accepted"
},
"period": {
"type": "JsonProperty",
"json": {
"startDate": "2024-09-01T11:00:00.000Z",
"endDate": "2024-09-02T11:00:00.000Z"
}
},
"forGate": {
"type": "Relationship",
"object": "urn:ngsi-ld:Gate:123"
},
"usesKey": {
"type": "Relationship",
"object": "urn:ngsi-ld:Key:123",
"datesetId": "urn:ngsi-ld:Dataset:Key123"
},
"codes": [
{
"type": "Property",
Expand Down Expand Up @@ -61,5 +41,33 @@
"value": "2024-08-30T11:00:00.000Z"
}
}
]
],
"forGate": {
"type": "Relationship",
"object": "urn:ngsi-ld:Gate:123"
},
"givenBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:UserProfile:123"
},
"givenTo": {
"type": "Relationship",
"object": "urn:ngsi-ld:UserProfile:ABC"
},
"period": {
"type": "JsonProperty",
"json": {
"startDate": "2024-09-01T11:00:00.000Z",
"endDate": "2024-09-02T11:00:00.000Z"
}
},
"usesKey": {
"type": "Relationship",
"object": "urn:ngsi-ld:Key:123",
"datesetId": "urn:ngsi-ld:Dataset:Key123"
},
"validationStatus": {
"type": "Property",
"value": "accepted"
}
}
8 changes: 4 additions & 4 deletions openIt/ngsild-payloads/gate.jsonld
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"id": "urn:ngsi-ld:Gate:AwesomeGateName",
"type": "Gate",
"name": {
"type": "Property",
"value": "AwesomeGateName"
},
"location": {
"type": "GeoProperty",
"value": {
Expand All @@ -14,5 +10,9 @@
1.5
]
}
},
"name": {
"type": "Property",
"value": "AwesomeGateName"
}
}
20 changes: 12 additions & 8 deletions openIt/ngsild-payloads/key.jsonld
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
{
"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"
},
"keyNumber": {
"type": "Property",
"value": "001"
},
"name": {
"type": "Property",
"value": "AwesomeKeyName"
},
"opensGate": {
"type": "Relationship",
"object": "urn:ngsi-ld:Gate:AwesomeGateName"
},
"rotationPeriod": {
"type": "Property",
"value": "P1D"
}
}

0 comments on commit d58e9fb

Please sign in to comment.