Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: extend JSON-LD context and update examples #139

Merged
merged 3 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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