From 68a89d9016dde16220c36365bcec19ea1a6a5c92 Mon Sep 17 00:00:00 2001 From: Maarten Kollenstart Date: Thu, 14 Sep 2023 09:14:14 +0200 Subject: [PATCH] feat: extend JSON-LD context and update examples (#139) * Extended JSON-LD context * Updated examples and @context references * Reverted context link from Github raw to w3id --- catalog/message/catalog-error.json | 6 +- catalog/message/catalog-request-message.json | 8 +- catalog/message/catalog.json | 54 +++-- catalog/message/dataset.json | 27 +-- .../example/dcat.distribution.example.json | 136 +++++++----- .../dcat.distribution.example.option1.json | 130 +++++------ .../dcat.distribution.example.option2.json | 208 ++++++++++-------- common/schema/context.json | 38 +++- .../message/contract-agreement-message.json | 17 +- ...ntract-agreement-verification-message.json | 13 +- .../message/contract-negotiation-error.json | 16 +- negotiation/message/contract-negotiation.json | 2 +- ...tract.agreement.message.http.transfer.json | 50 +++-- transfer/message/transfer-process.json | 2 +- 14 files changed, 391 insertions(+), 316 deletions(-) diff --git a/catalog/message/catalog-error.json b/catalog/message/catalog-error.json index d046f7bf..f97e6897 100644 --- a/catalog/message/catalog-error.json +++ b/catalog/message/catalog-error.json @@ -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" + } ] } diff --git a/catalog/message/catalog-request-message.json b/catalog/message/catalog-request-message.json index b3ae388d..69d03397 100644 --- a/catalog/message/catalog-request-message.json +++ b/catalog/message/catalog-request-message.json @@ -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": [ + {} + ] +} \ No newline at end of file diff --git a/catalog/message/catalog.json b/catalog/message/catalog.json index c60b41d5..26c690c2 100644 --- a/catalog/message/catalog.json +++ b/catalog/message/catalog.json @@ -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": [ { @@ -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" + } } ] -} +} \ No newline at end of file diff --git a/catalog/message/dataset.json b/catalog/message/dataset.json index 7795162e..374d3039 100644 --- a/catalog/message/dataset.json +++ b/catalog/message/dataset.json @@ -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", @@ -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": [ diff --git a/catalog/message/example/dcat.distribution.example.json b/catalog/message/example/dcat.distribution.example.json index d8e0380e..4b2fb27f 100644 --- a/catalog/message/example/dcat.distribution.example.json +++ b/catalog/message/example/dcat.distribution.example.json @@ -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" + } + ] + } \ No newline at end of file diff --git a/catalog/message/example/dcat.distribution.example.option1.json b/catalog/message/example/dcat.distribution.example.option1.json index 21aeaec4..a72a93fc 100644 --- a/catalog/message/example/dcat.distribution.example.option1.json +++ b/catalog/message/example/dcat.distribution.example.option1.json @@ -23,68 +23,56 @@ { "@type": "dcat:Distribution", "dct:title": "Distribution#1", - "dct:description": "This is a distribution everyone can see.", + "dct:description": [ + "This is a distribution everyone can see." + ], "dcat:keyword": [ "HTTP", "REST" ], - "dspace:transportType": { - "@id": "dspace:HTTP_REST" - }, + "dspace:transportType": "dspace:HTTP_REST", "dcat:accessService": [ { "@type": [ "dcat:DataService", "dspace:NEGOTIATION_SERVICE" ], - "dcat:endpointURL": { - "@type": "xsd:anyURI", - "@value": "https://provider.com/connector/negotiation" - } + "dcat:endpointURL": "https://provider.com/connector/negotiation" }, { "@type": [ "dcat:DataService", "dspace:TRANSFER_SERVICE" ], - "dcat:endpointURL": { - "@type": "xsd:anyURI", - "@value": "https://provider.com/connector/transfer" - } + "dcat:endpointURL": "https://provider.com/connector/transfer" } ] }, { "@type": "dcat:Distribution", "dct:title": "Distribution#2", - "dct:description": "This is another distribution.", + "dct:description": [ + "This is another distribution." + ], "dcat:keyword": [ "S3", "public" ], - "dspace:transportType": { - "@id": "dspace:S3" - }, + "dspace:transportType": "dspace:S3", "dcat:accessService": [ { "@type": [ "dcat:DataService", "dspace:NEGOTIATION_SERVICE" ], - "dcat:endpointURL": { - "@type": "xsd:anyURI", - "@value": "https://provider.com/connector/negotiation" - } + "dcat:endpointURL": "https://provider.com/connector/negotiation" }, { "@type": [ "dcat:DataService", "dspace:TRANSFER_SERVICE" ], - "dcat:endpointURL": { - "@type": "xsd:anyURI", - "@value": "https://provider.com/connector/transfer" - } + "dcat:endpointURL": "https://provider.com/connector/transfer" } ] } @@ -95,9 +83,7 @@ "@id": "https://provider.com/connector/offer/1", "odrl:permission": [ { - "odrl:action": { - "@id": "odrl:use" - }, + "odrl:action": "odrl:use", "odrl:constraint": [ { "odrl:leftOperand": "idsc:SECURITY_LEVEL", @@ -107,62 +93,60 @@ ], "odrl:duty": [ { - "odrl:action": { - "@id": "odrl:compensate" - }, - "odrl:constraint": { - "odrl:xone": [ - { - "odrl:and": [ - { - "odrl:leftOperand": "dspace:TRANSPORT", - "odrl:operator": "odrl:eq", - "odrl:rightOperand": "dspace:S3" - }, - { - "odrl:leftOperand": "odrl:payAmount", - "odrl:operator": "odrl:eq", - "odrl:rightOperand": { - "@type": "xsd:decimal", - "@value": "5.0" + "odrl:action": "odrl:compensate", + "odrl:constraint": [ + { + "odrl:xone": [ + { + "odrl:and": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": "dspace:S3" }, - "odrl:unit": { - "@id": "http://dbpedia.org/resource/Euro" + { + "odrl:leftOperand": "odrl:payAmount", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": { + "@type": "xsd:decimal", + "@value": "5.0" + }, + "odrl:unit": { + "@id": "http://dbpedia.org/resource/Euro" + } } - } - ] - }, - { - "odrl:and": [ - { - "odrl:leftOperand": "dspace:TRANSPORT", - "odrl:operator": "odrl:eq", - "odrl:rightOperand": "dspace:HTTP_REST" - }, - { - "odrl:leftOperand": "odrl:payAmount", - "odrl:operator": "odrl:eq", - "odrl:rightOperand": { - "@type": "xsd:decimal", - "@value": "2.0" + ] + }, + { + "odrl:and": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": "dspace:HTTP_REST" }, - "odrl:unit": { - "@id": "http://dbpedia.org/resource/Euro" + { + "odrl:leftOperand": "odrl:payAmount", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": { + "@type": "xsd:decimal", + "@value": "2.0" + }, + "odrl:unit": { + "@id": "http://dbpedia.org/resource/Euro" + } } - } - ] - } - ] - } + ] + } + ] + } + ] } ] } ], "odrl:prohibition": [ { - "odrl:action": { - "@id": "odrl:distribute" - } + "odrl:action": "odrl:distribute" } ] } diff --git a/catalog/message/example/dcat.distribution.example.option2.json b/catalog/message/example/dcat.distribution.example.option2.json index 249dd37a..9eeb46fb 100644 --- a/catalog/message/example/dcat.distribution.example.option2.json +++ b/catalog/message/example/dcat.distribution.example.option2.json @@ -2,137 +2,171 @@ "@context": "https://w3id.org/dspace/v0.8/context.json", "@id": "http://provider.com/catalog1/dataset1/", "@type": "dcat:Dataset", - "dct:title" : "IDS Dataset Collection", - "dct:description": [ { + "dct:title": "IDS Dataset Collection", + "dct:description": [ + { "@language": "en", "@value": "This dataset includes all assets which identifiers comply to the pattern 'urn\\:guid\\:[A-F0-9]{8}\\-[A-F0-9]{4}\\-[A-F0-9]{4}\\-[A-F0-9]{4}\\-[A-F0-9]{12}'. A download via an S3 transfer costs 5 EUR, while the HTTP_REST transfer option costs only 2 EUR. The consumer must be a TRUST_PLUS certfified connector. No further distribution is allowed." - }, { + }, + { "@language": "de", "@value": "Dieses Dataset bezeichnet alle Assets, deren Identifier dem Pattern 'urn:guid:[A-F0-9]{8}\\-[A-F0-9]{4}\\-[A-F0-9]{4}\\-[A-F0-9]{4}\\-[A-F0-9]{12}' folgen. Ein Transfer via S3 kostet etwa 5 Euro, wohingegen der Transfer via HTTP_RESt nur mit etwa 2 Euro zu Buche schlägt.. Der Consumer muss ein TRUST_PLUS zertifizierter Connetor sein. Eine Weiterverbreitung ist nicht gestattet." - } ], + } + ], "dcat:keyword": [ - "data space", - "data asset", - "dcat dataset", - "collection" + "data space", + "data asset", + "dcat dataset", + "collection" ], - "dcat:distribution": [ { + "dcat:distribution": [ + { "@type": "dcat:Distribution", - "dct:title" : "Distribution#1", - "dct:description": "This is a distribution everyone can see.", + "dct:title": "Distribution#1", + "dct:description": [ + "This is a distribution everyone can see." + ], "dcat:keyword": [ - "HTTP", - "REST" + "HTTP", + "REST" ], - "dspace:transportType": { - "@id": "dspace:HTTP_REST" - }, + "dspace:transportType": "dspace:HTTP_REST", "odrl:hasPolicy": [ { "@type": "odrl:Offer", "@id": "https://provider.com/edc/offer/1", - "odrl:permission": [ { - "odrl:action": {"@id": "odrl:use"}, - "odrl:constraint" : [ { + "odrl:permission": [ + { + "odrl:action": "odrl:use", + "odrl:constraint": [ + { "odrl:leftOperand": "idsc:SECURITY_LEVEL", "odrl:operator": "odrl:eq", "odrl:rightOperand": "idsc:TRUST_PLUS_SECURITY_PROFILE" - } ], - "odrl:duty": [ { - "odrl:action": {"@id": "odrl:compensate"}, - "odrl:constraint": [ { + } + ], + "odrl:duty": [ + { + "odrl:action": "odrl:compensate", + "odrl:constraint": [ + { "odrl:leftOperand": "dspace:TRANSPORT", "odrl:operator": "odrl:eq", "odrl:rightOperand": "dspace:HTTP_REST" - }, { + }, + { "odrl:leftOperand": "odrl:payAmount", "odrl:operator": "odrl:eq", "odrl:rightOperand": { - "@type": "xsd:decimal", - "@value": "2.0" + "@type": "xsd:decimal", + "@value": "2.0" }, "odrl:unit": { - "@id": "http://dbpedia.org/resource/Euro" + "@id": "http://dbpedia.org/resource/Euro" } - } ] - } ] - } ], - "odrl:prohibition": [ { - "odrl:action": {"@id": "odrl:distribute"} - } ] + } + ] + } + ] + } + ], + "odrl:prohibition": [ + { + "odrl:action": "odrl:distribute" + } + ] } ], - "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" - } - } ] - }, { + "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.", + "dct:description": [ + "This is another distribution." + ], + "dct:title": "Distribution#2", + "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" + } + ], "dcat:keyword": [ - "S3", - "public" + "S3", + "public" ], - "dspace:transportType": { - "@id": "dspace:S3" - }, "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_PLUS_SECURITY_PROFILE" - } ], - "odrl:duty": [ { - "odrl:action": {"@id": "odrl:compensate"}, - "odrl:constraint": [ { + } + ], + "odrl:duty": [ + { + "odrl:action": "odrl:compensate", + "odrl:constraint": [ + { "odrl:leftOperand": "dspace:TRANSPORT", "odrl:operator": "odrl:eq", "odrl:rightOperand": "dspace:S3" - }, { + }, + { "odrl:leftOperand": "odrl:payAmount", "odrl:operator": "odrl:eq", "odrl:rightOperand": { - "@type": "xsd:decimal", - "@value": "5.0" + "@type": "xsd:decimal", + "@value": "5.0" }, "odrl:unit": { - "@id": "http://dbpedia.org/resource/Euro" + "@id": "http://dbpedia.org/resource/Euro" } - } ] - } ] - } ], - "odrl:prohibition": [ { - "odrl:action": {"@id": "odrl:distribute"} - } ] + } + ] + } + ] + } + ], + "odrl:prohibition": [ + { + "odrl:action": "odrl:distribute" + } + ] } ], - "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" + } + ] + } \ No newline at end of file diff --git a/common/schema/context.json b/common/schema/context.json index 2a1c0a64..3720aea8 100644 --- a/common/schema/context.json +++ b/common/schema/context.json @@ -1,11 +1,45 @@ { "@context": { - "dspace": "https://w3id.org/dspace/v0.8/", "odrl": "http://www.w3.org/ns/odrl/2/", "xsd": "http://www.w3.org/2001/XMLSchema#", "cred": "https://www.w3.org/2018/credentials#", "sec": "https://w3id.org/security#", "dct": "http://purl.org/dc/terms/", - "dcat": "http://www.w3.org/ns/dcat#" + "dcat": "http://www.w3.org/ns/dcat#", + "dspace": "https://w3id.org/dspace/v0.8/", + "dct:title": { "@language": "en" }, + "dspace:timestamp": { "@type": "xsd:dateTime" }, + "dct:issued": { "@type": "xsd:dateTime" }, + "dct:modified": { "@type": "xsd:dateTime" }, + "dct:created": { "@type": "xsd:dateTime" }, + "dcat:byteSize": { "@type": "xsd:decimal" }, + "dcat:endpointURL": { "@type": "xsd:anyURI" }, + "dspace:agreementId": { "@type": "@id" }, + "dspace:dataset": { "@type": "@id" }, + "dspace:transportType": { "@type": "@id" }, + "dspace:state": { "@type": "@id" }, + "dct:publisher": { "@type": "@id" }, + "dct:format": { "@type": "@id" }, + "dct:type": { "@type": "@id" }, + "odrl:assigner": { "@type": "@id" }, + "odrl:assignee": { "@type": "@id" }, + "odrl:action": { "@type": "@id" }, + "odrl:target": { "@type": "@id" }, + "odrl:leftOperand": { "@type": "@id" }, + "odrl:operator": { "@type": "@id" }, + "odrl:rightOperandReference": { "@type": "@id" }, + "odrl:profile": { "@type": "@id" }, + "dspace:reason": { "@container": "@set" }, + "dspace:catalog": { "@container": "@set" }, + "dspace:filter": { "@container": "@set" }, + "dct:description": { "@container": "@set" }, + "dcat:keyword": { "@container": "@set" }, + "dcat:service": { "@container": "@set" }, + "dcat:dataset": { "@container": "@set" }, + "odrl:hasPolicy": { "@container": "@set" }, + "odrl:permission": { "@container": "@set" }, + "odrl:prohibition": { "@container": "@set" }, + "odrl:duty": { "@container": "@set" }, + "odrl:constraint": { "@container": "@set" } } } \ No newline at end of file diff --git a/negotiation/message/contract-agreement-message.json b/negotiation/message/contract-agreement-message.json index e4c37681..326a19ea 100644 --- a/negotiation/message/contract-agreement-message.json +++ b/negotiation/message/contract-agreement-message.json @@ -3,18 +3,15 @@ "@type": "dspace:ContractAgreementMessage", "dspace:processId": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", "dspace:agreement": { - "@type": "odrl:Agreement", "@id": "e8dc8655-44c2-46ef-b701-4cffdc2faa44", - "dspace:timestamp": { - "@value": "2023-01-01T01:00:00Z", - "@type": "xsd:dateTime" - }, + "@type": "odrl:Agreement", "dspace:consumerId": "...", "dspace:providerId": "...", - "odrl:permission": { - ... - } + "dspace:timestamp": "2023-01-01T01:00:00Z", + "odrl:permission": [ + { + ... + } + ] } } - - diff --git a/negotiation/message/contract-agreement-verification-message.json b/negotiation/message/contract-agreement-verification-message.json index c6a652b4..3a4559c1 100644 --- a/negotiation/message/contract-agreement-verification-message.json +++ b/negotiation/message/contract-agreement-verification-message.json @@ -9,18 +9,13 @@ "sec:proof": [ { "@type": "sec:Ed25519Signature2018", - "dct:created": { - "@type": "xsd:dateTime", - "@value": "2022-11-18T12:00:01Z" - }, + "dct:created": "2022-11-18T12:00:01Z", "sec:jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..8YIj2tG6HoiDKw476_ElxcCFiCTr89jHX24Osr1zgklp0Sgfkgx-ipu6Li5og4wtLGMoa7__xJpcHWHzwWZoCQ", "sec:proofPurpose": "assertionMethod" - },{ + }, + { "@type": "sec:Ed25519Signature2018", - "dct:created": { - "@type": "xsd:dateTime", - "@value": "2022-11-18T12:00:01Z" - }, + "dct:created": "2022-11-18T12:00:01Z", "sec:jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..8YIj2tG6HoiDKw476_ElxcCFiCTr89jHX24Osr1zgklp0Sgfkgx-ipu6Li5og4wtLGMoa7__xJpcHWHzwWZoCQ", "sec:proofPurpose": "assertionMethod" } diff --git a/negotiation/message/contract-negotiation-error.json b/negotiation/message/contract-negotiation-error.json index 219cd533..056832aa 100644 --- a/negotiation/message/contract-negotiation-error.json +++ b/negotiation/message/contract-negotiation-error.json @@ -4,11 +4,19 @@ "dspace:processId": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", "dspace:code": "...", "dspace:reason": [ - { "@value": "Catalog not provisioned for this requester.", "@language": "en" }, - { "some": "other reason"} + { + "@value": "Catalog not provisioned for this requester.", + "@language": "en" + } ], "dct:description": [ - { "@language": "en", "@value": "The parsing of the input parameters failed." }, - { "@language": "de", "@value": "Das Lesen der Eingabeparameter schlug fehl." } + { + "@language": "en", + "@value": "The parsing of the input parameters failed." + }, + { + "@language": "de", + "@value": "Das Lesen der Eingabeparameter schlug fehl." + } ] } diff --git a/negotiation/message/contract-negotiation.json b/negotiation/message/contract-negotiation.json index ef791fb4..07b958d8 100644 --- a/negotiation/message/contract-negotiation.json +++ b/negotiation/message/contract-negotiation.json @@ -3,5 +3,5 @@ "@id": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3", "@type": "dspace:ContractNegotiation", "dspace:processId": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3", - "dspace:state": "REQUESTED" + "dspace:state": "dspace:REQUESTED" } diff --git a/negotiation/message/example/contract.agreement.message.http.transfer.json b/negotiation/message/example/contract.agreement.message.http.transfer.json index 3c67f216..7798160d 100644 --- a/negotiation/message/example/contract.agreement.message.http.transfer.json +++ b/negotiation/message/example/contract.agreement.message.http.transfer.json @@ -1,31 +1,43 @@ { "@context": "https://w3id.org/dspace/v0.8/context.json", "@id": "some-id", - "@type": ["dspace:ContractAgreementMessage"], + "@type": "dspace:ContractAgreementMessage", "dspace:processId": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", "dspace:consumerId": "...", "dspace:providerId": "...", "dspace:agreement": { - "@type": "odrl:Agreement", "@id": "some-other-id", - "odrl:target": { "@id": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88" }, - "odrl:permission": { - "@id": "some-permission-id", - "odrl:action": { "@id": "odrl:use" }, - "odrl:constraint": { - "odrl:leftOperand": { "@id": "dspace:TRANSPORT" }, - "odrl:operand": { "@id": "odrl:equals" }, - "oderl:rightOperand": { "@id": "dspace:HTTP_REST" } + "@type": "odrl:Agreement", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:permission": [ + { + "@id": "some-permission-id", + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:equals", + "oderl:rightOperand": { + "@id": "dspace:HTTP_REST" + } + } + ] } - }, - "odrl:duty": { - "@id": "some-permission-id", - "odrl:action": { "@id": "odrl:use" }, - "odrl:constraint": { - "odrl:leftOperand": { "@id": "dspace:TRANSPORT" }, - "odrl:operand": { "@id": "odrl:equals" }, - "oderl:rightOperand": { "@id": "dspace:HTTP_REST" } + ], + "odrl:duty": [ + { + "@id": "some-permission-id", + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:equals", + "oderl:rightOperand": { + "@id": "dspace:HTTP_REST" + } + } + ] } - } + ] } } diff --git a/transfer/message/transfer-process.json b/transfer/message/transfer-process.json index 8cf9c84f..26472bef 100644 --- a/transfer/message/transfer-process.json +++ b/transfer/message/transfer-process.json @@ -3,5 +3,5 @@ "@id": "urn:uuid:71f8dfab-9337-4e9d-a4c7-524e04443f16", "@type": "dspace:TransferProcess", "dspace:processId": "urn:uuid:4a3ad65e-d78a-4200-a666-fc47aec32f2f", - "dspace:state": "REQUESTED" + "dspace:state": "dspace:REQUESTED" }