Skip to content

Commit

Permalink
feat: extend JSON-LD context and update examples (#139)
Browse files Browse the repository at this point in the history
* Extended JSON-LD context

* Updated examples and @context references

* Reverted context link from Github raw to w3id
  • Loading branch information
mkollenstart authored Sep 14, 2023
1 parent d640f80 commit 68a89d9
Show file tree
Hide file tree
Showing 14 changed files with 391 additions and 316 deletions.
6 changes: 4 additions & 2 deletions catalog/message/catalog-error.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"@type": "dspace:CatalogError",
"dspace:code": "123:A",
"dspace:reason": [
{ "@value": "Catalog not provisioned for this requester.", "@language": "en" },
{ "some": "other reason"}
{
"@value": "Catalog not provisioned for this requester.",
"@language": "en"
}
]
}
8 changes: 5 additions & 3 deletions catalog/message/catalog-request-message.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@type": "dspace:CatalogRequestMessage",
"dspace:filter": {}
}
"dspace:filter": [
{}
]
}
54 changes: 25 additions & 29 deletions catalog/message/catalog.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@id": "urn:uuid:3afeadd8-ed2d-569e-d634-8394a8836d57",
"@type": "dcat:Catalog",
"dct:title": "Data Provider A Catalog",
"dct:description": "A catalog of data items",
"dct:description": [
"A catalog of data items"
],
"dct:publisher": "Data Provider A",
"dcat:keyword": [
"traffic", "government"
"traffic",
"government"
],
"dcat:service": [
{
Expand All @@ -21,44 +24,37 @@
"@id": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88",
"@type": "dcat:Dataset",
"dct:title": "Traffic Data",
"dct:description": "Traffic data sample extract",
"dct:description": [
"Traffic data sample extract"
],
"dcat:keyword": [
"traffic"
],
"odrl:hasPolicy": [
"odrl:hasPolicy": [
{
"@context": {
"@vocab": "https://www.w3.org/TR/odrl-model/"
},
"@id": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a88",
"permission": [
"odrl:permission": [
{
"action": "use",
"constraint": [
"odrl:action": "odrl:use",
"odrl:constraint": [
{
"leftOperand": {
"@value": "spatial"
},
"rightOperand": {
"@value": "EU"
},
"operator": "EQ"
"odrl:leftOperand": "odrl:spatial",
"odrl:operator": "odrl:EQ",
"odrl:rightOperand": "odrl:EU"
}
],
"duty": []
"odrl:duty": []
}
],
"prohibition": [],
"obligation": []
"odrl:prohibition": [],
"odrl:obligation": []
}
],
"dcat:distribution": [
{
"@type": "dcat:Distribution",
"dct:format": "dspace:s3+push",
"dcat:accessService": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77"
}
]
"dcat:distribution": {
"@type": "dcat:Distribution",
"dct:format": "dspace:s3+push",
"dcat:accessService": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77"
}
}
]
}
}
27 changes: 10 additions & 17 deletions catalog/message/dataset.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@context": "https://w3id.org/dspace/1/0/context.json",
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@id": "urn:uuid:3afeadd8-ed2d-569e-d634-8394a8836d57",
"@type": "dcat:Dataset",
"dct:title": "Traffic Data",
Expand All @@ -9,29 +9,22 @@
],
"odrl:hasPolicy": [
{
"@context": {
"@vocab": "https://www.w3.org/TR/odrl-model/"
},
"@id": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a88",
"permission": [
"odrl:permission": [
{
"action": "use",
"constraint": [
"odrl:action": "odrl:use",
"odrl:constraint": [
{
"leftOperand": {
"@value": "spatial"
},
"rightOperand": {
"@value": "EU"
},
"operator": "EQ"
"odrl:leftOperand": "odrl:spatial",
"odrl:operator": "odrl:EQ",
"odrl:rightOperand": "odrl:EU"
}
],
"duty": []
"odrl:duty": []
}
],
"prohibition": [],
"obligation": []
"odrl:prohibition": [],
"odrl:obligation": []
}
],
"dcat:distribution": [
Expand Down
136 changes: 77 additions & 59 deletions catalog/message/example/dcat.distribution.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,82 +2,100 @@
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@id": "http://provider.com/catalog1/dataset1/",
"@type": "dcat:Dataset",
"dct:title" : "IDS Dataset #1",
"dct:description": [ {
"dct:title": "IDS Dataset #1",
"dct:description": [
{
"@language": "en",
"@value": "This is the number 1 data asset of the IDS. The consumer must be a TRUST_PLUS certified connector."
}, {
},
{
"@language": "de",
"@value": "Dies ist das Nummer 1 Data Asset im IDS. Der Consumer muss ein TRUST_PLUS zertifizierter Connector sein."
} ],
}
],
"dcat:keyword": [
"high value data",
"example"
"high value data",
"example"
],
"odrl:hasPolicy": [
{
"@type": "odrl:Offer",
"@id": "https://provider.com/edc/offer/1",
"odrl:permission": [ {
"odrl:action": {"@id": "odrl:use"},
"odrl:constraint" : [ {
"@type": "odrl:Offer",
"odrl:permission": [
{
"odrl:action": "odrl:use",
"odrl:constraint": [
{
"odrl:leftOperand": "idsc:SECURITY_LEVEL",
"odrl:operator": "odrl:eq",
"odrl:rightOperand": "idsc:TRUST_SECURITY_PROFILE"
} ]
} ],
"odrl:prohibition": [ {
"odrl:action": {"@id": "odrl:distribute"}
} ]
}
]
}
],
"odrl:prohibition": [
{
"odrl:action": "odrl:distribute"
}
]
}
],
"dcat:distribution": [ {
"dcat:distribution": [
{
"@type": "dcat:Distribution",
"dct:title" : "Distribution#1",
"dct:description": "This is a distribution which provides the data via a HTTP REST API.",
"dct:title": "Distribution#1",
"dct:description": [
"This is a distribution which provides the data via a HTTP REST API."
],
"dcat:keyword": [
"HTTP",
"REST"
"HTTP",
"REST"
],
"dspace:transportType": {
"@id": "dspace:HTTP_REST"
},
"dcat:accessService": [ {
"@type": [ "dcat:DataService", "dspace:NEGOTIATION_SERVICE" ],
"dcat:endpointURL": {
"@type": "xsd:anyURI",
"@value": "https://provider.com/connector/negotiation"
}
}, {
"@type": [ "dcat:DataService", "dspace:TRANSFER_SERVICE" ],
"dcat:endpointURL": {
"@type": "xsd:anyURI",
"@value": "https://provider.com/connector/transfer"
}
} ]
}, {
"dspace:transportType": "dspace:HTTP_REST",
"dcat:accessService": [
{
"@type": [
"dcat:DataService",
"dspace:NEGOTIATION_SERVICE"
],
"dcat:endpointURL": "https://provider.com/connector/negotiation"
},
{
"@type": [
"dcat:DataService",
"dspace:TRANSFER_SERVICE"
],
"dcat:endpointURL": "https://provider.com/connector/transfer"
}
]
},
{
"@type": "dcat:Distribution",
"dct:title" : "Distribution#2",
"dct:description": "This is another distribution using an S3 API.",
"dct:title": "Distribution#2",
"dct:description": [
"This is another distribution using an S3 API."
],
"dcat:keyword": [
"S3",
"public"
"S3",
"public"
],
"dcat:accessService": [
{
"@type": [
"dcat:DataService",
"dspace:NEGOTIATION_SERVICE"
],
"dcat:endpointURL": "https://provider.com/connector/negotiation"
},
{
"@type": [
"dcat:DataService",
"dspace:TRANSFER_SERVICE"
],
"dcat:endpointURL": "https://provider.com/connector/transfer"
}
],
"dspace:transportType": {
"@id": "dspace:S3"
},
"dcat:accessService": [ {
"@type": [ "dcat:DataService", "dspace:NEGOTIATION_SERVICE" ],
"dcat:endpointURL": {
"@type": "xsd:anyURI",
"@value": "https://provider.com/connector/negotiation"
}
}, {
"@type": [ "dcat:DataService", "dspace:TRANSFER_SERVICE" ],
"dcat:endpointURL": {
"@type": "xsd:anyURI",
"@value": "https://provider.com/connector/transfer"
}
} ]
} ]
}
"dspace:transportType": "dspace:S3"
}
]
}
Loading

0 comments on commit 68a89d9

Please sign in to comment.