diff --git a/SUMMARY.md b/SUMMARY.md index 4e6492cf..d813100c 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -26,46 +26,46 @@ * [README.md](./README.md) * [SUMMARY.md](./SUMMARY.md) * [Section 1 Terminology and Section 2 Concepts](./model/information.model.md) -* [Figure: Entities and Relationships in Data Space](./model/im.dataspace.relationships.png) -* [Figure (source): Entities and Relationships in Data Space](./model/im.dataspace.relationships.puml) -* [Figure: Entites and relationships to DCAT and ODRL](./model/im.participant.entities.png) -* [Figure (source): Entites and relationships to DCAT and ODRL](./model/im.participant.entities.drawio) +* [Figure: Entities and Relationships in Data Space](./model/m.dataspace.relationships.png) +* [Figure (source): Entities and Relationships in Data Space](./model/m.dataspace.relationships.puml) +* [Figure: Entities and relationships to DCAT and ODRL](./model/m.participant.entities.png) +* [Figure (source): Entities and relationships to DCAT and ODRL](./model/m.participant.entities.drawio) * [Section 3 Catalog protocol](./catalog/catalog.protocol.md) * [Catalog HTTPS Binding](./catalog/catalog.binding.https.md) -* [Example: DCAT Distribtion (json)](./catalog/example/dcat.distribution.example.json) -* [Example: DCAT Distribtion option 1 (json)](./catalog/example/dcat.distribution.example.option1.json) -* [Example: DCAT Distribtion option 2 (json)](./catalog/example/dcat.distribution.example.option2.json) -* [Catalog Error Message (json)](./catalog/message/catalog.error.message.json) -* [Catalog Message (json)](./catalog/message/catalog.message.json) -* [Catalog Request Message (json)](./catalog/message/catalog.request.message.json) +* [Example: DCAT Distribution (json)](./catalog/message/example/dcat.distribution.example.json) +* [Example: DCAT Distribution option 1 (json)](./catalog/message/example/dcat.distribution.example.option1.json) +* [Example: DCAT Distribution option 2 (json)](./catalog/message/example/dcat.distribution.example.option2.json) +* [Catalog Error Message (json)](./catalog/message/catalog-error-message.json) +* [Catalog Message (json)](./catalog/message/catalog.json) +* [Catalog Request Message (json)](./catalog/message/catalog-request-message.json) * [Section 4 Contract Negotiation](./negotiation/contract.negotiation.protocol.md) -* [Contract Negotiaton HTTPS Binding](./negotiation/contract.negotiation.binding.https.md) -* [Figure: Contract Negotation State Machine](./negotiation/contract.negotiation.state.machine.png) -* [Figure (Source): Contract Negotation State Machine](./negotiation/contract.negotiation.state.machine.puml) -* [Contract Agreement Message (json)](./negotiation/message/contract.agreement.message.json) -* [Contract Agreement Verification Message (json)](./negotiation/message/contract.agreement.verification.message.json) -* [Contract Negotiation Error Message (json)](./negotiation/message/contract.negotiation.error.json) -* [Contract Negotiation Event Message (json)](./negotiation/message/contract.negotiation.event.message.json) -* [Contract Negotation Message (json)](./negotiation/message/contract.negotiation.json) -* [Contract Negotiation Termination Message (json)](./negotiation/message/contract.negotiation.termination.message.json) -* [Contract Offer Message (json)](./negotiation/message/contract.offer.message.json) -* [Contract Request Message (json)](./negotiation/message/contract.request.message.json) +* [Contract Negotiation HTTPS Binding](./negotiation/contract.negotiation.binding.https.md) +* [Figure: Contract Negotiation State Machine](./negotiation/contract.negotiation.state.machine.png) +* [Figure (Source): Contract Negotiation State Machine](./negotiation/contract.negotiation.state.machine.puml) +* [Contract Agreement Message (json)](./negotiation/message/contract-agreement-message.json) +* [Contract Agreement Verification Message (json)](./negotiation/message/contract-agreement-verification-message.json) +* [Contract Negotiation Error Message (json)](./negotiation/message/contract-negotiation.json) +* [Contract Negotiation Event Message (json)](./negotiation/message/contract-negotiation-event-message.json) +* [Contract Negotiation Message (json)](./negotiation/message/contract-negotiation.json) +* [Contract Negotiation Termination Message (json)](./negotiation/message/contract-negotiation-termination-message.json) +* [Contract Offer Message (json)](./negotiation/message/contract-offer-message.json) +* [Contract Request Message (json)](./negotiation/message/contract-request-message.json) * [Example: Contract Agreement Message HTTP](./negotiation/message/example/contract.agreement.message.http.transfer.json) * [Section 5 Transfer process](./transfer/transfer.process.protocol.md) * [Transfer process HTTPS Binding](./transfer/transfer.process.binding.https.md) -* [Figure: Transfer Process State Machine](./transfer/transfer.process.state.machine.png) -* [Figure (source): Transfer Process State Machine](./transfer/transfer.process.state.machine.puml) -* [Transfer Completition Message (json)](./transfer/message/transfer.completion.message.json) -* [Transfer Error Message (json)](./transfer/message/transfer.error.json) -* [Transfer Process Message (json)](./transfer/message/transfer.process.json) -* [Transfer Request Message (json)](./transfer/message/transfer.request.message.json) -* [Transfer Start Message (json)](./transfer/message/transfer.start.message.json) -* [Transfer Suspension Message (json)](./transfer/message/transfer.suspension.message.json) -* [Transfer Termination Message (json)](./transfer/message/transfer.termination.message.json) -* [Common Schema (json)](./common/definitions.schema.json) -* [Shape: Contract Agreement Message (ttl)](./schemas/contract-agreement-message-shape.ttl) -* [Shape: Contract Agreement Verification message (ttl)](./schemas/contract-agreement-verification-message-shape.ttl) -* [Shape: Contract Negotation Event Message (ttl)](./schemas/contract-negotiation-event-message-shape.ttl) -* [Shape: Contract Negotation Termination Message (ttl)](./schemas/contract-negotiation-termination-message-shape.ttl) -* [Shape: Contract Request Message (ttl)](./schemas/contract-request-message-shape.ttl) -* [diagram.styles.puml](./diagrams/diagram.styles.puml) +* [Figure: Transfer Process State Machine](./transfer/transfer-process-state-machine.png) +* [Figure (source): Transfer Process State Machine](./transfer/transfer-process-state-machine.puml) +* [Transfer Completion Message (json)](./transfer/message/transfer-completion-message.json) +* [Transfer Error Message (json)](./transfer/message/transfer-error.json) +* [Transfer Process Message (json)](./transfer/message/transfer-process.json) +* [Transfer Request Message (json)](./transfer/message/transfer-request-message.json) +* [Transfer Start Message (json)](./transfer/message/transfer-start-message.json) +* [Transfer Suspension Message (json)](./transfer/message/transfer-suspension-message.json) +* [Transfer Termination Message (json)](./transfer/message/transfer-termination-message.json) +* [Common Schema (json)](./common/schema/definitions.schema.json) +* [Shape: Contract Agreement Message (ttl)](./negotiation/message/shape/contract-agreement-message-shape.ttl) +* [Shape: Contract Agreement Verification message (ttl)](./negotiation/message/shape/contract-agreement-verification-message-shape.ttl) +* [Shape: Contract Negotiation Event Message (ttl)](./negotiation/message/shape/contract-negotiation-event-message-shape.ttl) +* [Shape: Contract Negotiation Termination Message (ttl)](./negotiation/message/shape/contract-negotiation-termination-message-shape.ttl) +* [Shape: Contract Request Message (ttl)](./negotiation/message/shape/contract-request-message-shape.ttl) +* [diagram.styles.puml](./common/style/diagram.styles.puml) diff --git a/catalog/catalog.binding.https.md b/catalog/catalog.binding.https.md index 9b311294..cbcb293b 100644 --- a/catalog/catalog.binding.https.md +++ b/catalog/catalog.binding.https.md @@ -50,7 +50,7 @@ request. #### 2.3.2 OK (200) Response -If the request is successful, the catalog service must return a response body containing a [CatalogMessage](./message/catalog.message.json) which is a profiled DCAT Catalog type +If the request is successful, the catalog service must return a response body containing a [Catalog](./message/catalog.json) which is a profiled DCAT Catalog type described by the [Catalog Protocol Specification](catalog.protocol.md). ## 3 Technical Considerations diff --git a/catalog/catalog.protocol.md b/catalog/catalog.protocol.md index 820a7dd1..b8552939 100644 --- a/catalog/catalog.protocol.md +++ b/catalog/catalog.protocol.md @@ -20,32 +20,63 @@ Future IDS specifications may define additional optional serialization formats. ### 2.1 CatalogRequestMessage -**Sent by**: Consumer +![](./message/diagram/catalog-request-message.png) -**Example**: +**Sent by**: Consumer -``` -{ - "@context": "https://w3id.org/idsa/v5/context.json", - "@type": "ids:CatalogRequest" - "ids:filter": {} -} -``` +**Example**: [CatalogRequestMessage](./message/catalog-request-message.json) -**Response**: [CatalogMessage](./message/catalog.message.json) containing the [DCAT catalog](https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog). +**Response**: [Catalog](#22-catalog) containing the [DCAT catalog](https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog). -**Schema**: (xx)[] +**Schema**: [CatalogRequestMessageShape](./message/shape/catalog-request-message-shape.ttl) and the [CatalogRequestMessage JSON Schema](./message/schema/catalog-request-message-schema.json) #### Description -The `CatalogRequestMessage` is message sent by a consumer to a catalog service. The catalog service must respond with a `CatalogMessage,` which is a -valid [DCAT Catalog](https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog). +The `CatalogRequestMessage` is message sent by a consumer to a catalog service. The catalog service must respond with a `Catalog,` which is a +valid instance of a [DCAT Catalog](https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog). The `CatalogRequestMessage` may have a `filter` property which contains an implementation-specific query or filter expression type supported by the catalog service. The catalog service may require an authorization token. Details for including that token can be found in the relevant catalog binding specification. Similarly, pagination may be defined in the relevant catalog binding specification. + +### 2.2 Catalog + +![](./message/diagram/catalog.png) + +**Sent by**: Provider + +**Example**: [Catalog](./message/catalog.json) + + +**Response**: OK or ERROR + +**Schema**: [CatalogShape](./message/shape/catalog-shape.ttl) and the [Catalog JSON Schema](./message/schema/catalog-schema.json) + +#### Description + +The catalog contains all [Asset Entries](#31-asset-entry) which the requester shall see. + + +### 2.3 Catalog Error Message + +![](./message/diagram/catalog-error-message.png) + +**Sent by**: Consumer or Provider + +**Example**: [CatalogErrorMessage](./message/catalog-error-message.json) + +**Response**: OK or ERROR + +**Schema**: [CatalogErrorMessageShape](./message/shape/catalog-error-message-shape.ttl) and the [CatalogErrorMessage JSON Schema](./message/schema/catalog-error-message-schema.json) + +#### Description + +A Catalog Error Message is used when an error occured after a CatalogRequestMessage and the provider can not provide its catalog to the requester. + + + ## 3 DCAT Vocabulary Mapping This section describes how the IDS Information Model maps to DCAT resources. diff --git a/catalog/message/catalog-error-message.json b/catalog/message/catalog-error-message.json new file mode 100644 index 00000000..8b9b64b7 --- /dev/null +++ b/catalog/message/catalog-error-message.json @@ -0,0 +1,9 @@ +{ + "@context": "https://w3id.org/idsa/v5/context.json", + "@type": "ids:CatalogErrorMessage", + "ids:code": "123:A", + "ids:reason": [ + { "@value": "Catalog not provisioned for this requester.", "@language": "en" }, + { "some": "other reason"} + ] +} diff --git a/catalog/message/catalog.request.message.json b/catalog/message/catalog-request-message.json similarity index 100% rename from catalog/message/catalog.request.message.json rename to catalog/message/catalog-request-message.json diff --git a/catalog/message/catalog.error.message.json b/catalog/message/catalog.error.message.json deleted file mode 100644 index c57d246e..00000000 --- a/catalog/message/catalog.error.message.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "@context": "https://w3id.org/idsa/v5/context.json", - "@type": "ids:CatalogErrorMessage", - "ids:code": "123:A", - "ids:reasons": [ - {}, - {} - ] -} diff --git a/catalog/message/catalog.message.json b/catalog/message/catalog.json similarity index 100% rename from catalog/message/catalog.message.json rename to catalog/message/catalog.json diff --git a/catalog/message/diagram/catalog-error-message.png b/catalog/message/diagram/catalog-error-message.png new file mode 100644 index 00000000..5f52db97 Binary files /dev/null and b/catalog/message/diagram/catalog-error-message.png differ diff --git a/catalog/message/diagram/catalog-error-message.puml b/catalog/message/diagram/catalog-error-message.puml new file mode 100644 index 00000000..93b2c092 --- /dev/null +++ b/catalog/message/diagram/catalog-error-message.puml @@ -0,0 +1,16 @@ +@startuml "catalog-error-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:CatalogErrorMessage" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:CatalogErrorMessage" + ids:code : String + ids:reason : Array +} + +@enduml \ No newline at end of file diff --git a/catalog/message/diagram/catalog-request-message.png b/catalog/message/diagram/catalog-request-message.png new file mode 100644 index 00000000..e761ef82 Binary files /dev/null and b/catalog/message/diagram/catalog-request-message.png differ diff --git a/catalog/message/diagram/catalog-request-message.puml b/catalog/message/diagram/catalog-request-message.puml new file mode 100644 index 00000000..fe2a605f --- /dev/null +++ b/catalog/message/diagram/catalog-request-message.puml @@ -0,0 +1,15 @@ +@startuml "catalog-request-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:CatalogRequestMessage" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : ids:CatalogRequestMessage + ids:filter : Object +} + +@enduml \ No newline at end of file diff --git a/catalog/message/diagram/catalog.png b/catalog/message/diagram/catalog.png new file mode 100644 index 00000000..f360b4c3 Binary files /dev/null and b/catalog/message/diagram/catalog.png differ diff --git a/catalog/message/diagram/catalog.puml b/catalog/message/diagram/catalog.puml new file mode 100644 index 00000000..c59e96ef --- /dev/null +++ b/catalog/message/diagram/catalog.puml @@ -0,0 +1,14 @@ +@startuml "catalog" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class dcat:Catalog { + @type : "dcat:Catalog", + ... +} + +@enduml \ No newline at end of file diff --git a/catalog/example/dcat.distribution.example.json b/catalog/message/example/dcat.distribution.example.json similarity index 100% rename from catalog/example/dcat.distribution.example.json rename to catalog/message/example/dcat.distribution.example.json diff --git a/catalog/example/dcat.distribution.example.option1.json b/catalog/message/example/dcat.distribution.example.option1.json similarity index 100% rename from catalog/example/dcat.distribution.example.option1.json rename to catalog/message/example/dcat.distribution.example.option1.json diff --git a/catalog/example/dcat.distribution.example.option2.json b/catalog/message/example/dcat.distribution.example.option2.json similarity index 100% rename from catalog/example/dcat.distribution.example.option2.json rename to catalog/message/example/dcat.distribution.example.option2.json diff --git a/catalog/message/schema/catalog-error-message-schema.json b/catalog/message/schema/catalog-error-message-schema.json new file mode 100644 index 00000000..945d94f9 --- /dev/null +++ b/catalog/message/schema/catalog-error-message-schema.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CatalogErrorMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CatalogErrorMessage" + } + ], + "$id": "https://w3id.org/idsa/schemas/v5/CatalogErrorMessageSchema", + "definitions": { + "CatalogErrorMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:CatalogErrorMessage", + "required": true + } + } + } + } +} \ No newline at end of file diff --git a/catalog/message/schema/catalog-message-schema.json b/catalog/message/schema/catalog-message-schema.json new file mode 100644 index 00000000..afff2f86 --- /dev/null +++ b/catalog/message/schema/catalog-message-schema.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CatalogMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CatalogMessage" + } + ], + "$id": "https://w3id.org/idsa/schemas/v5/CatalogMessageSchema", + "definitions": { + "CatalogMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:CatalogMessage", + "required": true + }, + "ids:catalog": { + "type": "array", + "items": { + "$ref": "https://w3id.org/idsa/schemas/v5/CatalogSchema#definitions/Catalog" + } + } + } + } + } +} \ No newline at end of file diff --git a/catalog/message/schema/catalog-request-message-schema.json b/catalog/message/schema/catalog-request-message-schema.json new file mode 100644 index 00000000..6f340066 --- /dev/null +++ b/catalog/message/schema/catalog-request-message-schema.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CatalogRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CatalogRequestMessage" + } + ], + "$id": "https://w3id.org/idsa/schemas/v5/CatalogRequestMessageSchema", + "definitions": { + "CatalogRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:CatalogRequestMessage", + "required": true + }, + "ids:filter": { + "type": "array", + "items": { + "@type": "string", + "const": "ids:Filter" + } + } + } + } + } +} \ No newline at end of file diff --git a/catalog/message/schema/catalog-schema.json b/catalog/message/schema/catalog-schema.json new file mode 100644 index 00000000..d256eaa1 --- /dev/null +++ b/catalog/message/schema/catalog-schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CatalogSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Catalog" + } + ], + "$id": "https://w3id.org/idsa/schemas/v5/CatalogSchema", + "definitions": { + "Catalog": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "dcat:Catalog", + "required": true + }, + "dcat:dataset": { + "type": "array", + "items": { + "@type": { + "type": "string", + "const": "dcat:Dataset" + } + }, + "minItems": 1, + "required": false + } + } + } + } +} \ No newline at end of file diff --git a/catalog/message/shape/catalog-error-message-shape.ttl b/catalog/message/shape/catalog-error-message-shape.ttl new file mode 100644 index 00000000..332fd467 --- /dev/null +++ b/catalog/message/shape/catalog-error-message-shape.ttl @@ -0,0 +1,33 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:CatalogErrorMessageShape + a sh:NodeShape ; + sh:targetClass ids:CatalogErrorMessage ; + + +. \ No newline at end of file diff --git a/catalog/message/shape/catalog-message-shape.ttl b/catalog/message/shape/catalog-message-shape.ttl new file mode 100644 index 00000000..f80e71ac --- /dev/null +++ b/catalog/message/shape/catalog-message-shape.ttl @@ -0,0 +1,39 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:CatalogMessageShape + a sh:NodeShape ; + sh:targetClass ids:CatalogMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:catalog ; + sh:class dcat:Catalog ; + sh:severity sh:Violation ; + sh:message " (CatalogMessageShape): An ids:catalog property must point zero or more instances of the dcat:Catalog class."@en ; + ] ; +. \ No newline at end of file diff --git a/catalog/message/shape/catalog-request-message-shape.ttl b/catalog/message/shape/catalog-request-message-shape.ttl new file mode 100644 index 00000000..3fa28f7a --- /dev/null +++ b/catalog/message/shape/catalog-request-message-shape.ttl @@ -0,0 +1,39 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:CatalogRequestMessageShape + a sh:NodeShape ; + sh:targetClass ids:CatalogRequestMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:filter ; + sh:class ids:Filter ; + sh:severity sh:Violation ; + sh:message " (CatalogRequestMessageShape): An ids:filter property must point zero or more instances of the ids:Filter class."@en ; + ] ; +. \ No newline at end of file diff --git a/catalog/message/shape/catalog-shape.ttl b/catalog/message/shape/catalog-shape.ttl new file mode 100644 index 00000000..216232d7 --- /dev/null +++ b/catalog/message/shape/catalog-shape.ttl @@ -0,0 +1,39 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:CatalogShape + a sh:NodeShape ; + sh:targetClass dcat:Catalog ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:dataset ; + sh:class dcat:Dataset ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dcat:dataset property must point to a dcat:Dataset."@en ; + ] ; +. \ No newline at end of file diff --git a/schemas/context.json b/common/schema/context.json similarity index 60% rename from schemas/context.json rename to common/schema/context.json index a738908e..bc5dcaae 100644 --- a/schemas/context.json +++ b/common/schema/context.json @@ -2,9 +2,10 @@ "@context": { "ids": "https://w3id.org/idsa/core/", "odrl": "http://www.w3.org/ns/odrl/2/", - "xsd:": "http://www.w3.org/2001/XMLSchema#", + "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/" + "dct": "http://purl.org/dc/terms/", + "dcat": "http://www.w3.org/ns/dcat#" } -} +} \ No newline at end of file diff --git a/common/definitions.schema.json b/common/schema/definitions.schema.json similarity index 100% rename from common/definitions.schema.json rename to common/schema/definitions.schema.json diff --git a/common/shape/message-shape.ttl b/common/shape/message-shape.ttl new file mode 100644 index 00000000..adb6f429 --- /dev/null +++ b/common/shape/message-shape.ttl @@ -0,0 +1,41 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:MessageShape + a sh:NodeShape ; + sh:targetClass ids:Message ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:processId ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (MessageShape): An ids:processId property must point to exactly one xsd:string."@en ; + ] ; +. \ No newline at end of file diff --git a/common/shape/odrl-shapes.ttl b/common/shape/odrl-shapes.ttl new file mode 100644 index 00000000..6df1b9e2 --- /dev/null +++ b/common/shape/odrl-shapes.ttl @@ -0,0 +1,41 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:OfferShape + a sh:NodeShape ; + sh:targetClass odrl:Offer ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:target ; + sh:datatype xsd:anyURI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (OfferShape): An odrl:target property must point to exactly one xsd:anyURI."@en ; + ] ; +. \ No newline at end of file diff --git a/diagrams/diagram.styles.puml b/common/style/diagram.styles.puml similarity index 100% rename from diagrams/diagram.styles.puml rename to common/style/diagram.styles.puml diff --git a/model/m.dataspace.relationships.puml b/model/m.dataspace.relationships.puml index 1b88cce5..0ab688a2 100644 --- a/model/m.dataspace.relationships.puml +++ b/model/m.dataspace.relationships.puml @@ -1,7 +1,7 @@ @startuml !pragma layout smetana -!include ../diagrams/diagram.styles.puml +!include ../common/style/diagram.styles.puml agent Participant diff --git a/negotiation/contract.negotiation.binding.https.md b/negotiation/contract.negotiation.binding.https.md index 1834abcb..826df350 100644 --- a/negotiation/contract.negotiation.binding.https.md +++ b/negotiation/contract.negotiation.binding.https.md @@ -18,7 +18,7 @@ The OpenAPI definitions for this specification can be accessed [here](TBD). ### 2.2 ContractNegotiationError In the event of a client request error, the connector must return an appropriate HTTP 4xxx client error code. If an error body is returned it must be -a [ContractNegotiationError](./message/contract.negotiation.error.json) with the following properties: +a [ContractNegotiationError](./message/contract-negotiation-error.json) with the following properties: | Field | Type | Description | |---------------|---------------|-------------------------------------------------------------| @@ -48,7 +48,7 @@ Authorization: ... ``` If the negotiation is found and the client is authorized, the provider connector must return an HTTP 200 (OK) response and a body containing -the [ContractNegotiation](./message/contract.negotiation.json): +the [ContractNegotiation](./message/contract-negotiation.json): ``` { @@ -94,7 +94,7 @@ is included with or absent from the `callbackAddress` when resolving full URL. The @id is the correlation id that will be used for callback messages. The provider connector must return an HTTP 201 (Created) response with the location header set to the location of the contract negotiation and a body containing -the [ContractNegotiation](./message/contract.negotiation.json) message: +the [ContractNegotiation](./message/contract-negotiation.json) message: ``` Location: /negotiations/urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3 @@ -113,7 +113,7 @@ Note that if the location header is not an absolute URL, it must resolve to an a #### 2.6.1 POST -A consumer may make an offer by POSTing a [ContractRequestMessage](./message/contract.request.message.json) to `negotiations/:id/request`: +A consumer may make an offer by POSTing a [ContractRequestMessage](./message/contract-request-message.json) to `negotiations/:id/request`: ``` POST https://connector.provider.com/negotiations/urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3/offers @@ -142,7 +142,7 @@ it. #### 2.7.1 POST -A consumer connector can POST a [ContractNegotiationEventMessage](./message/contract.negotiation.event.message.json) to `negotiations/:id/events` to accept the current +A consumer connector can POST a [ContractNegotiationEventMessage](./message/contract-negotiation-event-message.json) to `negotiations/:id/events` to accept the current provider contract offer. If the negotiation state is successfully transitioned, the provider must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. @@ -152,7 +152,7 @@ If the current contract offer was created by the consumer, the provider must ret #### 2.8.1 POST -The consumer connector can POST a [ContractAgreementVerificationMessage](./message/contract.agreement.verification.message.json) to verify an agreement. If the negotiation state is +The consumer connector can POST a [ContractAgreementVerificationMessage](./message/contract-agreement-verification-message.json) to verify an agreement. If the negotiation state is successfully transitioned, the provider must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. ``` @@ -177,7 +177,7 @@ Authorization: ... #### 2.9.1 POST -The consumer connector can POST a [ContractNegotiationTerminationMessage](./message/contract.negotiation.termination.message.json) to terminate a negotiation. If the negotiation +The consumer connector can POST a [ContractNegotiationTerminationMessage](./message/contract-negotiation-termination-message.json) to terminate a negotiation. If the negotiation state is successfully transitioned, the provider must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. ## 3 Consumer Callback Path Bindings @@ -192,7 +192,7 @@ be `https://connector.consumer.com/callback/negotiations/:id/offers`. #### 3.2.1 POST -A provider may make an offer by POSTing a [ContractOfferMessage](./message/contract.offer.message.json) to the `negotiations/:id/offers` callback: +A provider may make an offer by POSTing a [ContractOfferMessage](./message/contract-offer-message.json) to the `negotiations/:id/offers` callback: ``` POST https://connector.consumer.com/callback/negotiations/urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3/offers @@ -219,7 +219,7 @@ process it. #### 3.3.1 POST -The provider connector can POST a [ContractAgreementMessage](./message/contract.agreement.message.json) to the `negotiations/:id/agreement` callback to create an agreement. If the +The provider connector can POST a [ContractAgreementMessage](./message/contract-agreement-message.json) to the `negotiations/:id/agreement` callback to create an agreement. If the negotiation state is successfully transitioned, the consumer must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. ``` @@ -244,7 +244,7 @@ Authorization: ... #### 3.4.1 POST -A provider can POST a [ContractNegotiationEventMessage](./message/contract.negotiation.event.message.json) to the `negotiations/:id/events` callback with an `eventType` +A provider can POST a [ContractNegotiationEventMessage](./message/contract-negotiation-event-message.json) to the `negotiations/:id/events` callback with an `eventType` of `finalized` to finalize a contract agreement. If the negotiation state is successfully transitioned, the consumer must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. diff --git a/negotiation/contract.negotiation.protocol.md b/negotiation/contract.negotiation.protocol.md index d9fb0aae..ddc1cfe4 100644 --- a/negotiation/contract.negotiation.protocol.md +++ b/negotiation/contract.negotiation.protocol.md @@ -54,15 +54,18 @@ The CN state machine is transitioned upon receipt and acknowledgement of a messa ### 1. ContractRequestMessage +![](./message/diagram/contract-request-message.png) + **Sent by**: Consumer **Resulting State**: CONSUMER_REQUESTED, TERMINATED -**Example**: [ContractRequestMessage](./message/contract.request.message.json) +**Example**: [ContractRequestMessage](./message/contract-request-message.json) -**Response**: [ContractNegotiation](./message/contract.negotiation.json) containing the negotiation id or ERROR. +**Response**: [ContractNegotiation](./message/contract-negotiation.json) containing the negotiation id or ERROR: +![](./message/diagram/contract-negotiation.png) -**Schema**: [ContractRequestMessageShape](../../schemas/contract-request-message-shape.ttl) +**Schema**: [ContractRequestMessageShape](./message/shape/contract-request-message-shape.ttl), [ContractRequestMessage JSON Schema](./message/schema/contract-request-message-schema.json), [ContractNegotiationShape](./message/shape/contract-negotiation-shape.ttl) and [ContractNegotiation JSON Schema](./message/schema/contract-negotiation-schema.json) #### Description @@ -70,30 +73,32 @@ The _ContractRequestMessage_ is sent by a consumer to initiate a contract negoti #### Notes -- The consumer must include either an `offer` or `offerId` property. If the message includes a `processId` property, the request will be associated with an existing contract - negotiation and a consumer offer will be created using either the `offer` or `offerId` properties. If the message does not include a `processId`, a new contract negotiation - will be created using either the `offer` or `offerId` properties and the provider selects an appropriate `processId`. - -- It is an error to include both an `offer` and `offerId` property. +- The consumer must include an `offer` property, which itself must have a `@id` property. If the message includes a `processId` property, the request will be associated with an existing contract + negotiation and a consumer offer will be created using either the `offer` or `offer.@id` properties. If the message does not include a `processId`, a new contract negotiation + will be created using either the `offer` or `offer.@id` properties and the provider selects an appropriate `processId`. -- An `offerId` will generally refer to an offer contained in a catalog. If the provider is not aware of the `offerId` value, it must respond with an error message. +- An `offer.@id` will generally refer to an offer contained in a catalog. If the provider is not aware of the `offer.@id` value, it must respond with an error message. - The dataset id is not technically required but included to avoid an error where the offer is associated with a different data set. -- `callbackAddress` is a URI indicating where messages to the consumer should be sent in asynchronous settings. If the address is not understood, the provider MUST return an +> Comment sba (20.12.2022): Let's use the `offer.target` property for this, and nothing else. + +- `callbackAddress` is a URL indicating where messages to the consumer should be sent in asynchronous settings. If the address is not understood, the provider MUST return an UNRECOVERABLE error. ### 2. ContractAgreementMessage +![](./message/diagram/contract-agreement-message.png) + **Sent by**: Provider **Resulting State**: PROVIDER_AGREED, TERMINATED -**Example**: [ContractAgreementMessage](./message/contract.agreement.message.json) +**Example**: [ContractAgreementMessage](./message/contract-agreement-message.json) **Response**: OK or ERROR -**Schema**: [ContractAgreementMessageShape](../../schemas/contract-agreement-message-shape.ttl) +**Schema**: [ContractAgreementMessageShape](./message/shape/contract-agreement-message-shape.ttl) and [ContractAgreementMessage JSON Schema](./message/schema/contract-agreement-message-schema.json) #### Description @@ -105,15 +110,18 @@ A _ContractAgreementMessage_ must contain an ODRL Agreement. ### 3. ContractAgreementVerificationMessage + +![](./message/diagram/contract-agreement-verification-message.png) + **Sent by**: Consumer **Resulting State**: CONSUMER_VERIFIED, TERMINATED -**Example**: [ContractAgreementVerificationMessage](./message/contract.agreement.verification.message.json) +**Example**: [ContractAgreementVerificationMessage](./message/contract-agreement-verification-message.json) **Response**: OK or ERROR -**Schema**: [ContractAgreementVerificationMessageShape](../../schemas/contract-agreement-verification-message-shape.ttl) +**Schema**: [ContractAgreementVerificationMessageShape](./message/shape/contract-agreement-verification-message-shape.ttl) and the [ContractAgreementVerificationMessage JSON Schema](./message/schema/contract-agreement-verification-message-schema.json) #### Description @@ -124,44 +132,49 @@ A _ContractAgreementVerificationMessage_ must contain a `processId`. ### 4. ContractNegotiationEventMessage + +![](./message/diagram/contract-negotiation-event-message.png) + **Sent by**: Provider or Consumer **Resulting State**: PROVIDER_FINALIZED, CONSUMER_AGREED, TERMINATED -**Example**: [ContractNegotiationEventMessage](./message/contract.negotiation.event.message.json) +**Example**: [ContractNegotiationEventMessage](./message/contract-negotiation-event-message.json) **Response**: OK or ERROR -**Schema**: [ContractNegotiationEventMessageShape](../../schemas/contract-negotiation-event-message-shape.ttl) +**Schema**: [ContractNegotiationEventMessageShape](./message/shape/contract-negotiation-event-message-shape.ttl) and the [ContractNegotiationEventMessage JSON Schema](./message/schema/contract-negotiation-event-message-schema.json) #### Description -When the _ContractNegotiationEventMessage_ is sent by a provider with an `eventType` property set to `finalized`, a contract agreement has been finalized and the associated asset +When the _ContractNegotiationEventMessage_ is sent by a provider with an `eventType` property set to `FINALIZED`, a contract agreement has been finalized and the associated asset is accessible. The state machine is transitioned to the PROVIDER_FINALIZED state. Other event types may be defined in the future. A consumer responds with an error if the signature can't be validated or is incorrect. It is an error for a consumer to send a ContractNegotiationEventMessage with an eventType `finalized` to the provider. -When the _ContractNegotiationEventMessage_ is sent by a consumer with an `eventType` set to `accepted`, the state machine is placed in the CONSUMER_AGREED state. +When the _ContractNegotiationEventMessage_ is sent by a consumer with an `eventType` set to `ACCEPTED`, the state machine is placed in the CONSUMER_AGREED state. -It is an error for a provider to send a ContractNegotiationEventMessage with an eventType `accepted` to the consumer. +It is an error for a provider to send a ContractNegotiationEventMessage with an eventType `ACCEPTED` to the consumer. Note that contract events are not intended for propagation of agreement state after a contract negotiation has entered a terminal state. It is considered an error for a consumer or provider to send a contract negotiation event after the negotiation state machine has entered a terminal state. ### 5. ContractNegotiationTerminationMessage +![](./message/diagram/contract-negotiation-termination-message.png) + **Sent by**: Consumer or Provider **Resulting State**: TERMINATED -**Example**: [ContractNegotiationTermination](./message/contract.negotiation.termination.message.json) +**Example**: [ContractNegotiationTerminationMessage](./message/contract-negotiation-termination-message.json) -**Schema**: [ContractNegotiationTerminationMessageShape](../../schemas/contract-negotiation-termination-message-shape.ttl) +**Schema**: [ContractNegotiationTerminationMessageShape](./message/shape/contract-negotiation-termination-message-shape.ttl) and the [ContractNegotiationTerminationMessage JSON Schema](./message/schema/contract-negotiation-termination-message-schema.json) #### Description -The _ContractNegotiationTermination_ is sent by a consumer or provider indicating it has cancelled the negotiation sequence. The message can be sent at any state of a negotiation +The _ContractNegotiationTerminationMessage_ is sent by a consumer or provider indicating it has cancelled the negotiation sequence. The message can be sent at any state of a negotiation without providing an explanation. Nevertheless, the sender may provide a description to help the receiver. #### Notes @@ -169,15 +182,17 @@ without providing an explanation. Nevertheless, the sender may provide a descrip - A contract negotiation may be terminated for a variety of reasons, for example, an unrecoverable error was encountered or one of the parties no longer wishes to continue. A connector's operator may remove terminated contract negotiation resources after it has reached the terminated state. -- If an error is received in response to a ContractNegotiationTermination, the sending party may choose to ignore the error. +- If an error is received in response to a ContractNegotiationTerminationMessage, the sending party may choose to ignore the error. ## ContractNegotiationError +![](./message/diagram/contract-negotiation-error.png) + **Sent by**: Consumer or Provider -**Example**: [NegotiationError](./message/contract.negotiation.error.json) +**Example**: [NegotiationError](./message/contract-negotiation-error.json) -**Schema**: [ContractNegotiationErrorShape](../../schemas/contract-negotiation-error-message-shape.ttl) +**Schema**: [ContractNegotiationErrorShape](./message/shape/contract-negotiation-error-shape.ttl) and the [ContractNegotiationErrorMessage JSON Schema](./message/schema/contract-negotiation-error-schema.json) #### Description diff --git a/negotiation/message/contract.agreement.message.json b/negotiation/message/contract-agreement-message.json similarity index 100% rename from negotiation/message/contract.agreement.message.json rename to negotiation/message/contract-agreement-message.json diff --git a/negotiation/message/contract-agreement-verification-message.json b/negotiation/message/contract-agreement-verification-message.json new file mode 100644 index 00000000..11f3db1c --- /dev/null +++ b/negotiation/message/contract-agreement-verification-message.json @@ -0,0 +1,28 @@ +{ + "@context": "https://w3id.org/idsa/v5/context.json", + "@type": "ids:ContractAgreementVerificationMessage", + "ids:processId": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "cred:credentialSubject": { + "@type": "ids:ContractAgreementMessage", + "ids:hash": "abcdefghijk12345" + }, + "sec:proof": [ + { + "@type": "sec:Ed25519Signature2018", + "dct:created": { + "@type": "xsd:dateTime", + "@value": "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" + }, + "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 new file mode 100644 index 00000000..329dc22a --- /dev/null +++ b/negotiation/message/contract-negotiation-error.json @@ -0,0 +1,14 @@ +{ + "@context": "https://w3id.org/idsa/v5/context.json", + "@type": "ids:ContractNegotiationError", + "ids:processId": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "ids:code": "...", + "ids:reason": [ + { "@value": "Catalog not provisioned for this requester.", "@language": "en" }, + { "some": "other reason"} + ], + "dct:description": [ + { "@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.event.message.json b/negotiation/message/contract-negotiation-event-message.json similarity index 72% rename from negotiation/message/contract.negotiation.event.message.json rename to negotiation/message/contract-negotiation-event-message.json index 19a2f529..53a55a17 100644 --- a/negotiation/message/contract.negotiation.event.message.json +++ b/negotiation/message/contract-negotiation-event-message.json @@ -2,6 +2,6 @@ "@context": "https://w3id.org/idsa/v5/context.json", "@type": "ids:ContractNegotiationEventMessage", "ids:processId": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", - "ids:eventType": "accepted | finalized", - "ids:checksum": "..." + "ids:eventType": "ACCEPTED", + "ids:checksum": "1ad23hs6" } diff --git a/negotiation/message/contract-negotiation-termination-message.json b/negotiation/message/contract-negotiation-termination-message.json new file mode 100644 index 00000000..65c1e16f --- /dev/null +++ b/negotiation/message/contract-negotiation-termination-message.json @@ -0,0 +1,15 @@ +{ + "@context": "https://w3id.org/idsa/v5/context.json", + "@type": "ids:ContractNegotiationTerminationMessage", + "ids:processId": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "ids:code": "...", + "ids:reason": [ + { + "@value": "License model does not fit.", + "@language": "en" + }, + { + "@id": "http://example.org/INCOMPATIBLE_LICENSE" + } + ] +} diff --git a/negotiation/message/contract-negotiation.json b/negotiation/message/contract-negotiation.json new file mode 100644 index 00000000..1c4b8a1f --- /dev/null +++ b/negotiation/message/contract-negotiation.json @@ -0,0 +1,8 @@ +{ + "@context": "https://w3id.org/idsa/v5/context.json", + "@id": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3", + "@type": "ids:ContractNegotiation", + "ids:processId": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3", + "ids:state": "CONSUMER_REQUESTED", + "ids:checksum": "..." + } \ No newline at end of file diff --git a/negotiation/message/contract.offer.message.json b/negotiation/message/contract-offer-message.json similarity index 100% rename from negotiation/message/contract.offer.message.json rename to negotiation/message/contract-offer-message.json diff --git a/negotiation/message/contract.request.message.json b/negotiation/message/contract-request-message.json similarity index 59% rename from negotiation/message/contract.request.message.json rename to negotiation/message/contract-request-message.json index 2f071966..d3f9386e 100644 --- a/negotiation/message/contract.request.message.json +++ b/negotiation/message/contract-request-message.json @@ -2,13 +2,16 @@ "@context": "https://w3id.org/idsa/v5/context.json", "@id": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3", "@type": "ids:ContractRequestMessage", - "dataSet": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "ids:dataSet": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", "ids:processId": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3", - "ids:offerId": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a88", "ids:offer": { "@type": "odrl:Offer", - "@id": "...", - "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88" + "@id": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a89", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + ... }, - "ids:callbackAddress": "https://......" + "ids:callbackAddress": { + "@value": "https://......", + "@type": "xsd:anyURI" + } } diff --git a/negotiation/message/contract.agreement.verification.message.json b/negotiation/message/contract.agreement.verification.message.json deleted file mode 100644 index e86e4d0e..00000000 --- a/negotiation/message/contract.agreement.verification.message.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "@context": "https://w3id.org/idsa/v5/context.json", - "@type": "ids:ContractAgreementVerificationMessage", - "ids:processId": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", - "ids:agreement": { - "@type": "ids:ContractAgreementMessage" - } -} diff --git a/negotiation/message/contract.negotiation.error.json b/negotiation/message/contract.negotiation.error.json deleted file mode 100644 index 6406faef..00000000 --- a/negotiation/message/contract.negotiation.error.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@context": "https://w3id.org/idsa/v5/context.json", - "@type": "ids:ContractNegotiationError", - "ids:processId": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", - "ids:code": "...", - "ids:reasons": [ - {}, - {} - ] -} diff --git a/negotiation/message/contract.negotiation.json b/negotiation/message/contract.negotiation.json deleted file mode 100644 index 080ce2fb..00000000 --- a/negotiation/message/contract.negotiation.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "@context": "https://w3id.org/idsa/v5/context.json", - "@id": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", - "@type": "ids:ContractNegotiation", - "ids:state": "CONSUMER_REQUESTED", - "ids:checksum": "..." -} diff --git a/negotiation/message/contract.negotiation.termination.message.json b/negotiation/message/contract.negotiation.termination.message.json deleted file mode 100644 index 2ee1b645..00000000 --- a/negotiation/message/contract.negotiation.termination.message.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@context": "https://w3id.org/idsa/v5/context.json", - "@type": "ids:ContractNegotiationTermination", - "ids:processId": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", - "ids:code": "...", - "ids:reasons": [ - {}, - {} - ] -} diff --git a/negotiation/message/diagram/contract-agreement-message.png b/negotiation/message/diagram/contract-agreement-message.png new file mode 100644 index 00000000..fe25d7c2 Binary files /dev/null and b/negotiation/message/diagram/contract-agreement-message.png differ diff --git a/negotiation/message/diagram/contract-agreement-message.puml b/negotiation/message/diagram/contract-agreement-message.puml new file mode 100644 index 00000000..92d259d5 --- /dev/null +++ b/negotiation/message/diagram/contract-agreement-message.puml @@ -0,0 +1,25 @@ +@startuml "contract-agreement-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:ContractAgreementMessage" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:ContractAgreementMessage" + ids:processId : String + ids:agreement : odrl:Agreement + ids:callbackAddress : xsd:anyURI +} + +class odrl:Agreement { + @type : "odrl:Agreement", + @id: String + odrl:target : xsd:anyURI +} + +"ids:ContractAgreementMessage" "1" *-- "1" "odrl:Agreement" : "odrl:agreement" + +@enduml \ No newline at end of file diff --git a/negotiation/message/diagram/contract-agreement-verification-message.png b/negotiation/message/diagram/contract-agreement-verification-message.png new file mode 100644 index 00000000..3f9b0103 Binary files /dev/null and b/negotiation/message/diagram/contract-agreement-verification-message.png differ diff --git a/negotiation/message/diagram/contract-agreement-verification-message.puml b/negotiation/message/diagram/contract-agreement-verification-message.puml new file mode 100644 index 00000000..eeca5415 --- /dev/null +++ b/negotiation/message/diagram/contract-agreement-verification-message.puml @@ -0,0 +1,44 @@ +@startuml "contract-agreement-verification-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:ContractAgreementVerificationMessage" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:ContractAgreementVerificationMessage" + ids:processId : String + cred:credentialSubject : ids:ContractAgreementMessage + sec:proof : sec:Proof +} + +class ids:ContractAgreementMessage { + @type : "ids:ContractAgreementMessage" + ids:hash : String +} + +class sec:Proof { + @type : Signature + dct:created : xsd:dateTime + sec:jws : String +} + +enum Signature { + sec:EcdsaSecp256k1Signature2019 + sec:EcdsaSecp256k1RecoverySignature2020 + sec:RsaSignature2018 + sec:SchnorrSecp256k1Signature2019 + sec:MerkleProof2019 + sec:Ed25519Signature2020 + sec:JsonWebSignature2020 + sec:BbsBlsSignature2020 + sec:BbsBlsSignatureProof2020 +} + +"ids:ContractAgreementVerificationMessage" "1" *-- "1" "ids:ContractAgreementMessage" : "cred:credentialSubject" +"ids:ContractAgreementVerificationMessage" "1" *-- "0..2" "sec:Proof" : "sec:proof" +"sec:Proof" "1" *-- "1" Signature : @type + +@enduml \ No newline at end of file diff --git a/negotiation/message/diagram/contract-negotiation-error.png b/negotiation/message/diagram/contract-negotiation-error.png new file mode 100644 index 00000000..51d8027f Binary files /dev/null and b/negotiation/message/diagram/contract-negotiation-error.png differ diff --git a/negotiation/message/diagram/contract-negotiation-error.puml b/negotiation/message/diagram/contract-negotiation-error.puml new file mode 100644 index 00000000..75f4fb2f --- /dev/null +++ b/negotiation/message/diagram/contract-negotiation-error.puml @@ -0,0 +1,25 @@ +@startuml "contract-negotiation-error" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:ContractNegotiationError" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:ContractNegotiationError" + ids:processId : String + ids:code : String + ids:reason : Array + dct:description : MultilanguageProperty +} + +class "MultilanguageProperty" { + @language : BCP47 Language-Tag + @value: String +} + +"ids:ContractNegotiationError" "1" *-- "*" "MultilanguageProperty" : "dct:description" + +@enduml \ No newline at end of file diff --git a/negotiation/message/diagram/contract-negotiation-event-message.png b/negotiation/message/diagram/contract-negotiation-event-message.png new file mode 100644 index 00000000..f8fe08c5 Binary files /dev/null and b/negotiation/message/diagram/contract-negotiation-event-message.png differ diff --git a/negotiation/message/diagram/contract-negotiation-event-message.puml b/negotiation/message/diagram/contract-negotiation-event-message.puml new file mode 100644 index 00000000..b037eb03 --- /dev/null +++ b/negotiation/message/diagram/contract-negotiation-event-message.puml @@ -0,0 +1,24 @@ +@startuml "contract-negotiation-event-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:ContractNegotiationEventMessage" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:ContractNegotiationEventMessage" + ids:processId : String + ids:eventType : ids:NegotiationEvent + ids:checksum : String +} + +enum ids:NegotiationEvent { + ids:ACCEPTED + ids:FINALIZED +} + +"ids:ContractNegotiationEventMessage" "1" *-- "1" "ids:NegotiationEvent" : "ids:eventType" + +@enduml \ No newline at end of file diff --git a/negotiation/message/diagram/contract-negotiation-termination-message.png b/negotiation/message/diagram/contract-negotiation-termination-message.png new file mode 100644 index 00000000..35fcb322 Binary files /dev/null and b/negotiation/message/diagram/contract-negotiation-termination-message.png differ diff --git a/negotiation/message/diagram/contract-negotiation-termination-message.puml b/negotiation/message/diagram/contract-negotiation-termination-message.puml new file mode 100644 index 00000000..e6980ac2 --- /dev/null +++ b/negotiation/message/diagram/contract-negotiation-termination-message.puml @@ -0,0 +1,17 @@ +@startuml "contract-negotiation-termination-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:ContractNegotiationTerminationMessage" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:ContractNegotiationTerminationMessage" + ids:processId : String + ids:code : Object + ids:reason : Array +} + +@enduml \ No newline at end of file diff --git a/negotiation/message/diagram/contract-negotiation.png b/negotiation/message/diagram/contract-negotiation.png new file mode 100644 index 00000000..d0810a55 Binary files /dev/null and b/negotiation/message/diagram/contract-negotiation.png differ diff --git a/negotiation/message/diagram/contract-negotiation.puml b/negotiation/message/diagram/contract-negotiation.puml new file mode 100644 index 00000000..d5fc003f --- /dev/null +++ b/negotiation/message/diagram/contract-negotiation.puml @@ -0,0 +1,29 @@ +@startuml "contract-negotiation" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:ContractNegotiation" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:ContractNegotiation" + ids:processId : String + ids:state : ids:ContractNegotiationState +} + +enum ids:ContractNegotiationState { + "ids:CONSUMER_REQUESTED" + "ids:PROVIDER_OFFERED" + "ids:CONSUMER_AGREED" + "ids:PROVIDER_AGREED" + "ids:CONSUMER_VERIFIED" + "ids:PROVIDER_FINALIZED" + "ids:TERMINATED" + "..." +} + +"ids:ContractNegotiation" "1" *-- "1" "ids:ContractNegotiationState" : "ids:contractNegotiationState" + +@enduml \ No newline at end of file diff --git a/negotiation/message/diagram/contract-request-message.png b/negotiation/message/diagram/contract-request-message.png new file mode 100644 index 00000000..598f287b Binary files /dev/null and b/negotiation/message/diagram/contract-request-message.png differ diff --git a/negotiation/message/diagram/contract-request-message.puml b/negotiation/message/diagram/contract-request-message.puml new file mode 100644 index 00000000..bf6545a1 --- /dev/null +++ b/negotiation/message/diagram/contract-request-message.puml @@ -0,0 +1,26 @@ +@startuml "contract-request-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:ContractRequestMessage" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : ids:ContractRequestMessage + ids:dataSet : String + ids:processId : String + ids:offer : odrl:Offer + ids:callbackAddress : xsd:anyURI +} + +class odrl:Offer { + @type : odrl:Offer, + @id: String + odrl:target : xsd:anyURI +} + +"ids:ContractRequestMessage" "1" *-- "1" "odrl:Offer" : "ids:offer" + +@enduml \ No newline at end of file diff --git a/negotiation/message/schema/contract-agreement-message-schema.json b/negotiation/message/schema/contract-agreement-message-schema.json new file mode 100644 index 00000000..a75248a4 --- /dev/null +++ b/negotiation/message/schema/contract-agreement-message-schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractAgreementMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractAgreementMessage" + } + ], + "$id": "https://w3id.org/idsa/schemas/v5/ContractAgreementMessageSchema", + "definitions": { + "ContractAgreementMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:ContractAgreementMessage", + "required": true + }, + "ids:processId": { + "type": "string", + "required": true + }, + "odrl:agreement": { + "$ref": "https://w3id.org/idsa/schemas/v5/AgreementSchema#definitions/Agreement", + "required": true + } + } + } + } +} \ No newline at end of file diff --git a/negotiation/message/schema/contract-agreement-verification-message-schema.json b/negotiation/message/schema/contract-agreement-verification-message-schema.json new file mode 100644 index 00000000..9cc8b497 --- /dev/null +++ b/negotiation/message/schema/contract-agreement-verification-message-schema.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractAgreementVerificationMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractAgreementVerificationMessage" + } + ], + "$id": "https://w3id.org/idsa/schemas/v5/ContractAgreementVerificationMessageSchema", + "definitions": { + "ContractAgreementVerificationMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json" + }, + "@type": { + "type": "string", + "const": "ids:ContractAgreementVerificationMessage" + }, + "ids:processId": { + "type": "string" + }, + "cred:subject": { + "type": "object", + "properties": { + "ids:hash": { + "type": "string" + }, + "required": [ "ids:hash" ] + } + }, + "sec:proof": { + "type": "array", + "items": { + "@type": { + "enum": ["sec:EcdsaSecp256k1Signature2019", "sec:EcdsaSecp256k1RecoverySignature2020", "sec:RsaSignature2018", "sec:SchnorrSecp256k1Signature2019", "sec:MerkleProof2019", "sec:Ed25519Signature2020", "sec:JsonWebSignature2020", "sec:BbsBlsSignature2020", "sec:BbsBlsSignatureProof2020" ] + }, + "dct:created" : { + "type": "object", + "properties": { + "@type" : { + "type": "string", + "const" : "xsd:dateTime" + }, + "@value" : { + "type": "string", + "const": "todo" + } + }, + "required": [ "@type", "@value"] + }, + "sec:jws": { + "type": "string" + }, + "required": [ "@type", "dct:created", "sec:jws"] + }, + "minItems": 0, + "maxItems": 2 + } + }, + "required": [ "@context", "@type", "ids:processId", "cred:credentialSubject", "sec:proof" ] + } + } +} \ No newline at end of file diff --git a/negotiation/message/schema/contract-negotiation-error-schema.json b/negotiation/message/schema/contract-negotiation-error-schema.json new file mode 100644 index 00000000..6a18ecda --- /dev/null +++ b/negotiation/message/schema/contract-negotiation-error-schema.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationErrorSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiationError" + } + ], + "$id": "https://w3id.org/idsa/core/v5/ContractNegotiationErrorSchema", + "definitions": { + "ContractNegotiationError": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:ContractNegotiationError", + "required": true + }, + "ids:processId": { + "type": "string", + "required": true + }, + "ids:reason": { + "type": "array", + "minItems": 1, + "items": { + + }, + "required": false + }, + "dct:description": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } +} \ No newline at end of file diff --git a/negotiation/message/schema/contract-negotiation-event-message-schema.json b/negotiation/message/schema/contract-negotiation-event-message-schema.json new file mode 100644 index 00000000..7ed25ce6 --- /dev/null +++ b/negotiation/message/schema/contract-negotiation-event-message-schema.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationEventMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiationEventMessage" + } + ], + "$id": "https://w3id.org/idsa/core/v5/ContractNegotiationEventMessageSchema", + "definitions": { + "ContractNegotiationEventMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:ContractNegotiationEventMessage", + "required": true + }, + "ids:processId": { + "type": "string", + "required": true + }, + "ids:eventType": { + "type": "string", + "enum": [ + "ids:ACCEPTED", + "ids:FINALIZED" + ], + "required": true + }, + "ids:checksum": { + "type": "string", + "required": true + } + } + } + } +} \ No newline at end of file diff --git a/negotiation/message/schema/contract-negotiation-schema.json b/negotiation/message/schema/contract-negotiation-schema.json new file mode 100644 index 00000000..b9f2a65a --- /dev/null +++ b/negotiation/message/schema/contract-negotiation-schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiation" + } + ], + "$id": "https://w3id.org/idsa/core/v5/ContractNegotiationSchema", + "definitions": { + "ContractNegotiation": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:ContractNegotiation", + "required": true + }, + "ids:processId": { + "type": "string", + "required": true + }, + "ids:negotiationId": { + "type": "string", + "required": true + } + } + } + } +} \ No newline at end of file diff --git a/negotiation/message/schema/contract-negotiation-termination-message-schema.json b/negotiation/message/schema/contract-negotiation-termination-message-schema.json new file mode 100644 index 00000000..a6e6bcd4 --- /dev/null +++ b/negotiation/message/schema/contract-negotiation-termination-message-schema.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationTerminationMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiationTerminationMessage" + } + ], + "$id": "https://w3id.org/idsa/core/v5/ContractNegotiationTerminationMessageSchema", + "definitions": { + "ContractNegotiationTerminationMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:ContractNegotiationTerminationMessage", + "required": true + }, + "ids:processId": { + "type": "string", + "required": true + }, + "ids:code": { + "type": "string", + "required": true + }, + "ids:reason": { + "type": "array", + "required": false, + "minItems": 1, + "items": { + + } + } + } + } + } +} \ No newline at end of file diff --git a/negotiation/message/schema/contract-request-message-schema.json b/negotiation/message/schema/contract-request-message-schema.json new file mode 100644 index 00000000..3159827f --- /dev/null +++ b/negotiation/message/schema/contract-request-message-schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractRequestMessage" + } + ], + "$id": "https://w3id.org/idsa/schemas/v5/ContractRequestMessageSchema", + "definitions": { + "ContractRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:ContractRequestMessage", + "required": true + }, + "ids:processId": { + "type": "string", + "required": true + }, + "odrl:offer": { + "$ref": "https://w3id.org/idsa/schemas/v5/OfferSchema#definitions/Offer", + "required": true + }, + "ids:callbackAddress": { + "type" : "string", + "required": true + } + } + } + } +} \ No newline at end of file diff --git a/negotiation/message/shape/contract-agreement-message-shape.ttl b/negotiation/message/shape/contract-agreement-message-shape.ttl new file mode 100644 index 00000000..490e637f --- /dev/null +++ b/negotiation/message/shape/contract-agreement-message-shape.ttl @@ -0,0 +1,42 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:ContractAgreementMessageShape + a sh:NodeShape ; + sh:targetClass ids:ContractAgreementMessage ; + rdfs:subClassOf shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:agreement ; + sh:class odrl:Agreement ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementMessageShape): An odrl:agreement property must point to exactly one odrl:Agreement."@en ; + ] ; +. \ No newline at end of file diff --git a/negotiation/message/shape/contract-agreement-verification-message-shape.ttl b/negotiation/message/shape/contract-agreement-verification-message-shape.ttl new file mode 100644 index 00000000..8ff74d6f --- /dev/null +++ b/negotiation/message/shape/contract-agreement-verification-message-shape.ttl @@ -0,0 +1,52 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:ContractAgreementVerificationMessageShape + a sh:NodeShape ; + sh:targetClass ids:ContractAgreementVerificationMessage ; + rdfs:subClassOf shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path cred:credentialSubject ; + sh:class ids:ContractAgreementMessage ; # TODO: Having the ContractAgreementMessage class(!) here but only with the property ids:hash is a bad idea, not safe for the schema engine. + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementVerificationMessageShape): An cred:credentialSubject property must point to exactly one ids:ContractAgreementMessage."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path sec:proof ; + sh:class sec:Proof ; + sh:maxCount 2 ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementVerificationMessageShape): An sec:proof property must point to zero, one, or two sec:Proof classes."@en ; + ] ; +. \ No newline at end of file diff --git a/negotiation/message/shape/contract-negotiation-error-shape.ttl b/negotiation/message/shape/contract-negotiation-error-shape.ttl new file mode 100644 index 00000000..3cf0e6ce --- /dev/null +++ b/negotiation/message/shape/contract-negotiation-error-shape.ttl @@ -0,0 +1,40 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:ContractNegotiationErrorShape + a sh:NodeShape ; + rdfs:subClassOf ids:ContractNegotiationMessageShape ; # TODO: Is a ContractNegotiationError really a Message? + sh:targetClass ids:ContractNegotiationError ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:description ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationErrorShape): A dct:description property must point from an ids:ContractNegotiationError to zero or more rdf:langString values."@en ; + ] +. \ No newline at end of file diff --git a/negotiation/message/shape/contract-negotiation-event-message-shape.ttl b/negotiation/message/shape/contract-negotiation-event-message-shape.ttl new file mode 100644 index 00000000..bc5fad1e --- /dev/null +++ b/negotiation/message/shape/contract-negotiation-event-message-shape.ttl @@ -0,0 +1,53 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:ContractNegotiationEventMessageShape + a sh:NodeShape ; + sh:targetClass ids:ContractNegotiationEventMessage ; + rdfs:subClassOf ids:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:eventType ; + sh:class ids:NegotiationEvent ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationEventMessageShape): An ids:eventType property must point from an ids:ContractNegotiationEventMessage to exactly one ids:NegotiationEvent."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:checksum ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationEventMessageShape): An ids:checksum property must point from an ids:ContractNegotiationEventMessage to exactly one xsd:string."@en ; + ] ; + +. \ No newline at end of file diff --git a/negotiation/message/shape/contract-negotiation-message-shape.ttl b/negotiation/message/shape/contract-negotiation-message-shape.ttl new file mode 100644 index 00000000..0b1107bd --- /dev/null +++ b/negotiation/message/shape/contract-negotiation-message-shape.ttl @@ -0,0 +1,41 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:ContractNegotiationMessageShape + a sh:NodeShape ; + sh:targetClass ids:ContractNegotiationMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:processId ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationMessageShape): An ids:processId property must point to exactly one xsd:string."@en ; + ] ; +. \ No newline at end of file diff --git a/negotiation/message/shape/contract-negotiation-shape.ttl b/negotiation/message/shape/contract-negotiation-shape.ttl new file mode 100644 index 00000000..79b25af1 --- /dev/null +++ b/negotiation/message/shape/contract-negotiation-shape.ttl @@ -0,0 +1,52 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:ContractNegotiationShape + a sh:NodeShape ; + sh:targetClass ids:ContractNegotiation ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:processId ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationShape): An ids:processId property must point from an ids:ContractNegotiation to exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:negotiationId ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationShape): An ids:checksum property must point from an ids:negotiationId to exactly one xsd:string field."@en ; + ] ; + +. \ No newline at end of file diff --git a/negotiation/message/shape/contract-negotiation-termination-message-shape.ttl b/negotiation/message/shape/contract-negotiation-termination-message-shape.ttl new file mode 100644 index 00000000..42ff6494 --- /dev/null +++ b/negotiation/message/shape/contract-negotiation-termination-message-shape.ttl @@ -0,0 +1,33 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:ContractNegotiationTerminationMessageShape + a sh:NodeShape ; + sh:targetClass ids:ContractNegotiationTerminationMessage ; + rdfs:subClassOf ids:ContractNegotiationMessageShape ; + +. \ No newline at end of file diff --git a/negotiation/message/shape/contract-request-message-shape.ttl b/negotiation/message/shape/contract-request-message-shape.ttl new file mode 100644 index 00000000..176f3b62 --- /dev/null +++ b/negotiation/message/shape/contract-request-message-shape.ttl @@ -0,0 +1,52 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:ContractRequestMessageShape + a sh:NodeShape ; + sh:targetClass ids:ContractRequestMessage ; + rdfs:subClassOf ids:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:offer ; + sh:class odrl:Offer ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An ids:offer property must point to exactly one odrl:Offer class."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:callbackAddress ; + sh:datatype xsd:anyURI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An ids:callbackAddress property must point to exactly one xsd:anyURI value."@en ; + ] ; +. \ No newline at end of file diff --git a/schemas/contract-agreement-message-shape.ttl b/schemas/contract-agreement-message-shape.ttl deleted file mode 100644 index 30404ce4..00000000 --- a/schemas/contract-agreement-message-shape.ttl +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/schemas/contract-agreement-verification-message-shape.ttl b/schemas/contract-agreement-verification-message-shape.ttl deleted file mode 100644 index 30404ce4..00000000 --- a/schemas/contract-agreement-verification-message-shape.ttl +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/schemas/contract-negotiation-event-message-shape.ttl b/schemas/contract-negotiation-event-message-shape.ttl deleted file mode 100644 index 30404ce4..00000000 --- a/schemas/contract-negotiation-event-message-shape.ttl +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/schemas/contract-negotiation-termination-message-shape.ttl b/schemas/contract-negotiation-termination-message-shape.ttl deleted file mode 100644 index 30404ce4..00000000 --- a/schemas/contract-negotiation-termination-message-shape.ttl +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/schemas/contract-request-message-shape.ttl b/schemas/contract-request-message-shape.ttl deleted file mode 100644 index 30404ce4..00000000 --- a/schemas/contract-request-message-shape.ttl +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/transfer/message/diagram/transfer-completion-message.png b/transfer/message/diagram/transfer-completion-message.png new file mode 100644 index 00000000..811ed634 Binary files /dev/null and b/transfer/message/diagram/transfer-completion-message.png differ diff --git a/transfer/message/diagram/transfer-completion-message.puml b/transfer/message/diagram/transfer-completion-message.puml new file mode 100644 index 00000000..28934c76 --- /dev/null +++ b/transfer/message/diagram/transfer-completion-message.puml @@ -0,0 +1,16 @@ +@startuml "transfer-completion-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:TransferCompletionMessage" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:TransferCompletionMessage" + ids:processId : String + ids:correlationId : String +} + +@enduml \ No newline at end of file diff --git a/transfer/message/diagram/transfer-error.png b/transfer/message/diagram/transfer-error.png new file mode 100644 index 00000000..eb839124 Binary files /dev/null and b/transfer/message/diagram/transfer-error.png differ diff --git a/transfer/message/diagram/transfer-error.puml b/transfer/message/diagram/transfer-error.puml new file mode 100644 index 00000000..6e9c5d0f --- /dev/null +++ b/transfer/message/diagram/transfer-error.puml @@ -0,0 +1,18 @@ +@startuml "transfer-error" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:TransferError" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:TransferError" + ids:processId : String + ids:correlationId : String + ids:code : String + ids:reason : Array +} + +@enduml \ No newline at end of file diff --git a/transfer/message/diagram/transfer-process.png b/transfer/message/diagram/transfer-process.png new file mode 100644 index 00000000..c8b3b188 Binary files /dev/null and b/transfer/message/diagram/transfer-process.png differ diff --git a/transfer/message/diagram/transfer-process.puml b/transfer/message/diagram/transfer-process.puml new file mode 100644 index 00000000..22695bcd --- /dev/null +++ b/transfer/message/diagram/transfer-process.puml @@ -0,0 +1,27 @@ +@startuml "transfer-process" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:TransferProcess" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:TransferProcess" + ids:correlationId : String + ids:state : ids:TransferState +} + + +enum ids:TransferState { + "ids:REQUESTED" + "ids:STARTED" + "ids:TERMINATED" + "ids:COMPLETED" + "ids:SUSPENDED" +} + +"ids:TransferProcess" "1" *-- "1" "ids:TransferState" : "ids:transferState" + +@enduml \ No newline at end of file diff --git a/transfer/message/diagram/transfer-request-message.png b/transfer/message/diagram/transfer-request-message.png new file mode 100644 index 00000000..d5c011a8 Binary files /dev/null and b/transfer/message/diagram/transfer-request-message.png differ diff --git a/transfer/message/diagram/transfer-request-message.puml b/transfer/message/diagram/transfer-request-message.puml new file mode 100644 index 00000000..c6cc2a89 --- /dev/null +++ b/transfer/message/diagram/transfer-request-message.puml @@ -0,0 +1,18 @@ +@startuml "transfer-request-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:TransferRequestMessage" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:TransferRequestMessage" + ids:agreementId : String + dct:format : String + ids:dataAddress : String + ids:callbackAddress : String +} + +@enduml \ No newline at end of file diff --git a/transfer/message/diagram/transfer-start-message.png b/transfer/message/diagram/transfer-start-message.png new file mode 100644 index 00000000..f8be5cd9 Binary files /dev/null and b/transfer/message/diagram/transfer-start-message.png differ diff --git a/transfer/message/diagram/transfer-start-message.puml b/transfer/message/diagram/transfer-start-message.puml new file mode 100644 index 00000000..fbbf2e2c --- /dev/null +++ b/transfer/message/diagram/transfer-start-message.puml @@ -0,0 +1,17 @@ +@startuml "transfer-start-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:TransferStartMessage" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:TransferStartMessage" + ids:processId : String + ids:correlationId : String + ids:dataAddress : String +} + +@enduml \ No newline at end of file diff --git a/transfer/message/diagram/transfer-suspension-message.png b/transfer/message/diagram/transfer-suspension-message.png new file mode 100644 index 00000000..19326b64 Binary files /dev/null and b/transfer/message/diagram/transfer-suspension-message.png differ diff --git a/transfer/message/diagram/transfer-suspension-message.puml b/transfer/message/diagram/transfer-suspension-message.puml new file mode 100644 index 00000000..8285938d --- /dev/null +++ b/transfer/message/diagram/transfer-suspension-message.puml @@ -0,0 +1,18 @@ +@startuml "transfer-suspension-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:TransferSuspensionMessage" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:TransferSuspensionMessage" + ids:processId : String + ids:correlationId : String + ids:code : String + ids:reason : Array +} + +@enduml \ No newline at end of file diff --git a/transfer/message/diagram/transfer-termination-message.png b/transfer/message/diagram/transfer-termination-message.png new file mode 100644 index 00000000..2d819eea Binary files /dev/null and b/transfer/message/diagram/transfer-termination-message.png differ diff --git a/transfer/message/diagram/transfer-termination-message.puml b/transfer/message/diagram/transfer-termination-message.puml new file mode 100644 index 00000000..89ab651d --- /dev/null +++ b/transfer/message/diagram/transfer-termination-message.puml @@ -0,0 +1,18 @@ +@startuml "transfer-termination-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "ids:TransferTerminationMessage" { + @context : "https://w3id.org/idsa/v5/context.json" + @type : "ids:TransferTerminationMessage" + ids:processId : String + ids:correlationId : String + ids:code : String + ids:reason : Array +} + +@enduml \ No newline at end of file diff --git a/transfer/message/schema/transfer-completion-message-schema.json b/transfer/message/schema/transfer-completion-message-schema.json new file mode 100644 index 00000000..db7bf7ad --- /dev/null +++ b/transfer/message/schema/transfer-completion-message-schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferCompletionMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferCompletionMessage" + } + ], + "$id": "https://w3id.org/idsa/core/v5/TransferCompletionMessageSchema", + "definitions": { + "TransferCompletionMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:TransferCompletionMessage", + "required": true + }, + "ids:processId": { + "type": "string", + "required": true + }, + "ids:correlationId": { + "type": "string", + "required": true + } + } + } + } +} \ No newline at end of file diff --git a/transfer/message/schema/transfer-error-schema.json b/transfer/message/schema/transfer-error-schema.json new file mode 100644 index 00000000..e4c3d7f2 --- /dev/null +++ b/transfer/message/schema/transfer-error-schema.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferErrorSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferError" + } + ], + "$id": "https://w3id.org/idsa/core/v5/TransferErrorSchema", + "definitions": { + "TransferError": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:TransferError", + "required": true + }, + "ids:processId": { + "type": "string", + "required": true + }, + "ids:correlationId": { + "type": "string", + "required": true + }, + "ids:code": { + "type": "string", + "required": true + }, + "ids:reason": { + "type": "array", + "required": false, + "minItems": 1, + "items": { + + } + } + } + } + } +} \ No newline at end of file diff --git a/transfer/message/schema/transfer-process-schema.json b/transfer/message/schema/transfer-process-schema.json new file mode 100644 index 00000000..ece3aa68 --- /dev/null +++ b/transfer/message/schema/transfer-process-schema.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferProcessSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferProcess" + } + ], + "$id": "https://w3id.org/idsa/core/v5/TransferProcessSchema", + "definitions": { + "TransferProcess": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:TransferProcess", + "required": true + }, + "ids:correlationId": { + "type": "string", + "required": true + }, + "ids:transferState": { + "type": "object", + "properties": { + "@id": { + "type": "string", + "enum": [ + "ids:REQUESTED", + "ids:STARTED", + "ids:TERMINATED", + "ids:COMPLETED", + "ids:SUSPENDED" + ] + }, + "required": true + } + } + } + } + } +} \ No newline at end of file diff --git a/transfer/message/schema/transfer-request-message-schema.json b/transfer/message/schema/transfer-request-message-schema.json new file mode 100644 index 00000000..d7649dc0 --- /dev/null +++ b/transfer/message/schema/transfer-request-message-schema.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferRequestMessage" + } + ], + "$id": "https://w3id.org/idsa/core/v5/TransferRequestMessageSchema", + "definitions": { + "TransferRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:TransferRequestMessage", + "required": true + }, + "ids:agreementId": { + "type": "object", + "properties": { + "@value": { + "type": "string", + "required": true + }, + "@type": { + "type": "string", + "const": "xsd:anyURI", + "required": true + } + }, + "required": true + }, + "dct:format": { + "type": "string", + "required": true + }, + "ids:dataAddress": { + "type": "object", + "properties": { + "@value": { + "type": "string", + "required": true + }, + "@type": { + "type": "string", + "const": "xsd:anyURI", + "required": true + } + }, + "required": false + }, + "ids:callbackAddress": { + "type": "object", + "properties": { + "@value": { + "type": "string", + "required": true + }, + "@type": { + "type": "string", + "const": "xsd:anyURI", + "required": true + } + }, + "required": true + } + } + } + } +} \ No newline at end of file diff --git a/transfer/message/schema/transfer-start-message-schema.json b/transfer/message/schema/transfer-start-message-schema.json new file mode 100644 index 00000000..d700d7b9 --- /dev/null +++ b/transfer/message/schema/transfer-start-message-schema.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferStartMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferStartMessage" + } + ], + "$id": "https://w3id.org/idsa/core/v5/TransferStartMessageSchema", + "definitions": { + "TransferStartMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:TransferStartMessage", + "required": true + }, + "ids:processId": { + "type": "string", + "required": true + }, + "ids:correlationId": { + "type": "string", + "required": true + }, + "ids:dataAddress": { + "type": "object", + "properties": { + "@value": { + "type": "string", + "required": true + }, + "@type": { + "type": "string", + "const": "xsd:anyURI", + "required": true + } + }, + "required": false + } + } + } + } +} \ No newline at end of file diff --git a/transfer/message/schema/transfer-suspension-message-schema.json b/transfer/message/schema/transfer-suspension-message-schema.json new file mode 100644 index 00000000..d54567ca --- /dev/null +++ b/transfer/message/schema/transfer-suspension-message-schema.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferSuspensionMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferSuspensionMessage" + } + ], + "$id": "https://w3id.org/idsa/core/v5/TransferSuspensionMessageSchema", + "definitions": { + "TransferSuspensionMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:TransferSuspensionMessage", + "required": true + }, + "ids:processId": { + "type": "string", + "required": true + }, + "ids:correlationId": { + "type": "string", + "required": true + }, + "ids:reason": { + "type": "array", + "required": false, + "minItems": 1, + "items": { + + } + } + } + } + } +} \ No newline at end of file diff --git a/transfer/message/schema/transfer-termination-message-schema.json b/transfer/message/schema/transfer-termination-message-schema.json new file mode 100644 index 00000000..df29e602 --- /dev/null +++ b/transfer/message/schema/transfer-termination-message-schema.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferTerminationMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferTerminationMessage" + } + ], + "$id": "https://w3id.org/idsa/core/v5/TransferTerminationMessageSchema", + "definitions": { + "TransferTerminationMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/idsa/v5/context.json", + "required": true + }, + "@type": { + "type": "string", + "const": "ids:TransferTerminationMessage", + "required": true + }, + "ids:processId": { + "type": "string", + "required": true + }, + "ids:correlationId": { + "type": "string", + "required": true + }, + "ids:code": { + "type": "string", + "required": true + }, + "ids:reason": { + "type": "array", + "required": false, + "minItems": 1, + "items": { + + } + } + } + } + } +} \ No newline at end of file diff --git a/transfer/message/shape/transfer-completion-message-shape.ttl b/transfer/message/shape/transfer-completion-message-shape.ttl new file mode 100644 index 00000000..a06ec081 --- /dev/null +++ b/transfer/message/shape/transfer-completion-message-shape.ttl @@ -0,0 +1,42 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferCompletionMessageShape + a sh:NodeShape ; + sh:targetClass ids:TransferCompletionMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:correlationId ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferCompletionMessageShape): An ids:correlationId property must point exactly one xsd:string field."@en ; + ] ; + +. \ No newline at end of file diff --git a/transfer/message/shape/transfer-error-shape.ttl b/transfer/message/shape/transfer-error-shape.ttl new file mode 100644 index 00000000..e68c5122 --- /dev/null +++ b/transfer/message/shape/transfer-error-shape.ttl @@ -0,0 +1,53 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferErrorShape + a sh:NodeShape ; + sh:targetClass ids:TransferError ; + rdfs:subClassOf ids:MessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:correlationId ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (TransferErrorShape): An ids:correlationId property must point from an ids:TransferError to exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:code ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (TransferErrorShape): An ids:code property must point from an ids:TransferError to exactly one ids:TerminationCode."@en ; + ] ; + +. \ No newline at end of file diff --git a/transfer/message/shape/transfer-process-shape.ttl b/transfer/message/shape/transfer-process-shape.ttl new file mode 100644 index 00000000..09c920dd --- /dev/null +++ b/transfer/message/shape/transfer-process-shape.ttl @@ -0,0 +1,52 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferProcessShape + a sh:NodeShape ; + sh:targetClass ids:TransferProcess ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:correlationId ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferProcessShape): An ids:correlationId property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:transferState ; + sh:class ids:TransferState ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferProcessShape): An ids:state property must point exactly one ids:TransferState entity."@en ; + ] ; + +. \ No newline at end of file diff --git a/transfer/message/shape/transfer-request-message-shape.ttl b/transfer/message/shape/transfer-request-message-shape.ttl new file mode 100644 index 00000000..fbc5b90b --- /dev/null +++ b/transfer/message/shape/transfer-request-message-shape.ttl @@ -0,0 +1,71 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferRequestMessageShape + a sh:NodeShape ; + sh:targetClass ids:TransferRequestMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:agreementId ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferRequestMessageShape): An ids:agreementId property must point exactly one xsd:anyURI field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:format ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferRequestMessageShape): A dct:format property must point exactly one entity."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:dataAddress ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:message " (TransferRequestMessageShape): An ids:dataAddress property must point zero or one xsd:anyURI field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:callbackAddress ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferRequestMessageShape): An ids:callbackAddress property must point exactly one xsd:anyURI field."@en ; + ] ; +. \ No newline at end of file diff --git a/transfer/message/shape/transfer-start-message-shape.ttl b/transfer/message/shape/transfer-start-message-shape.ttl new file mode 100644 index 00000000..7d01d7d0 --- /dev/null +++ b/transfer/message/shape/transfer-start-message-shape.ttl @@ -0,0 +1,53 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferStartMessageShape + a sh:NodeShape ; + sh:targetClass ids:TransferStartMessage ; + rdfs:subClassOf ids:MessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:correlationId ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (TransferStartMessageShape): An ids:correlationId property must point from an ids:TransferStartMessage to exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:dataAddress ; + sh:datatype xsd:anyURI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (TransferStartMessageShape): An ids:dataAddress property must point from an ids:TransferStartMessage to exactly one xsd:anyURI field."@en ; + ] ; + +. \ No newline at end of file diff --git a/transfer/message/shape/transfer-suspension-message-shape.ttl b/transfer/message/shape/transfer-suspension-message-shape.ttl new file mode 100644 index 00000000..17b6c96b --- /dev/null +++ b/transfer/message/shape/transfer-suspension-message-shape.ttl @@ -0,0 +1,43 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferSuspensionMessageShape + a sh:NodeShape ; + sh:targetClass ids:TransferSuspensionMessage ; + rdfs:subClassOf ids:MessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:correlationId ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (TransferSuspensionMessageShape): An ids:correlationId property must point from an ids:TransferSuspensionMessage to exactly one xsd:string field."@en ; + ] ; + +. \ No newline at end of file diff --git a/transfer/message/shape/transfer-termination-message-shape.ttl b/transfer/message/shape/transfer-termination-message-shape.ttl new file mode 100644 index 00000000..636f0f10 --- /dev/null +++ b/transfer/message/shape/transfer-termination-message-shape.ttl @@ -0,0 +1,53 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix ids: . +@prefix ids_shapes: . + +@prefix sh: . + +shapes: + a owl:Ontology ; + sh:declare [ + sh:prefix "rdf" ; + sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; + ] ; + sh:declare [ + sh:prefix "ids" ; + sh:namespace "https://w3id.org/idsa/v5/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferTerminationMessageShape + a sh:NodeShape ; + sh:targetClass ids:TransferTerminationMessage ; + rdfs:subClassOf ids:MessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:correlationId ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (TransferTerminationMessageShape): An ids:correlationId property must point from an ids:TransferTerminationMessage to exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path ids:code ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (TransferTerminationMessageShape): An ids:code property must point from an ids:TransferTerminationMessage to exactly one entity."@en ; + ] ; + +. \ No newline at end of file diff --git a/transfer/message/transfer.completion.message.json b/transfer/message/transfer-completion-message.json similarity index 100% rename from transfer/message/transfer.completion.message.json rename to transfer/message/transfer-completion-message.json diff --git a/transfer/message/transfer.error.json b/transfer/message/transfer-error.json similarity index 93% rename from transfer/message/transfer.error.json rename to transfer/message/transfer-error.json index 28455a9c..166d9cef 100644 --- a/transfer/message/transfer.error.json +++ b/transfer/message/transfer-error.json @@ -4,7 +4,7 @@ "ids:processId": "urn:uuid:71f8dfab-9337-4e9d-a4c7-524e04443f16", "ids:correlationId": "urn:uuid:4a3ad65e-d78a-4200-a666-fc47aec32f2f", "ids:code": "...", - "ids:reasons": [ + "ids:reason": [ {}, {} ] diff --git a/transfer/message/transfer.process.json b/transfer/message/transfer-process.json similarity index 100% rename from transfer/message/transfer.process.json rename to transfer/message/transfer-process.json diff --git a/transfer/message/transfer.request.message.json b/transfer/message/transfer-request-message.json similarity index 89% rename from transfer/message/transfer.request.message.json rename to transfer/message/transfer-request-message.json index c80867f1..77515d54 100644 --- a/transfer/message/transfer.request.message.json +++ b/transfer/message/transfer-request-message.json @@ -3,7 +3,7 @@ "@id": "urn:uuid:4a3ad65e-d78a-4200-a666-fc47aec32f2f", "@type": "ids:TransferRequestMessage", "ids:agreementId": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44", - "dct:format": "ids:s3+push", + "dct:format": "ids:S3_AWS_PUSH", "ids:dataAddress": {}, "ids:callbackAddress": "https://......" } diff --git a/transfer/message/transfer.start.message.json b/transfer/message/transfer-start-message.json similarity index 100% rename from transfer/message/transfer.start.message.json rename to transfer/message/transfer-start-message.json diff --git a/transfer/message/transfer.suspension.message.json b/transfer/message/transfer-suspension-message.json similarity index 94% rename from transfer/message/transfer.suspension.message.json rename to transfer/message/transfer-suspension-message.json index 4b03f9f1..bf271684 100644 --- a/transfer/message/transfer.suspension.message.json +++ b/transfer/message/transfer-suspension-message.json @@ -5,7 +5,7 @@ "ids:processId": "urn:uuid:24a62493-06eb-45e4-a41c-6de091b51da5", "ids:correlationId": "urn:uuid:4a3ad65e-d78a-4200-a666-fc47aec32f2f", "ids:code": "...", - "ids:reasons": [ + "ids:reason": [ {}, {} ] diff --git a/transfer/message/transfer.termination.message.json b/transfer/message/transfer-termination-message.json similarity index 94% rename from transfer/message/transfer.termination.message.json rename to transfer/message/transfer-termination-message.json index 843821ed..f958cc5f 100644 --- a/transfer/message/transfer.termination.message.json +++ b/transfer/message/transfer-termination-message.json @@ -5,7 +5,7 @@ "ids:processId": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", "ids:correlationId": "urn:uuid:4a3ad65e-d78a-4200-a666-fc47aec32f2f", "ids:code": "...", - "ids:reasons": [ + "ids:reason": [ {}, {} ] diff --git a/transfer/transfer.process.state.machine.png b/transfer/transfer-process-state-machine.png similarity index 93% rename from transfer/transfer.process.state.machine.png rename to transfer/transfer-process-state-machine.png index 7cf211e6..e83c3980 100644 Binary files a/transfer/transfer.process.state.machine.png and b/transfer/transfer-process-state-machine.png differ diff --git a/transfer/transfer.process.state.machine.puml b/transfer/transfer-process-state-machine.puml similarity index 86% rename from transfer/transfer.process.state.machine.puml rename to transfer/transfer-process-state-machine.puml index 81b02f6f..1e5981e2 100644 --- a/transfer/transfer.process.state.machine.puml +++ b/transfer/transfer-process-state-machine.puml @@ -1,7 +1,7 @@ -@startuml "hub-request-processing" +@startuml "transfer-process-state-machine" !pragma layout smetana -!include ../diagrams/diagram.styles.puml +!include ../../diagrams/diagram.styles.puml hide empty description diff --git a/transfer/transfer.process.binding.https.md b/transfer/transfer.process.binding.https.md index e0ce76ce..519cc889 100644 --- a/transfer/transfer.process.binding.https.md +++ b/transfer/transfer.process.binding.https.md @@ -18,7 +18,7 @@ The OpenAPI definitions for this specification can be accessed [here](TBD). ### 2.2 TransferError In the event of a client request error, the connector must return an appropriate HTTP 4xxx client error code. If an error body is returned it must be -a [TransferError](./message/transfer.error.json) with the following properties: +a [TransferError](./message/transfer-error.json) with the following properties: | Field | Type | Description | |-------------------|---------------|---------------------------------------------------------------------| @@ -139,7 +139,7 @@ process state is successfully transitioned, the provider must return HTTP code 2 #### 2.9.1 POST -The consumer connector can POST a [TransferSuspensionMessage](./message/transfer.suspension.message.json) to suspend a transfer process. If the transfer +The consumer connector can POST a [TransferSuspensionMessage](./message/transfer-suspension-message.json) to suspend a transfer process. If the transfer process state is successfully transitioned, the producer must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. ## 3 Consumer Callback Path Bindings @@ -175,5 +175,5 @@ process state is successfully transitioned, the consumer must return HTTP code 2 #### 3.5.1 POST -The provider connector can POST a [TransferSuspensionMessage](./message/transfer.suspension.message.json) to suspend a transfer process. If the transfer +The provider connector can POST a [TransferSuspensionMessage](./message/transfer-suspension-message.json) to suspend a transfer process. If the transfer process state is successfully transitioned, the consumer must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. diff --git a/transfer/transfer.process.protocol.md b/transfer/transfer.process.protocol.md index bed5ad54..0280a8d2 100644 --- a/transfer/transfer.process.protocol.md +++ b/transfer/transfer.process.protocol.md @@ -38,14 +38,14 @@ Asset transfers are characterized as `push` or `pull` transfers and asset data i A push transfer is when the producer data plane initiates sending of asset data to a consumer endpoint. For example, after the consumer has issued an `TransferRequestMessage,` the producer begins data transmission to an endpoint specified by the consumer using an agreed-upon wire protocol. -<< Include example diagram >> +<< TODO: Include example diagram >> #### Pull Transfer A pull transfer is when the consumer data plane initiates retrieval of asset data from a producer endpoint. For example, after the consumer has issued an `TransferProcessStart,` message, the consumer requests the data from the producer-specified endpoint. -<< Include example diagram >> +<< TODO: Include example diagram >> #### Finite and Non-Finite Asset Data @@ -65,21 +65,25 @@ The TP states are: ### Transfer Process State Machine -![](./transfer.process.state.machine.png) +![](./transfer-process-state-machine.png) ## Message Types -### 1. TransferRequestMessage +### 1. Transfer Request Message + +![](./message/diagram/transfer-request-message.png) **Sent by**: Consumer **Resulting State**: REQUESTED -**Example**: [TransferRequestMessage](./message/transfer.request.message.json) +**Example**: [TransferRequestMessage](./message/transfer-request-message.json) + +**Response**: [TransferProcess](./message/transfer-process.json) containing the transfer process id or ERROR. -**Response**: [TransferProcess](./message/transfer.process.json) containing the transfer process id or ERROR. +![](./message/diagram/transfer-process.png) -**Schema**: (xx)[] +**Schema**: [TransferRequestMessage](./message/shape/transfer-request-message-shape.ttl), [TransferRequestMessage JSON Schema](./message/schema/transfer-request-message-schema.json), [TransferProcess Shape](./message/shape/transfer-process-shape.ttl) and the [TransferProcess JSON Schema](./message/schema/transfer-process-schema.json) #### Description @@ -103,18 +107,23 @@ Providers must include a `correlationId` property in the `TransferProcessMessage #### Notes - The 'dataAddress' contains a transport-specific endpoint address for pushing the asset. It may include a temporary authorization token. +- Valid states of a `TransferProcess` are `REQUESTED`, `STARTED`, `TERMINATED`, `COMPLETED`, and `SUSPENDED`. + + +### 2. Transfer Start Message -### 2. TransferStartMessage +![](./message/diagram/transfer-start-message.png) **Sent by**: Provider **Resulting State**: STARTED -**Example**: [TransferStartMessage](./message/transfer.start.message.json) +**Example**: [TransferStartMessage](./message/transfer-start-message.json) **Response**: ACK or ERROR. -**Schema**: (xx)[] +**Schema**: [TransferStartMessageShape](./message/shape/transfer-start-message-shape.ttl) and the [TransferStartMessage JSON Schema](./message/schema/transfer-start-message-schema.json) + #### Description @@ -125,14 +134,56 @@ The _TransferStartMessage_ is sent by the provider to indicate the asset transfe - The 'dataAddress' is only provided if the current transfer is a pull transfer and contains a transport-specific endpoint address for obtaining the asset. It may include a temporary authorization token. -### 3. TransferCompletionMessage +### 3. Transfer Suspension Message + +![](./message/diagram/transfer-suspension-message.png) + +**Sent by**: Provider or Consumer + +**Resulting State**: SUSPENDED + +**Example**: [TransferSuspensionMessage](./message/transfer-suspension-message.json) + +**Response**: ACK or ERROR. + +**Schema**: [TransferSuspensionMessageShape](./message/shape/transfer-suspension-message-shape.ttl) and the [TransferSuspensionMessage JSON Schema](./message/schema/transfer-suspension-message-schema.json) + +#### Description + +The _TransferSuspensionMessage_ is sent by the provider or consumer when either of them needs to temporarily suspend the data transfer. + +### 4. Transfer Completion Message + +![](./message/diagram/transfer-completion-message.png) + +**Sent by**: + +**Resulting State**: + +**Example**: [TransferCompletionMessage](./message/transfer-completion-message.json) + +**Response**: ACK or ERROR. + +**Schema**: [TransferCompletionMessageShape](./message/shape/transfer-completion-message-shape.ttl) and the [TransferCompletionMessage JSON Schema](./message/schema/transfer-completion-message-schema.json) #### Description The _TransferCompletionMessage_ is sent by the provider or consumer when asset transfer has completed. Note that some data plane implementations may optimize completion notification by performing it as part of its wire protocol. In those cases, a _TransferCompletionMessage_ message does not need to be sent. -### 4. TransferTerminationMessage +### 5. Transfer Termination Message + +![](./message/diagram/transfer-termination-message.png) + +**Sent by**: Provider or Consumer + +**Resulting State**: TERMINATED + +**Example**: [TransferTerminationMessage](./message/transfer-termination-message.json) + +**Response**: ACK or ERROR. + +**Schema**: [TransferTerminationMessageShape](./message/shape/transfer-termination-message-shape.ttl) and the [TransferTerminationMessage JSON Schema](./message/schema/transfer-termination-message-schema.json) #### Description @@ -141,11 +192,13 @@ a terminal state. If the termination was due to an error, the sender may include ## TransferError +![](./message/diagram/transfer-error.png) + **Sent by**: Consumer or Provider -**Example**: [TransferError](./message/transfer.error.json) +**Example**: [TransferError](./message/transfer-error.json) -**Schema**: [TransferErrorShape](../../schemas/transfer-error-shape.ttl) +**Schema**: [TransferErrorShape](./message/shape/transfer-error-shape.ttl) and the [TransferError JSON Schema](./message/schema/transfer-error-schema.json) #### Description