diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..00a51af --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf + diff --git a/.gitbook.yaml b/.gitbook.yaml new file mode 100644 index 0000000..502106e --- /dev/null +++ b/.gitbook.yaml @@ -0,0 +1,5 @@ +root: ./ + +structure: + readme: README.md + summary: SUMMARY.md \ No newline at end of file diff --git a/.github/workflows/prevent-file-changes.yml b/.github/workflows/prevent-file-changes.yml new file mode 100644 index 0000000..d24e6b9 --- /dev/null +++ b/.github/workflows/prevent-file-changes.yml @@ -0,0 +1,17 @@ +name: Prevent Changes to Release Files + +on: + pull_request: + branches: [ main ] + types: [opened, edited, synchronize, reopened, labeled, unlabeled] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Prevent file change + uses: xalvarez/prevent-file-change-action@v1 + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + pattern: releases/.* + allowNewFiles: true \ No newline at end of file diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..bc7883f --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,47 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Create HEAD release + shell: bash + run: |- + mkdir releases/head + rsync -Rav --prune-empty-dirs --exclude="releases/**" --include="*/" --include="**/*.json" --exclude="**" ./ ./releases/head/ + rsync -Rav --prune-empty-dirs --exclude="releases/**" --include="*/" --include="**/*.ttl" --exclude="**" ./ ./releases/head/ + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + # Upload releases folder + path: ./releases/ + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2675b1f --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +*.log +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +.idea +*.iml +.vs +.vscode + +/secrets +**/secrets + +.DS_Store +.env diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2bb9ad2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/README.md b/README.md index 999b24e..0becdcf 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,79 @@ -# DataspaceProtocol -The Dataspace Protocol is a set of specifications designed to facilitate interoperable data sharing between entities governed by usage control and based on Web technologies. These specifications define the schemas and protocols required for entities to publish data, negotiate Agreements, and access data in a data space +# Dataspace Protocol Release 2024-1 + +> __NOTE:__ For GitHub users, the link to the rendered content is [https://docs.internationaldataspaces.org/dataspace-protocol/](https://docs.internationaldataspaces.org/dataspace-protocol/). +> +> __NOTE:__ The human-friendly version of this specification in the [IDSA Knowledge base](https://docs.internationaldataspaces.org/dataspace-protocol/) will always show the latest version of the document. The version history and changes are provided via the [GitHub Repository](https://github.com/International-Data-Spaces-Association/ids-specification/). + +## About versions of the Dataspace Protocol + +This version ([2024-1](https://github.com/International-Data-Spaces-Association/ids-specification/tree/main/releases/2024-1)) of the Dataspace Protocol specification is the release candidate and considered to be stable. Further changes shall not affect conformity. + Since [version 0.8](https://github.com/International-Data-Spaces-Association/ids-specification/tree/main/releases/v0.8) the specification is stable with changes in details. All changes made to the specification can be reviewed in the [GitHub repository](https://github.com/International-Data-Spaces-Association/ids-specification/). + +> __NOTE:__ A versioning scheme beside the commits to the repository is not available but will be provided in the future. + +## Abstract + +The __Dataspace Protocol__ is a set of specifications designed to facilitate interoperable data sharing between entities governed by usage control and based on Web technologies. These specifications define the schemas and protocols required for entities to publish data, negotiate [Agreements](./model/terminology.md#agreement), and access data as part of a federation of technical systems termed a [Dataspace](./model/terminology.md#dataspace). + +## Introduction + +Sharing data between autonomous entities requires the provision of metadata to facilitate the transfer of [Datasets](./model/terminology.md#dataset) by making use of a data transfer (or application layer) protocol. +The __Dataspace Protocol__ defines how this metadata is provisioned: + +1. How [Datasets](./model/terminology.md#dataset) are deployed as [DCAT Catalogs](https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog) and usage control is expressed as [ODRL Policies](https://www.w3.org/TR/odrl-model/). +2. How [Agreements](./model/terminology.md#agreement) that govern data usage are syntactically expressed and electronically negotiated. +3. How [Datasets](./model/terminology.md#dataset) are accessed using [Transfer Process Protocols](./model/terminology.md#transfer-process-protocol). + +These specifications build on protocols located in the [ISO OSI model (ISO/IEC 7498-1:1994)](https://www.iso.org/standard/20269.html) layers, like HTTPS. +The purpose of this specification is to define interactions between systems independent of such protocols, but describing how to implement it in an unambiguous and extensible way. +To do so, the messages that are exchanged during the process are described in this specification and the states and their transitions are specified as state machines, based on the key terms and concepts of a [Dataspace](./model/terminology.md#dataspace). +On this foundation the bindings to data transfer protocols, like HTTPS, are described. + +The specifications are organized into the following documents: + +* [__*Dataspace Model*__](./model/model.md) and [__*Dataspace Terminology*__](./model/terminology.md) documents that define key terms. +* [__*Common Functionalities*__](./common/common.protocol.md) and their [__*Binding in HTTPS*__](./common/common.binding.https.md) declares cross-cutting functions as, e.g., the declaration of supported versions of this Dataspace Protocol. +* [__*Catalog Protocol*__](./catalog/catalog.protocol.md) and [__*Catalog HTTPS Binding*__](./catalog/catalog.binding.https.md) documents that define how [DCAT Catalogs](https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog) are published and accessed as HTTPS endpoints respectively. +* [__*Contract Negotiation Protocol*__](./negotiation/contract.negotiation.protocol.md) and [__*Contract Negotiation HTTPS Binding*__](./negotiation/contract.negotiation.binding.https.md) documents that define how [Contract Negotiations](./model/terminology.md#contract-negotiation) are conducted and requested via HTTPS endpoints. +* [__*Transfer Process Protocol*__](./transfer/transfer.process.protocol.md) and [__*Transfer Process HTTPS Binding*__](./transfer/transfer.process.binding.https.md) documents that define how [Transfer Processes](./model/terminology.md#transfer-process) using a given data transfer protocol are governed via HTTPS + endpoints. + +> **This specification does not cover the data transfer process as such.** +> +> While the data transfer is controlled by the __*Transfer Process Protocol*__ mentioned above, e.g. the initation of the transfer channels or their decomissioning, the data transfer itself and especially the handling of technical exceptions is an obligation to the Transport Protocol. +> +> As an implication, the data transfer can be conducted in a separated process if required, as long as this process is to the specified extend controlled by the __*Transfer Process Protocol*__. +> +> Nevertheless, illustrative message examples are provided in the [__*Transfer Process Protocol section*__](./transfer/transfer.process.protocol.md#2-message-types). The best practices section may contain further non-normative examples and explanations. + +### Context of this specification + +The __Dataspace Protocol__ is used in the context of [Dataspaces](./model/terminology.md#dataspace) as described and defined in the subsequent sections with the purpose to support interoperability. +In this context, the specification provides fundamental technical interoperability for [Participants](./model/terminology.md#participant) in [Dataspaces](./model/terminology.md#dataspace). +Beyond the technical interoperability measures described in this specification, semantic interoperability should also be addressed by the [Participants](./model/terminology.md#participant). On the perspective of the [Dataspace](./model/terminology.md#dataspace), interoperability needs to be addressed also on the level of trust, on organizational levels, and on legal levels. +The aspect of cross-dataspace communication is not subject of this document, as this is addressed by the [Dataspaces'](./model/terminology.md#dataspace) organizational and legal agreements. + +The interaction of [Participants](./model/terminology.md#participant) in a [Dataspace](./model/terminology.md#dataspace) is conducted by the [Participant Agents](./model/terminology.md#participant-agent), so-called [Connectors](./model/terminology.md#connector--data-service-), which implement the protocols described above. +While most interactions take place between [Connectors](./model/terminology.md#connector--data-service-), some interactions with other systems are required. +The figure below provides an overview on the context of this specification. + +An [Identity Provider](./model/terminology.md#identity-provider) realizes the required interfaces and provides required information to implement the Trust Framework of a [Dataspace](./model/terminology.md#dataspace). +The validation of the identity of a given [Participant Agent](./model/terminology.md#participant-agent) and the validation of additional claims is a fundamental mechanism. The structure and content of such claims and identities may, however, vary between different [Dataspaces](./model/terminology.md#dataspace), as well as the structure of such an [Identity Provider](./model/terminology.md#identity-provider), e.g. a centralized system, a decentralized system or a federated system. Other specifications, like the Identity and Trust Protocol ([IATP](https://github.com/eclipse-tractusx/identity-trust)), define the respective functions. + +A [Connector](./model/terminology.md#connector--data-service-) will implement additional internal functionalities, like monitoring or policy engines, as appropriate. It is not covered by this specification if a [Connector](./model/terminology.md#connector--data-service-) implements such or how. + +The same applies for the actual data that is transferred between the systems. While this document does not define the transport protocol, the structure, syntax or semantics of the data, a specification for those aspects is required and subject to the agreements of the [Participants](./model/terminology.md#participant) or the [Dataspace](./model/terminology.md#dataspace). + +![Overview on protocol and context](./resources/figures/ProtocolOverview.png) + +## Best Practices + +The Dataspace Protocol is under development and the working group is active on this draft, reviewed and improved the content multiple times. During the process several aspects were discussed, which are not considered part of the normative specification, but important to be documented as support for the users of this specification as best practices. The [Best Practices](./best.practices/README.md) are non-normative. + +Users of this specification are invited to provide feedback such as, but not limited to: + +* What information is missing? +* What information, including examples, would you like to see? +* What did you like in this document? + +Please provide your feedback as Issue in our [GitHub repository](https://github.com/International-Data-Spaces-Association/ids-specification/issues). diff --git a/SUMMARY.md b/SUMMARY.md new file mode 100644 index 0000000..568ef2c --- /dev/null +++ b/SUMMARY.md @@ -0,0 +1,40 @@ +# Summary + +## Overview + +* [Dataspace Protocol 2024-1](./README.md) +* [Terminology](./model/terminology.md) +* [Information Model](./model/model.md) + +## Common Functionalities + +* [Specification](./common/common.protocol.md) +* [Binding: HTTPS](./common/common.binding.https.md) + +## Catalog + +* [Specification](./catalog/catalog.protocol.md) +* [Binding: HTTPS](./catalog/catalog.binding.https.md) + +## Contract Negotiation + +* [Specification](./negotiation/contract.negotiation.protocol.md) +* [Binding: HTTPS](./negotiation/contract.negotiation.binding.https.md) + +## Transfer Process + +* [Specification](./transfer/transfer.process.protocol.md) +* [Binding: HTTPS](./transfer/transfer.process.binding.https.md) + +## List of Files + +* [Common](./resources/list_common.md) +* [Figures](./resources/list_figures.md) +* [Messages](./resources/list_messages.md) +* [Schemes](./resources/list_schemes.md) +* [Shapes](./resources/list_shapes.md) + +## Best Practices + +* [Introduction](./best.practices/README.md) +* [Related Documents](./best.practices/related.documents.md) diff --git a/best.practices/README.md b/best.practices/README.md new file mode 100644 index 0000000..162f815 --- /dev/null +++ b/best.practices/README.md @@ -0,0 +1,33 @@ +# Dataspace Protocol Best Practices + + +## Abstract + +This document presents best practices for the usage of the Dataspace Protocol. + +## Status of this document + +The Best Practices are created and published by the International Data Spaces Association and are not considered to be normative. The specification of the Dataspace Protocol itself is normative. As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. + +The key words *MAY*, *MUST*, and *MUST NOT* in this document are to be interpreted as described in [RFC2119](https://www.rfc-editor.org/rfc/rfc2119) and [RFC8174](https://www.rfc-editor.org/rfc/rfc8174) when, and only when, they appear in all capitals, as shown here. + +## Introduction + +The Dataspace Protocol is under development and the working group is active on this draft. We have reviewed and improved the content multiple times. During the process several aspects were discussed, which are not considered to be part of the specification itself, but important to be documented as support for the users of this specification as best practices. The examples in this document are non-normative. + +> Users of this specification are invited to provide feedback such as, but not limited to: +> +> * What information is missing? +> * What information, including examples, would you like to see? +> * What did you like in this document? +> +> Please provide your feedback as Issue in our [GitHub repository](https://github.com/International-Data-Spaces-Association/ids-specification/issues). + +The remainder of the document is structured as follows: + +* [**Related documents:**](./related.documents.md) provides useful resources for understanding the overarching concepts of [Dataspaces](../model/terminology.md#dataspace) and other foundational documents. +* [**Extensions:**](./extensions.md) How to extend the Dataspace Protocol. +* [**Examples:**](./examples.md) Living examples to foster the understanding of the Dataspace Protocol. +* [**How to create Bindings**](./bindings.md) +* [**Known Implementations of the Dataspace Protocol**](./implementations.md) +* [**Security related considerations**](./security.considerations.md) diff --git a/best.practices/bindings.md b/best.practices/bindings.md new file mode 100644 index 0000000..7875ec1 --- /dev/null +++ b/best.practices/bindings.md @@ -0,0 +1 @@ +# How to create bindings diff --git a/best.practices/examples.md b/best.practices/examples.md new file mode 100644 index 0000000..df635b4 --- /dev/null +++ b/best.practices/examples.md @@ -0,0 +1 @@ +# Examples diff --git a/best.practices/extensions.md b/best.practices/extensions.md new file mode 100644 index 0000000..9155989 --- /dev/null +++ b/best.practices/extensions.md @@ -0,0 +1,3 @@ +# Extending the Dataspace Protocol + +You don't want to this... diff --git a/best.practices/implementations.md b/best.practices/implementations.md new file mode 100644 index 0000000..6aa24e7 --- /dev/null +++ b/best.practices/implementations.md @@ -0,0 +1 @@ +# Known implementations diff --git a/best.practices/related.documents.md b/best.practices/related.documents.md new file mode 100644 index 0000000..3df3f30 --- /dev/null +++ b/best.practices/related.documents.md @@ -0,0 +1 @@ +# Related Documents diff --git a/best.practices/security.considerations.md b/best.practices/security.considerations.md new file mode 100644 index 0000000..778792c --- /dev/null +++ b/best.practices/security.considerations.md @@ -0,0 +1 @@ +# Security related considerations diff --git a/catalog/catalog.binding.https.md b/catalog/catalog.binding.https.md new file mode 100644 index 0000000..c4e4b37 --- /dev/null +++ b/catalog/catalog.binding.https.md @@ -0,0 +1,146 @@ +# Catalog HTTPS Binding + +This specification defines a RESTful API over HTTPS for the [Catalog Protocol](./catalog.protocol.md). + +* [1 Introduction](#1-introduction) + * [1.1 Prerequisites](#11-prerequisites) + * [1.2 Catalog Error](#12-catalog-error) +* [2 Path Bindings](#2-path-bindings) + * [2.1 The `catalog/request` Endpoint (Provider-side)](#21-the-catalogrequest-endpoint--provider-side-) + * [2.2 The `catalog/datasets/:id` Endpoint (Provider-side)](#22-the-catalogdatasetsid-endpoint--provider-side-) +* [3 Technical Considerations](#3-technical-considerations) + * [3.1 Pagination](#31-pagination) + * [3.2 Compression](#32-compression) +* [4 The Well-Known Proof Metadata Endpoint](#4-the-well-known-proof-metadata-endpoint) + +## 1 Introduction + +### 1.1 Prerequisites + +1. The `` notation indicates the base URL for a [Catalog Service](../model/terminology.md#catalog-service) endpoint. For example, if the base [Catalog](../model/terminology.md#catalog) URL is `api.example.com`, the URL `https:///catalog/request` will map to `https//api.example.com/catalog/request`. + +2. All request and response messages must use the `application/json` media type. + +### 1.2 Catalog Error + +In the event of a request error, the [Catalog Service](../model/terminology.md#catalog-service) must return an appropriate HTTP code and a [Catalog Error](./catalog.protocol.md#33-error---catalog-error) in the response body. + +## 2 Path Bindings + +| Endpoint | Method | Description | +|:------------------------------------------|:-------|:---------------------------| +| https://provider.com/catalog/request | `POST` | Section [2.1.1](#211-post) | +| https://provider.com/catalog/datasets/:id | `GET` | Section [2.2.1](#221-get) | + +### 2.1 The `catalog/request` Endpoint (Provider-side) + +#### 2.1.1 POST + +##### Request + +The [Catalog Request Message](./catalog.protocol.md#21-catalog-request-message) corresponds to `POST https:///catalog/request`: + +```http request +POST https://provider.com/catalog/request + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:CatalogRequestMessage", + "dspace:filter": {} +} +``` + +- The `Authorization` header is optional if the [Catalog Service](../model/terminology.md#catalog-service) does not require authorization. If present, the contents of the `Authorization` header are detailed in the [Authorization section](../common/common.binding.https.md#2-authorization). + +- The `filter` property is optional. If present, the `filter` property can contain an implementation-specific filter expression or query to be executed as part of the [Catalog](../model/terminology.md#catalog) request. If a filter expression is not supported by an implementation, it must return a HTTP 400 (Bad Request) response. + +##### Response + +If the request is successful, the [Catalog Service](../model/terminology.md#catalog-service) must return an HTTP 200 (OK) with a response body containing a [Catalog](./catalog.protocol.md#31-ack---catalog) (which is a profiled [DCAT Catalog](https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog) type described by the [Catalog Protocol](catalog.protocol.md)). + +### 2.2 The `catalog/datasets/:id` Endpoint (Provider-side) + +#### 2.2.1 GET + +##### Request + +The [Dataset Request Message](./catalog.protocol.md#22-dataset-request-message) corresponds to `GET https:///catalog/datasets/:id}`: + +```http request +GET https://provider.com/catalog/datasets/{id} + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:DatasetRequestMessage", + "dspace:dataset": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88" +} +``` + +- The `Authorization` header is optional if the [Catalog Service](../model/terminology.md#catalog-service) does not require authorization. If present, the contents of the `Authorization` header are detailed in the [Authorization section](../common/common.binding.https.md#2-authorization). + +##### Response + +If the request is successful, the [Catalog Service](../model/terminology.md#catalog-service) must return an HTTP 200 (OK) with a response body containing a [Dataset](./catalog.protocol.md#32-ack---dataset) (which is a [DCAT Dataset](https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset) type described by the [Catalog Protocol](catalog.protocol.md)). + +## 3 Technical Considerations + +### 3.1 Pagination + +A [Catalog Service](../model/terminology.md#catalog-service) may paginate the results of a [Catalog Request Message](./catalog.protocol.md#21-catalog-request-message). Pagination data must be specified using [Web Linking](https://datatracker.ietf.org/doc/html/rfc5988) and the HTTP `Link` header. The `Link` header will contain URLs for navigating to previous and subsequent results. Only the `next` and `previous` link relation types must be supported. +Note that the content and structure of the link query parameters is not defined by the current specification. + +The following request sequence demonstrates pagination: + +```http request +Link: ; rel="next" + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dcat:Catalog", + ... +} +``` + +Second page response: + +```http request +Link: ; rel="previous" +Link: ; rel="next" + +{ + "@type": "dcat:Catalog", + ... +} +``` + +Last page response: + +```http request +Link: ; rel="previous" + +{ + "@type": "dcat:Catalog", + ... +} +``` + +### 3.2 Compression + +[Catalog Services](../model/terminology.md#catalog-service) MAY compress responses to a [Catalog Request](./catalog.protocol.md#21-catalog-request-message) by setting the `Content-Encoding` header to `gzip` as described in the [HTTP 1.1 Specification](https://www.rfc-editor.org/rfc/rfc9110.html#name-gzip-coding). + + +## 4 The Well-Known Proof Metadata Endpoint + +When an implementation supports protected [Datasets](../model/terminology.md#dataset), it may offer a proof metadata endpoint clients can use to determine proof requirements. If the implementation offers a proof data endpoint, it must use the `dspace-trust` [Well-Known Uniform Resource Identifier](https://www.rfc-editor.org/rfc/rfc8615.html) at the top of the path hierarchy: + +``` +/.well-known/dspace-trust +``` + +The contents of the response is a JSON object defined by individual trust specifications and not defined here. + +Note that if multiple [Connectors](../model/terminology.md#connector--data-service-) are hosted under the same base URL, an arbitrary path segment appended to the base well-known URL can be used, for example, `https://example.com/.well-known/dspace-trust/connector1.` In this case, the document retrievable at the `dspace-trust` path segment must contain all the child paths. diff --git a/catalog/catalog.protocol.md b/catalog/catalog.protocol.md new file mode 100644 index 0000000..8429f11 --- /dev/null +++ b/catalog/catalog.protocol.md @@ -0,0 +1,191 @@ +# Catalog Protocol + +This document outlines the [Catalog Protocol](../model/terminology.md#catalog-protocol). The used terms are described [here](../model/terminology.md). + +* [1 Introduction](#1-introduction) + * [1.1 DCAT Vocabulary Mapping](#11-dcat-vocabulary-mapping) + * [1.1.1 Dataset](#111-dataset) + * [odrl:hasPolicy](#odrl--haspolicy) + * [1.1.2 Distributions](#112-distributions) + * [1.1.3 Data Service](#113-data-service) + * [dspace:dataServiceType](#dspace--dataservicetype) + * [dcat:servesDataset](#dcat--servesdataset) + * [1.1.4 Participant Id](#114-participant-id) + * [1.2 DCAT and ODRL Profiles](#12-dcat-and-odrl-profiles) +* [2 Message Types](#2-message-types) + * [2.1 Catalog Request Message](#21-catalog-request-message) + * [2.2 Dataset Request Message](#22-dataset-request-message) +* [3 Response Types](#3-response-types) + * [3.1 ACK - Catalog](#31-ack---catalog) + * [3.2 ACK - Dataset](#32-ack---dataset) + * [3.3 ERROR - Catalog Error](#33-error---catalog-error) +* [4 Technical Considerations](#4-technical-considerations) + * [4.1 Queries and Filter Expressions](#41-queries-and-filter-expressions) + * [4.2 Replication Protocol](#42-replication-protocol) + * [4.3 Security](#43-security) + * [4.3.1 The Proof Metadata Endpoint](#431-the-proof-metadata-endpoint) + * [4.4 Catalog Brokers](#44-catalog-brokers) + +## 1 Introduction + +The Catalog Protocol defines how a [Catalog](../model/terminology.md#catalog) is requested from a [Catalog Service](../model/terminology.md#catalog-service) by a [Consumer](../model/terminology.md#consumer) using an abstract message exchange format. The concrete message exchange wire format is defined in the binding specifications. + +### 1.1 DCAT Vocabulary Mapping + +This section describes how the DSP Information Model maps to [DCAT](https://www.w3.org/TR/vocab-dcat-3/) resources. + +#### 1.1.1 Dataset + +A [Dataset](../model/terminology.md#dataset) is a [DCAT Dataset](https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset) with the following attributes: + +##### odrl:hasPolicy + +A [Dataset](../model/terminology.md#dataset) must have 1..N `hasPolicy` attributes that contain an [ODRL `Offer`](https://www.w3.org/TR/odrl-vocab/#term-Offer) defining the [Usage Policy](../model/terminology.md#policy) associated with the [Catalog](../model/terminology.md#catalog). Offers must NOT contain any +explicit `target` attributes. The `target` of an [Offer](../model/terminology.md#offer) is the associated [Dataset](../model/terminology.md#dataset). This is in line with the semantics of `hasPolicy` as defined in the [ODRL Information Model](https://www.w3.org/TR/odrl-model/#policy-has), explaining that the subject (here the Dataset) is automatically the `target` of each Rule. To prevent conflicts, the `target` attribute must not be set explicitely, for example, in the [Offer](../model/terminology.md#offer) or Rules. + +#### 1.1.2 Distributions + +A [Dataset](../model/terminology.md#dataset) may contain 0..N [DCAT Distributions](https://www.w3.org/TR/vocab-dcat-3/#Class:Distribution). Each distribution must have at least one `DataService` which specifies where the distribution is obtained. Specifically, a `DataService` specifies the endpoint for initiating a [Contract Negotiation](../model/terminology.md#contract-negotiation) and [Transfer Process](../model/terminology.md#transfer-process). + +A Distribution may have 0..N `hasPolicy` attributes that contain an [ODRL Offer](https://www.w3.org/TR/odrl-vocab/#term-Offer) defining the [Usage Policy](../model/terminology.md#policy) associated with the [Dataset](../model/terminology.md#dataset) and this explicit `Distribution`. [Offers](../model/terminology.md#offer) must NOT contain any target attributes. The target of an [Offer](../model/terminology.md#offer) is the [Dataset](../model/terminology.md#dataset) that contains the distribution. + +Support for `hasPolicy` attributes on a `Distribution` is optional. Implementations may choose not to support this feature, in which case they should return an appropriate error message to clients. + +#### 1.1.3 Data Service + +A Data Service may specify an endpoint supporting the Dataspace Protocol such as a [Connector](../model/terminology.md#connector--data-service-). + +##### dspace:dataServiceType + +If the Data Service refers to an endpoint that supports the Dataspace Protocol, it must include the property `dspace:dataServiceType`: + +| Category | Description | +|------------|----------------------------------------------------------------------------| +| Definition | Specifies the service type | +| Domain | [dcat:DataService](https://www.w3.org/TR/vocab-dcat-2/#Class:Data_Service) | +| Type | xsd:string | +| Note | The value of this field is left intentionally open for future extension. | + +The following table lists well-know endpoint types: + +| Value | Description | +|--------------------|---------------------------------------------------------------------------| +| `dspace:connector` | A [Connector](../model/terminology.md#connector--data-service-) endpoint. | +| | | + +##### dcat:servesDataset + +Note that the property `dcat:servesDataset` should be omitted from the `DataService` since [Datasets](../model/terminology.md#dataset) are included as top-level entries. Clients are not required to process the contents of `dcat:servesDataset`. + +#### 1.1.4 Participant Id + +The identifier of the participant providing the [Catalog](../model/terminology.md#catalog) is specified using the `dspace:participantId` attribute on that [DCAT Catalog](https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog). + +### 1.2 DCAT and ODRL Profiles + +The [Catalog](../model/terminology.md#catalog) is a [DCAT Catalog](https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog) with the following restrictions: + +1. Each [ODRL `Offer`](https://www.w3.org/TR/odrl-vocab/#term-Offer) must be unique to a [Dataset](../model/terminology.md#dataset) since the target of the [Offer](../model/terminology.md#offer) is derived from its enclosing context. +2. A [Catalog](../model/terminology.md#catalog) must not have an `odrl:hasPolicy` attribute, since it is not intended to negotiate on the access to [Catalog](../model/terminology.md#catalog) objects. An implementation might however regulate the visibility and/or the content of its [Catalog](../model/terminology.md#catalog) dependent of the requester. + +## 2 Message Types + +All messages must be serialized in JSON-LD compact form as specified in the [JSON-LD 1.1 Processing Algorithms and API](https://www.w3.org/TR/json-ld11-api/#compaction-algorithms). Further [Dataspace](../model/terminology.md#dataspace) specifications may define additional optional serialization formats. + +### 2.1 Catalog Request Message + +| | | +|---------------------|-------------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer) | +| **Resulting state** | `TERMINATED` | +| **Response** | [ACK](#31-ack---catalog) or [ERROR](#33-error---catalog-error) | +| **Schema** | [TTL Shape](./message/shape/catalog-request-message-shape.ttl), [JSON Schema](./message/schema/catalog-request-message-schema.json) | +| **Example** | [Message](./message/example/catalog-request-message.json) | +| **Diagram(s)** | ![](./message/diagram/catalog-request-message.png) | + +The Catalog Request Message is message sent by a [Consumer](../model/terminology.md#consumer) to a [Catalog Service](../model/terminology.md#catalog-service). The [Catalog Service](../model/terminology.md#catalog-service) must respond with a [Catalog](#31-ack---catalog), which is a valid instance of a [DCAT Catalog](https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog). + +- The message may have a `filter` property which contains an implementation-specific query or filter expression type supported by the [Catalog Service](../model/terminology.md#catalog-service). + +- The [Catalog Service](../model/terminology.md#catalog-service) may require an authorization token. Details for including that token can be found in the protocol binding, e.g., [Catalog HTTPS Binding](./catalog.binding.https.md). Similarly, pagination may be defined in the protocol binding. + +### 2.2 Dataset Request Message + +| | | +|---------------------|-------------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer) | +| **Resulting state** | `TERMINATED` | +| **Response** | [ACK](#31-ack---catalog) or [ERROR](#33-error---catalog-error) | +| **Schema** | [TTL Shape](./message/shape/dataset-request-message-shape.ttl), [JSON Schema](./message/schema/dataset-request-message-schema.json) | +| **Example** | [Message](./message/example/dataset-request-message.json) | +| **Diagram(s)** | ![](./message/diagram/dataset-request-message.png) | + +The Dataset Request Message is message sent by a [Consumer](../model/terminology.md#consumer) to a [Catalog Service](../model/terminology.md#catalog-service). The [Catalog Service](../model/terminology.md#catalog-service) must respond with a [Dataset](#32-ack---dataset), which is a valid instance of a [DCAT Dataset](https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset). + +- The message must have a `dataset` property which contains the id of the [Dataset](../model/terminology.md#dataset). + +- The [Catalog Service](../model/terminology.md#catalog-service) may require an authorization token. Details for including that token can be found in the protocol binding, e.g., [Catalog HTTPS Binding](./catalog.binding.https.md). + +## 3 Response Types + +The `ACK` and `ERROR` response types are mapped onto a protocol such as HTTPS. A description of an error might be provided in protocol-dependent forms, e.g., for an HTTPS binding in the request or response body. + +### 3.1 ACK - Catalog + +| | | +|-----------------|---------------------------------------------------------------------------------------------------| +| **Sent by** | [Provider](../model/terminology.md#provider) | +| **Schema** | [TTL Shape](./message/shape/dcat-shapes.ttl), [JSON Schema](./message/schema/catalog-schema.json) | +| **Example** | [Catalog Example](./message/example/catalog.json) | +| **Diagram(s)** | ![](./message/diagram/catalog.png) | + +The [Catalog](../model/terminology.md#catalog) contains all [Datasets](#111-dataset) which the requester shall see. + +### 3.2 ACK - Dataset + +| | | +|-----------------|---------------------------------------------------------------------------------------------------| +| **Sent by** | [Provider](../model/terminology.md#provider) | +| **Schema** | [TTL Shape](./message/shape/dcat-shapes.ttl), [JSON Schema](./message/schema/dataset-schema.json) | +| **Example** | [Dataset Example](./message/example/dataset.json) | +| **Diagram(s)** | ![](./message/diagram/dataset.png) | + +### 3.3 ERROR - Catalog Error + +| | | +|-----------------|-----------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer), [Provider](../model/terminology.md#provider) | +| **Schema** | [TTL Shape](./message/shape/catalog-error-shape.ttl), [JSON Schema](./message/schema/catalog-error-schema.json) | +| **Example** | [Error](./message/example/catalog-error.json) | +| **Diagram(s)** | ![](./message/diagram/catalog-error.png) | + +A Catalog Error is used when an error occurred after a [Catalog Request Message](#21-catalog-request-message) or a [Dataset Request Message](#22-dataset-request-message) and the [Provider](../model/terminology.md#provider) cannot provide its [Catalog](../model/terminology.md#catalog) to the requester. + +| Field | Type | Description | +|-----------|---------------|-------------------------------------------------------------| +| `code` | String | An optional implementation-specific error code. | +| `reasons` | Array[object] | An optional array of implementation-specific error objects. | + +## 4 Technical Considerations + +### 4.1 Queries and Filter Expressions + +A [Catalog Service](../model/terminology.md#catalog-service) may support [Catalog](../model/terminology.md#catalog) queries or filter expressions as an implementation-specific feature. However, it is expected that query capabilities will be implemented by the [Consumer](../model/terminology.md#consumer) against the results of a [Catalog Request Message](#21-catalog-request-message), as the latter is an RDF vocabulary. Client-side querying can be scaled by periodically crawling the [Provider's](../model/terminology.md#provider) [Catalog Services](../model/terminology.md#catalog-service), caching the results, and executing queries against the locally-stored [Catalogs](../model/terminology.md#catalog). + +### 4.2 Replication Protocol + +The [Catalog Protocol](../model/terminology.md#catalog-protocol) is designed to be used by federated services without the need for a replication protocol. Each [Consumer](../model/terminology.md#consumer) is responsible for issuing requests to 1..N [Catalog Services](../model/terminology.md#catalog-service), and managing the results. It follows that a specific replication protocol is not needed, or more precisely, each [Consumer](../model/terminology.md#consumer) replicates data from catalog services by issuing [Catalog Request Messages](#21-catalog-request-message). + +The discovery protocol adopted by a particular [Dataspace](../model/terminology.md#dataspace) defines how a [Consumer](../model/terminology.md#consumer) discovers [Catalog Services](../model/terminology.md#catalog-service). + +### 4.3 Security + +It is expected (although not required) that [Catalog Services](../model/terminology.md#catalog-service) implement access control. A [Catalog](../model/terminology.md#catalog) as well as individual [Datasets](../model/terminology.md#dataset) may be restricted to trusted parties. The [Catalog Service](../model/terminology.md#catalog-service) may require [Consumers](../model/terminology.md#consumer) to include a security token along with a [Catalog Request Message](#21-catalog-request-message). The specifics of how this is done can be found in the relevant protocol binding, e.g., [Catalog HTTPS Binding](./catalog.binding.https.md). The semantics of such tokens are not part of this specification. + +#### 4.3.1 The Proof Metadata Endpoint + +When a [Catalog](../model/terminology.md#catalog) contains protected [Datasets](../model/terminology.md#dataset) the [Provider](../model/terminology.md#provider) has two options: include all [Datasets](../model/terminology.md#dataset) in the [Catalog](../model/terminology.md#catalog) response and restrict access when a contract is negotiated; or, require one or more proofs when the [Catalog Request](#21-catalog-request-message) is made and filter the [Datasets](../model/terminology.md#dataset) accordingly. The latter option requires a mechanism for clients to discover the type of proofs that may be presented at request time. The specifics of proof types and presenting a proof during a [Catalog](../model/terminology.md#catalog) request is outside the scope of the Dataspace Protocol. However, [Catalog Protocol](../model/terminology.md#catalog-protocol) bindings should define a proof data endpoint for obtaining this information. + +### 4.4 Catalog Brokers + +A [Dataspace](../model/terminology.md#dataspace) may include Catalog Brokers. A Catalog Broker is a [Consumer](../model/terminology.md#consumer) that has trusted access to 1..N upstream [Catalog Services](../model/terminology.md#catalog-service) and advertises their respective [Catalogs](../model/terminology.md#catalog) as a single [Catalog Service](../model/terminology.md#catalog-service). The broker is expected to honor upstream access control requirements. diff --git a/catalog/message/diagram/catalog-error.png b/catalog/message/diagram/catalog-error.png new file mode 100644 index 0000000..1e361a4 Binary files /dev/null and b/catalog/message/diagram/catalog-error.png differ diff --git a/catalog/message/diagram/catalog-error.puml b/catalog/message/diagram/catalog-error.puml new file mode 100644 index 0000000..165f2e1 --- /dev/null +++ b/catalog/message/diagram/catalog-error.puml @@ -0,0 +1,16 @@ +@startuml "catalog-error" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "dspace:CatalogError" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:CatalogError" + dspace:code : String + dspace: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 0000000..367ac42 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 0000000..2e2760a --- /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 "dspace:CatalogRequestMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : dspace:CatalogRequestMessage + dspace: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 0000000..767c346 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 0000000..225b660 --- /dev/null +++ b/catalog/message/diagram/catalog.puml @@ -0,0 +1,85 @@ +@startuml "catalog" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class dcat:Catalog { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dcat:Catalog" + foaf:homepage : String + dcat:theme : Array + dcat:keyword : Array + dct:conformsTo : String + dct:creator : String + dct:identifier : String + dct:issued : String + dct:modified : String + dct:title : String + dspace:participantId : String + dct:description : Array + ... +} + +"dcat:Catalog" "0" *-- "*" "dcat:Dataset" : "dcat:dataset" + +"dcat:Catalog" "0" *-- "*" "dcat:DataService" : "dcat:service" + +"dcat:Catalog" "0" --> "*" "odrl:Offer" : "odrl:hasPolicy" + + +class dcat:Dataset { + @type : "dcat:Dataset", + dcat:theme : Array + dcat:keyword : Array + dct:conformsTo : String + dct:creator : String + dct:identifier : String + dct:issued : String + dct:modified : String + dct:title : String + dct:description : Array + ... +} + +"dcat:Dataset" "1" --> "*" "odrl:Offer" : "odrl:hasPolicy" + +"dcat:Dataset" "0" --> "*" "dcat:Distribution" : "dcat:distribution" + +class dcat:DataService { + dcat:endpointDescription : String + dcat:endpointURL : String + dcat:theme : Array + dcat:keyword : Array + dct:conformsTo : String + dct:creator : String + dct:identifier : String + dct:issued : String + dct:modified : String + dct:title : String + dct:description : Array + ... +} + +"dcat:DataService" "0" --> "*" "dcat:Dataset" : "dcat:servesDataset" + +"dcat:DataService" "0" --> "*" "odrl:Offer" : "odrl:hasPolicy" + + +class dcat:Distribution { + @type : "dcat:Distribution", + dct:title : String + dct:description : Array + dct:issued : String + dct:modified : String + ... +} + +"dcat:Distribution" "0" --> "*" "odrl:Offer" : "odrl:hasPolicy" + +"dcat:Distribution" "1" --> "*" "dcat:DataService" : "dcat:accessService" + + +@enduml \ No newline at end of file diff --git a/catalog/message/diagram/dataset-request-message.png b/catalog/message/diagram/dataset-request-message.png new file mode 100644 index 0000000..5838db6 Binary files /dev/null and b/catalog/message/diagram/dataset-request-message.png differ diff --git a/catalog/message/diagram/dataset-request-message.puml b/catalog/message/diagram/dataset-request-message.puml new file mode 100644 index 0000000..33eaace --- /dev/null +++ b/catalog/message/diagram/dataset-request-message.puml @@ -0,0 +1,15 @@ +@startuml "dataset-request-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "dspace:DatasetRequestMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : dspace:DatasetRequestMessage + dspace:dataset : String +} + +@enduml \ No newline at end of file diff --git a/catalog/message/diagram/dataset.png b/catalog/message/diagram/dataset.png new file mode 100644 index 0000000..b9ded33 Binary files /dev/null and b/catalog/message/diagram/dataset.png differ diff --git a/catalog/message/diagram/dataset.puml b/catalog/message/diagram/dataset.puml new file mode 100644 index 0000000..2855b5c --- /dev/null +++ b/catalog/message/diagram/dataset.puml @@ -0,0 +1,60 @@ +@startuml "dataset" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + +class dcat:Dataset { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dcat:Dataset", + dcat:theme : Array + dcat:keyword : Array + dct:conformsTo : String + dct:creator : String + dct:identifier : String + dct:issued : String + dct:modified : String + dct:title : String + dct:description : Array + ... +} + +class dcat:Distribution { + @type : "dcat:Distribution", + dct:title : String + dct:description : Array + dct:issued : String + dct:modified : String + ... +} + +"dcat:Distribution" "0" --> "*" "odrl:Offer" : "odrl:hasPolicy" + +"dcat:Distribution" "1" --> "*" "dcat:DataService" : "dcat:accessService" + +"dcat:Dataset" "1" --> "*" "odrl:Offer" : "odrl:hasPolicy" + +"dcat:Dataset" "0" --> "*" "dcat:Distribution" : "dcat:distribution" + + +class dcat:DataService { + dcat:endpointDescription : String + dcat:endpointURL : String + dcat:theme : Array + dcat:keyword : Array + dct:conformsTo : String + dct:creator : String + dct:identifier : String + dct:issued : String + dct:modified : String + dct:title : String + dct:description : Array + ... +} + +"dcat:DataService" "0" --> "*" "dcat:Dataset" : "dcat:servesDataset" + +"dcat:DataService" "0" --> "*" "odrl:Offer" : "odrl:hasPolicy" + +@enduml \ No newline at end of file diff --git a/catalog/message/example/catalog-error.json b/catalog/message/example/catalog-error.json new file mode 100644 index 0000000..60ee338 --- /dev/null +++ b/catalog/message/example/catalog-error.json @@ -0,0 +1,11 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:CatalogError", + "dspace:code": "123:A", + "dspace:reason": [ + { + "@value": "Catalog not provisioned for this requester.", + "@language": "en" + } + ] +} diff --git a/catalog/message/example/catalog-request-message.json b/catalog/message/example/catalog-request-message.json new file mode 100644 index 0000000..69ce5e1 --- /dev/null +++ b/catalog/message/example/catalog-request-message.json @@ -0,0 +1,7 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:CatalogRequestMessage", + "dspace:filter": [ + "some-filter" + ] +} diff --git a/catalog/message/example/catalog.json b/catalog/message/example/catalog.json new file mode 100644 index 0000000..869ad7e --- /dev/null +++ b/catalog/message/example/catalog.json @@ -0,0 +1,76 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@id": "urn:uuid:3afeadd8-ed2d-569e-d634-8394a8836d57", + "@type": "dcat:Catalog", + "dct:title": "Data Provider A Catalog", + "dct:description": [ + { + "@value": "A catalog of data items", + "@language": "en" + } + ], + "dspace:participantId": "urn:example:DataProviderA", + "dcat:keyword": [ + "traffic", + "government" + ], + "dcat:service": [ + { + "@id": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77", + "@type": "dcat:DataService", + "dcat:endpointDescription": "dspace:connector", + "dcat:endpointURL": "https://provider-a.com/connector" + } + ], + "dcat:dataset": [ + { + "@id": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "@type": "dcat:Dataset", + "dct:title": "Traffic Data", + "dct:description": [ + { + "@value": "Traffic data sample extract", + "@language": "en" + } + ], + "dcat:keyword": [ + "traffic" + ], + "odrl:hasPolicy": [ + { + "@id": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "@type": "odrl:Offer", + "odrl:assigner": "http://example.com/Provider", + "odrl:permission": [ + { + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "odrl:spatial", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": "http://example.org/EU" + } + ], + "odrl:duty": { + "odrl:action": "cc:Attribution" + } + } + ] + } + ], + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:format": "dspace:s3+push", + "dcat:accessService": [ + { + "@id": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77", + "@type": "dcat:DataService", + "dcat:endpointURL": "https://provider-a.com/connector" + } + ] + } + ] + } + ] +} diff --git a/catalog/message/example/dataset-request-message.json b/catalog/message/example/dataset-request-message.json new file mode 100644 index 0000000..a1fe953 --- /dev/null +++ b/catalog/message/example/dataset-request-message.json @@ -0,0 +1,5 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:DatasetRequestMessage", + "dspace:dataset": "urn:uuid:3afeadd8-ed2d-569e-d634-8394a8836d57" +} diff --git a/catalog/message/example/dataset.json b/catalog/message/example/dataset.json new file mode 100644 index 0000000..2ccf961 --- /dev/null +++ b/catalog/message/example/dataset.json @@ -0,0 +1,46 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@id": "urn:uuid:3afeadd8-ed2d-569e-d634-8394a8836d57", + "@type": "dcat:Dataset", + "dct:title": "Traffic Data", + "dct:description": [ + { + "@value": "Traffic data sample extract", + "@language": "en" + } + ], + "dcat:keyword": [ + "traffic" + ], + "odrl:hasPolicy": [ { + "@type": "odrl:Offer", + "@id": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:assigner": "urn:tsdshhs636378", + "odrl:permission": [ + { + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "odrl:spatial", + "odrl:rightOperand": "_:EU", + "odrl:operator": "odrl:eq" + } + ] + } + ] + } ], + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "dspace:s3+push" + }, + "dcat:accessService": [ + { + "@id": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77", + "dcat:endpointURL": "https://provider-a.com/connector" + } + ] + } + ] +} diff --git a/catalog/message/schema/catalog-error-schema.json b/catalog/message/schema/catalog-error-schema.json new file mode 100644 index 0000000..b47409b --- /dev/null +++ b/catalog/message/schema/catalog-error-schema.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CatalogErrorSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CatalogError" + } + ], + "$id": "https://w3id.org/dspace/2024/1/catalog/catalog-error-schema.json", + "definitions": { + "CatalogError": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:CatalogError" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array" + } + }, + "required": [ "@context", "@type" ] + } + } +} 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 0000000..cb17b9a --- /dev/null +++ b/catalog/message/schema/catalog-request-message-schema.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CatalogRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CatalogRequestMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/catalog/catalog-request-message-schema.json", + "definitions": { + "CatalogRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:CatalogRequestMessage" + }, + "dspace:filter": { + "type": "array", + "items": { + } + } + }, + "required": [ "@context", "@type"] + } + } +} diff --git a/catalog/message/schema/catalog-schema.json b/catalog/message/schema/catalog-schema.json new file mode 100644 index 0000000..c262573 --- /dev/null +++ b/catalog/message/schema/catalog-schema.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CatalogSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Catalog" + } + ], + "$id": "https://w3id.org/dspace/2024/1/catalog/catalog-schema.json", + "definitions": { + "Catalog": { + "type": "object", + "allOf": [ + { + "$ref": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json#/definitions/AbstractDataset" + }, + { + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dcat:Catalog" + }, + "dcat:dataset": { + "type": "array", + "items": { + "$ref": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json#/definitions/Dataset" + }, + "minItems": 1 + }, + "dcat:service": { + "type": "array", + "items": { + "$ref": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json#/definitions/DataService" + }, + "minItems": 1 + }, + "dspace:participantId": { + "type": "string" + }, + "foaf:homepage": { + "type": "string" + } + } + } + ], + "required": [ "@context", "@type" ], + "anyOf" : [ + { + "not" : { "required" : [ "odrl:hasPolicy" ] } + } + ] + } + } +} diff --git a/catalog/message/schema/dataset-request-message-schema.json b/catalog/message/schema/dataset-request-message-schema.json new file mode 100644 index 0000000..c05c4e9 --- /dev/null +++ b/catalog/message/schema/dataset-request-message-schema.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "DatasetRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/DatasetRequestMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/catalog/dataset-request-message-schema.json", + "definitions": { + "DatasetRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:DatasetRequestMessage" + }, + "dspace:dataset": { + "type": "string" + } + }, + "required": [ "@context", "@type", "dspace:dataset" ] + } + } +} diff --git a/catalog/message/schema/dataset-schema.json b/catalog/message/schema/dataset-schema.json new file mode 100644 index 0000000..e62634c --- /dev/null +++ b/catalog/message/schema/dataset-schema.json @@ -0,0 +1,175 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "DatasetSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Dataset" + } + ], + "$id": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json", + "definitions": { + "AbstractDataset": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + }, + { + "properties": { + "odrl:hasPolicy": { + "type": "array", + "items": { + "$ref": "https://w3id.org/dspace/2024/1/negotiation/contract-schema.json#/definitions/Offer" + }, + "minItems": 1 + }, + "dcat:distribution": { + "type": "array", + "items": { + "$ref": "#/definitions/Distribution" + }, + "minItems": 1 + } + } + } + ] + }, + "Dataset": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractDataset" + } + ], + "required": [ + "odrl:hasPolicy" + ] + }, + "Resource": { + "type": "object", + "properties": { + "dcat:keyword": { + "type": "array", + "items": { + "type": "string" + } + }, + "dcat:theme": { + "type": "array", + "items": { + "$ref": "#/definitions/Reference" + }, + "minItems": 1 + }, + "dct:conformsTo": { + "type": "string" + }, + "dct:creator": { + "type": "string" + }, + "dct:description": { + "type": "array", + "items": { + "$ref": "#/definitions/Multilanguage" + } + }, + "dct:identifier": { + "type": "string" + }, + "dct:issued": { + "type": "string" + }, + "dct:modified": { + "type": "string" + }, + "dct:title": { + "type": "string" + } + } + }, + "Distribution": { + "type": "object", + "properties": { + "dct:title": { + "type": "string" + }, + "dct:description": { + "type": "array", + "items": { + "$ref": "#/definitions/Multilanguage" + } + }, + "dct:issued": { + "type": "string" + }, + "dct:modified": { + "type": "string" + }, + "odrl:hasPolicy": { + "type": "array", + "items": { + "$ref": "https://w3id.org/dspace/2024/1/negotiation/contract-schema.json#/definitions/Offer" + }, + "minItems": 1 + }, + "dcat:accessService": { + "type": "array", + "items": { + "$ref": "#/definitions/DataService" + }, + "minItems": 1 + } + }, + "required": [ + "dcat:accessService" + ] + }, + "DataService": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + }, + { + "properties": { + "dcat:endpointDescription": { + "type": "string" + }, + "dcat:endpointURL": { + "type": "string" + }, + "dcat:servesDataset": { + "type": "array", + "items": { + "$ref": "#/definitions/Dataset" + }, + "minItems": 1 + } + } + } + ] + }, + "Reference": { + "type": "object", + "properties": { + "@id": { + "type": "string" + } + }, + "required": [ "@id" ] + }, + "Multilanguage": { + "type": "object", + "properties": { + "@value": { + "type": "string" + }, + "@language": { + "type": "string" + } + }, + "required": [ "@value", "@language" ] + } + } +} diff --git a/catalog/message/shape/catalog-error-shape.ttl b/catalog/message/shape/catalog-error-shape.ttl new file mode 100644 index 0000000..9a28e39 --- /dev/null +++ b/catalog/message/shape/catalog-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 dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:CatalogErrorShape + a sh:NodeShape ; + sh:targetClass dspace:CatalogError ; + sh:property [ + sh:path dspace:code ; + sh:datatype xsd:string ; + ] ; + sh:property [ + sh:path dspace:reason ; + sh:datatype rdf:langString ; + ] ; + +. 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 0000000..30030f2 --- /dev/null +++ b/catalog/message/shape/catalog-request-message-shape.ttl @@ -0,0 +1,37 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:CatalogRequestMessageShape + a sh:NodeShape ; + sh:targetClass dspace:CatalogRequestMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:filter ; + ] ; + +. \ No newline at end of file diff --git a/catalog/message/shape/dataset-request-message-shape.ttl b/catalog/message/shape/dataset-request-message-shape.ttl new file mode 100644 index 0000000..c1542a6 --- /dev/null +++ b/catalog/message/shape/dataset-request-message-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 dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:DatasetRequestMessageShape + a sh:NodeShape ; + sh:targetClass dspace:DatasetRequestMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:dataset ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (DatasetRequestMessage): There must be exactly one dspace:dataset property."@en ; + ] ; +. diff --git a/catalog/message/shape/dataset-shape.ttl b/catalog/message/shape/dataset-shape.ttl new file mode 100644 index 0000000..2bb0c50 --- /dev/null +++ b/catalog/message/shape/dataset-shape.ttl @@ -0,0 +1,78 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . +@prefix prov: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:DatasetShape + a sh:NodeShape ; + sh:targetClass dcat:Dataset ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:distribution ; + sh:class dcat:Distribution ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dcat:distribution property must point to a dcat:Distribution."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:keyword ; + sh:datatype xsd:string ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dcat:keyword property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:description ; + sh:datatype rdf:langString ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dct:description property must point to a rdf:langString field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:title ; + sh:datatype rdf:langString ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dct:title property must point to a language tagged field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:hasPolicy ; + sh:class odrl:Offer ; + sh:severity sh:Violation ; + sh:minCount 0; + sh:message " (DatasetShape): An odrl:hasPolicy property must point to an odrl:Policy."@en ; + ] ; + +. diff --git a/catalog/message/shape/dcat-shapes.ttl b/catalog/message/shape/dcat-shapes.ttl new file mode 100644 index 0000000..217aa89 --- /dev/null +++ b/catalog/message/shape/dcat-shapes.ttl @@ -0,0 +1,267 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . +@prefix foaf: . +@prefix prov: . +@prefix skos: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + + +dspace_shapes:ResourceShape + a sh:NodeShape ; + sh:targetClass dcat:Resource ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:keyword ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dcat:keyword property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:theme ; + sh:class skos:Concept ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dcat:theme property must point to a skos:Concept."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:conformsTo ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:accessconformsToRights property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:creator ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:creator property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:description ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:description property must point to a rdf:langString field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:identifier ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:identifier property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:issued ; + sh:datatype xsd:dateTime ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:issued property must point to a xsd:dateTime field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:modified ; + sh:datatype xsd:dateTime ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:modified property must point to a xsd:dateTime field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:title ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:title property must point to a rdf:langString field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:hasPolicy ; + sh:class odrl:Offer ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): An odrl:hasPolicy property must point to an odrl:Offer."@en ; + ] ; + +. + + +dspace_shapes:DatasetShape + a sh:NodeShape ; + sh:targetClass dcat:Dataset ; + rdfs:subClassOf dspace_shapes:ResourceShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:distribution ; + sh:class dcat:Distribution ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dcat:distribution property must point to a dcat:Distribution."@en ; + ] ; + +. + +dspace_shapes:CatalogShape + a sh:NodeShape ; + sh:targetClass dcat:Catalog ; + rdfs:subClassOf dspace_shapes:DatasetShape ; + + 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 ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:service ; + sh:class dcat:DataService ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dcat:service property must point to a dcat:DataService."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path foaf:homepage ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A foaf:homepage property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:participantId ; + sh:nodeKind sh:IRI ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dspace:participantId property must point to an IRI."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:hasPolicy ; + sh:maxCount 0 ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dspace:Catalog must not have any odrl:hasPolicy property."@en ; + ] ; + +. + + +dspace_shapes:DistributionShape + a sh:NodeShape ; + sh:targetClass dcat:Distribution ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:description ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:description property must point to a rdf:langString field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:issued ; + sh:datatype xsd:dateTime ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:issued property must point to a xsd:dateTime field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:modified ; + sh:datatype xsd:dateTime ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:modified property must point to a xsd:dateTime field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:title ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:title property must point to a rdf:langString field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:accessService ; + sh:class dcat:DataService ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dcat:accessService property must point to a dcat:DataService."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:hasPolicy ; + sh:class odrl:Offer ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): An odrl:hasPolicy property must point to an odrl:Offer."@en ; + ] ; +. + +dspace_shapes:DataServiceShape + a sh:NodeShape ; + sh:targetClass dcat:DataService ; + rdfs:subClassOf dspace_shapes:ResourceShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:endpointDescription ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:message " (DataServiceShape): A dcat:endpointDescription property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:endpointURL ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:message " (DataServiceShape): A dcat:endpointURL property must point to a xsd:anyURI field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:servesDataset ; + sh:class dcat:Dataset ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DataServiceShape): A dcat:servesDataset property must point to a dcat:Dataset."@en ; + ] ; + +. diff --git a/common/common.binding.https.md b/common/common.binding.https.md new file mode 100644 index 0000000..d158093 --- /dev/null +++ b/common/common.binding.https.md @@ -0,0 +1,17 @@ +# General Binding Aspects + +## 1 The Well-Known Version Metadata Endpoint + +Each implementation must provide the version metadata endpoint, which must use the `dspace-version` [Well-Known Uniform Resource Identifier](https://www.rfc-editor.org/rfc/rfc8615.html) at the top of the path hierarchy: + +``` +/.well-known/dspace-version +``` + +The contents of the response is a JSON object defined in the [Dataspace Protocol](./common.protocol.md#1-exposure-of-dataspace-protocol-versions). + +Note that if multiple [Connectors](../model/terminology.md#connector--data-service-) are hosted under the same base URL, a path segment appended to the base well-known URL can be used, for example, `https://example.com/.well-known/dspace-version/connector1.` + +## 2 Authorization + +All requests to HTTPS endpoints should use the `Authorization` header to include an authorization token. The semantics of such tokens are not part of these specifications. The `Authorization` HTTP header is optional if the [Connector](../model/terminology.md#connector--data-service-) does not require authorization. diff --git a/common/common.protocol.md b/common/common.protocol.md new file mode 100644 index 0000000..6d78d3b --- /dev/null +++ b/common/common.protocol.md @@ -0,0 +1,23 @@ +# General Requirements + +## 1 Exposure of Dataspace Protocol Versions + +[Connectors](../model/terminology.md#connector--data-service-) implementing the Dataspace Protocol may operate on different versions. Therefore, it is necessary that they can discover the supported versions of each other reliably and unambiguously. Each [Connector](../model/terminology.md#connector--data-service-) must expose information of at least one Dataspace Protocol Version it supports. The specifics of how this information is obtained its defined by specific protocol bindings. + +A [Connector](../model/terminology.md#connector--data-service-) must respond to a respective request by providing a JSON-LD object containing an array of supported versions with at least one item. The item connects the version tag (`version` attribute) with the absolute URL path segment of the root path for all endpoints of this version. The following example specifies that this [Connector](../model/terminology.md#connector--data-service-) offers version `1.0` endpoints at `/some/path/v1`. + +```json +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "protocolVersions": [ + { + "version": "1.0", + "path": "/some/path/v1" + } + ] +} +``` + +This data object must comply to the [JSON Schema](schema/version-schema.json) and the [SHACL Shape](shape/version-shape.ttl). + +The requesting [Connector](../model/terminology.md#connector--data-service-) may select from the endpoints in the response. If the [Connector](../model/terminology.md#connector--data-service-) can't identify a matching Dataspace Protocol Version, it must terminate the communication. \ No newline at end of file diff --git a/common/schema/context.json b/common/schema/context.json new file mode 100644 index 0000000..f26eaff --- /dev/null +++ b/common/schema/context.json @@ -0,0 +1,62 @@ +{ + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "cred": "https://www.w3.org/2018/credentials#", + "sec": "https://w3id.org/security#", + "foaf": "http://xmlns.com/foaf/0.1/", + "cc": "http://creativecommons.org/ns#", + "dct": "http://purl.org/dc/terms/", + "dcat": "http://www.w3.org/ns/dcat#", + "dspace": "https://w3id.org/dspace/2024/1/", + + "dct:title": { "@language": "en" }, + "dct:creator": { "@type": "@id" }, + "dct:description": { "@container": "@set" }, + "dct:issued": { "@type": "xsd:dateTime" }, + "dct:modified": { "@type": "xsd:dateTime" }, + + "dcat:byteSize": { "@type": "xsd:decimal" }, + "dcat:distribution": { "@container": "@set" }, + "dcat:theme": { "@type": "@id" }, + "dcat:conformsTo": { "@type": "@id" }, + "dcat:dataset": { "@container": "@set" }, + "dcat:endpointURL": { "@type": "xsd:anyURI" }, + "dcat:endpointDescription": { "@type": "xsd:anyURI" }, + "dcat:keyword": { "@container": "@set" }, + "dcat:servesDataset": {"@container": "@set" }, + "dcat:service": { "@container": "@set" }, + "dcat:accessService": { "@container": "@set" }, + + "dspace:agreementId": { "@type": "@id" }, + "dspace:dataset": { "@type": "@id" }, + "dspace:transportType": { "@type": "@id" }, + "dspace:state": { "@type": "@id" }, + "dspace:providerId": { "@type": "@id" }, + "dspace:consumerId": { "@type": "@id" }, + "dspace:participantId": { "@type": "@id" }, + "dspace:reason": { "@container": "@set" }, + "dspace:catalog": { "@container": "@set" }, + "dspace:filter": { "@container": "@set" }, + "dspace:timestamp": { "@type": "xsd:dateTime" }, + "dspace:callbackAddress": { "@type": "xsd:anyURI" }, + "dspace:endpointProperties": { "@container": "@set" }, + + "foaf:homepage": { "@type": "xsd:anyURI" }, + + "odrl:hasPolicy": { "@container": "@set" }, + "odrl:permission": { "@container": "@set" }, + "odrl:prohibition": { "@container": "@set" }, + "odrl:obligation": { "@container": "@set" }, + "odrl:duty": { "@container": "@set" }, + "odrl:constraint": { "@container": "@set" }, + "odrl:action": { "@type": "@id" }, + "odrl:target": { "@type": "@id" }, + "odrl:leftOperand": { "@type": "@id" }, + "odrl:operator": { "@type": "@id" }, + "odrl:rightOperandReference": { "@type": "@id" }, + "odrl:profile": { "@container": "@set" }, + "odrl:assigner": { "@type": "@id" }, + "odrl:assignee": { "@type": "@id" } + } +} diff --git a/common/schema/definitions.schema.json b/common/schema/definitions.schema.json new file mode 100644 index 0000000..c914f74 --- /dev/null +++ b/common/schema/definitions.schema.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "definitions": { + + } +} diff --git a/common/schema/version-schema.json b/common/schema/version-schema.json new file mode 100644 index 0000000..528a764 --- /dev/null +++ b/common/schema/version-schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "VersionSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Version" + } + ], + "$id": "https://w3id.org/dspace/2024/1/common/version-schema.json", + "definitions": { + "Version": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "protocolVersions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "path": { + "type": "string" + } + }, + "required": ["version", "path"] + }, + "minItems": 1 + } + }, + "required": ["@context", "protocolVersions"] + } + } +} \ 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 0000000..4cc342e --- /dev/null +++ b/common/shape/odrl-shapes.ttl @@ -0,0 +1,79 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_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 ; + ] ; +. + + +dspace_shapes:AgreementShape + a sh:NodeShape ; + sh:targetClass odrl:Agreement ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:target ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:timestamp ; + sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (AgreementShape): An dspace:timestamp property must point to exactly one xsd:dateTime value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path odrl:assigner ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (AgreementShape): An odrl:assigner property must point to exactly one Provider Node."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path odrl:assignee ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (AgreementShape): An odrl:assignee property must point to exactly one Consumer Node."@en ; + ] ; +. diff --git a/common/shape/version-shape.ttl b/common/shape/version-shape.ttl new file mode 100644 index 0000000..e69de29 diff --git a/common/style/diagram.styles.puml b/common/style/diagram.styles.puml new file mode 100644 index 0000000..911f758 --- /dev/null +++ b/common/style/diagram.styles.puml @@ -0,0 +1,83 @@ + + +!$blue = "#066DFA" +!$gray = "#98A3AB" +!$lightGray = "#F4F5F9" +!$darkGray = "#747C94" +!$green = "#24DCC1" +!$blueFill = "#E4EBFA" +!$greenFill = "#CFFBDE" +!$borderRed = "#F40000" +!$lightRed = "#FDCCCC" + +skinparam sequence { +ArrowColor Black +LifeLineBorderColor 000000 +LifeLineBackgroundColor #A9DCDF +} + +skinparam roundCorner 10 + +skinparam ArrowColor $darkGray +skinparam ArrowHeadColor $darkGray +skinparam LifeLineBackgroundColor $darkGray + + +skinparam CloudBackgroundColor $lightGray +skinparam CloudBorderColor $gray +skinparam CloudFontColor Black + +skinparam ArtifactBackgroundColor $lightGray +skinparam ArtifactBorderColor $gray + +skinparam ComponentBackgroundColor $blueFill +skinparam ComponentBorderColor $blue +skinparam ComponentFontColor Black + +skinparam DatabaseBackgroundColor $greenFill +skinparam DatabaseBorderColor $green +skinparam DatabaseFontColor Black + +skinparam ParticipantBorderColor $blue +skinparam ParticipantBackgroundColor $blueFill +skinparam SequenceGroupBorderColor #DADADA +skinparam SequenceGroupHeaderFontColor #898A89 +skinparam BoxPadding 20 +skinparam ParticipantPadding 10 + +skinparam AgentBackgroundColor White +skinparam AgentBackgroundColor $blueFill +skinparam AgentBorderColor #066DFA +skinparam noteBorderColor FEF3BF +skinparam SequenceBoxBorderColor F2F2F2 +skinparam shadowing false +skinparam AgentBorderThickness 1 + +skinparam NoteBackgroundColor FEFFDD + +skinparam FrameBackgroundColor $lightGray +skinparam FrameBorderColor $lightGray +skinparam FrameFontColor $darkGray + +skinparam ActivityBackgroundColor $blueFill + +skinparam StateBackgroundColor $blueFill +skinparam StateBorderColor $blue +skinparam StateStartColor $blue +skinparam StateEndColor $blue +skinparam StateFontSize 12 + +skinparam ActivityBackgroundColor $blueFill +skinparam ActivityBorderColor $blue +skinparam ActivityEndColor $blue +skinparam ActivityStartColor $blue +skinparam ActivityDiamondBackgroundColor $lightGray +skinparam ActivityDiamondBorderColor $blue + +skinparam PartitionBackgroundColor $lightGray +skinparam PartitionBorderColor $darkGray +skinparam PartitionFontColor $darkGray + +skinparam ClassAttributeFontColor Black +skinparam ClassBorderColor $blue +skinparam ClassBackgroundColor $blueFill diff --git a/model/m.dataspace.relationships.png b/model/m.dataspace.relationships.png new file mode 100644 index 0000000..c62080b Binary files /dev/null and b/model/m.dataspace.relationships.png differ diff --git a/model/m.dataspace.relationships.puml b/model/m.dataspace.relationships.puml new file mode 100644 index 0000000..5bac8fe --- /dev/null +++ b/model/m.dataspace.relationships.puml @@ -0,0 +1,33 @@ +@startuml +!pragma layout smetana + +!include ../common/style/diagram.styles.puml + + +agent Participant +agent ParticipantAgent +agent CI as "Credential\nIssuer" +agent IDP as "Identity\nProvider" +agent Dataspace +agent DataspaceAuthority as "Dataspace\nAuthority" #FAFAFA +agent Registry as "Dataspace\nRegistry" #FAFAFA + +DataspaceAuthority -down-> Dataspace : manages + +Dataspace -down-> Registry: uses + +Participant -up-> Dataspace : member of +Participant -down-> ParticipantAgent : controls + +ParticipantAgent --> Registry : registers/uses + +IDP --> ParticipantAgent : issues +ParticipantAgent --> IDP : verifies + +CI --> ParticipantAgent : issues +ParticipantAgent --> CI : verifies + + + + +@enduml diff --git a/model/m.participant.entities.drawio b/model/m.participant.entities.drawio new file mode 100644 index 0000000..37e0cc2 --- /dev/null +++ b/model/m.participant.entities.drawio @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/model/m.participant.entities.png b/model/m.participant.entities.png new file mode 100644 index 0000000..22505a0 Binary files /dev/null and b/model/m.participant.entities.png differ diff --git a/model/model.md b/model/model.md new file mode 100644 index 0000000..efdc640 --- /dev/null +++ b/model/model.md @@ -0,0 +1,80 @@ +# 2 Dataspace Model + +## 2 Dataspace Information Model + +The following sections outline the Dataspace Information Model, which form the foundation of this specification. +Some aspects of this section describe additional concepts of Dataspaces and provide context for the Dataspace Protocol, +those are considered as non-normative. Further information on the functional requirements of a Dataspace can be found for example in +the [IDSA Rulebook](https://docs.internationaldataspaces.org/idsa-rulebook). + +### 2.1 Dataspace Entity Relationships + +#### 2.1.1 Context of the Dataspace Protocol + +In a broader context, the Dataspace Protocol enables the interaction between participants of +a Dataspace. This may require additional concepts, which are not in the scope of this specification. +The definitions below are therefore informative and not-normative. +The relationships between the primary [Dataspace](./terminology.md#dataspace) entities are defined as follows: + +![](./m.dataspace.relationships.png) + +Note that all relationships are multiplicities unless specified. `Dataspace Authority` and `Dataspace Registry` are non-normative entities. + +- A [Dataspace Authority](./terminology.md#dataspace-authority) manages one or more [Dataspaces](./terminology.md#dataspace). This will include [Participant](./terminology.md#participant) registration and may entail mandating business and/or technical requirements. For example, a [Dataspace Authority](./terminology.md#dataspace-authority) may require [Participants](./terminology.md#participant) to obtain some form of business certification. A [Dataspace Authority](./terminology.md#dataspace-authority) may also impose technical requirements such as support for the technical enforcement of specific usage policies. +- A [Dataspace Registry](./terminology.md#dataspace-registration-service--dataspace-registry-) records dataspace participants. +- A [Participant](./terminology.md#participant) is a member of one or more [Dataspaces](./terminology.md#dataspace). A [Participant](./terminology.md#participant) registers [Participant Agents](./terminology.md#participant-agent) that perform tasks on its behalf. +- A [Participant Agent](./terminology.md#participant-agent) performs tasks such as publishing a [Catalog](./terminology.md#catalog) or engaging in a [Transfer Process](./terminology.md#transfer-process). In order to accomplish these tasks, a [Participant Agent](./terminology.md#participant-agent) may use a _**verifiable presentation**_ generated from a _**credential**_ obtained from a third-party [Credential Issuer](./terminology.md#credential-issuer). A [Participant Agent](./terminology.md#participant-agent) may also use an _**ID token**_ issued by a third-party [Identity Provider](./terminology.md#identity-provider). Note that a [Participant Agent](./terminology.md#participant-agent) is a logical construct and does not necessarily correspond to a single runtime process. +- An [Identity Provider](./terminology.md#identity-provider) is a trust anchor that generates `ID tokens` used to verify the identity of a [Participant Agent](./terminology.md#participant-agent). Multiple identity providers may operate in a [Dataspace](./terminology.md#dataspace). The types and semantics of ID tokens are not part of this specification. An [Identity Provider](./terminology.md#identity-provider) may be a third-party or a [Participant](./terminology.md#participant) itself (for example, in the case of decentralized identifiers). +- A [Credential Issuer](./terminology.md#credential-issuer) issues _verifiable credentials_ used by [Participant Agents](./terminology.md#participant-agent) to allow access to [Datasets](./terminology.md#dataset) and verify usage control. + +Further non-normative information on the context of the Dataspace Protocol can be found for example in the [IDSA Rulebook](https://docs.internationaldataspaces.org/idsa-rulebook). + +#### 2.1.2 Dataspace Protocol specific + +The Dataspace Protocol shall enable the interactions between the [Participant Agents](./terminology.md#participant-agent) in a Dataspace. +The following concepts are therefore normative. + +The diagram below depicts the relationships between [Participant Agent](./terminology.md#participant-agent) types: + +![](./m.participant.entities.png) + +- A [Catalog Service](./terminology.md#catalog-service) is a [Participant Agent](./terminology.md#participant-agent) that makes a [DCAT Catalog](https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog) available to other [Participants](./terminology.md#participant). +- A [Catalog](./terminology.md#catalog) contains one or more [Datasets](./terminology.md#dataset), which are [DCAT Datasets](https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset). A [Catalog](./terminology.md#catalog) also contains **_at least one_** [DCAT DataService](https://www.w3.org/TR/vocab-dcat-3/#Class:Data_Service) that references a [Connector](./terminology.md#connector--data-service-) where [Datasets](./terminology.md#dataset) may be obtained. +- A [Dataset](./terminology.md#dataset) has **_at least one_** [Offer](./terminology.md#offer), which is an [ODRL Offer](https://www.w3.org/TR/odrl-model/#policy-offer) describing the [Usage Policy](./terminology.md#policy) associated with the [Dataset](./terminology.md#dataset). +- A [Connector](./terminology.md#connector--data-service-) is a [Participant Agent](./terminology.md#participant-agent) that performs [Contract Negotiation](./terminology.md#contract-negotiation) and [Transfer Process](./terminology.md#transfer-process) operations with another [Connector](./terminology.md#connector--data-service-). An outcome of a [Contract Negotiation](./terminology.md#contract-negotiation) may be the production of an [Agreement](./terminology.md#agreement), which is an [ODRL Agreement](https://www.w3.org/TR/odrl-model/#policy-agreement) defining the [Usage Policy](./terminology.md#policy) agreed to for a [Dataset](./terminology.md#dataset). + +### 2.2 Classes + +Not all [Dataspace](./terminology.md#dataspace) entities have a concrete _technical_ materialization; some entities may exist as purely logical constructs. For example, a [Dataspace Authority](./terminology.md#dataspace-authority) and a [Participant Agent](./terminology.md#participant-agent) have no representation in the protocol message flows that constitute [Dataspace](./terminology.md#dataspace) interactions. This section outlines the classes that comprise the concrete elements of the model, i.e., those that are represented in protocol message flows. + +**_Note 1:_** +The classes and definitions used in the Dataspace Protocol are reused from different standards and specifications as much as possible, in particular, [DCAT](https://www.w3.org/TR/vocab-dcat-3) and [ODRL](https://www.w3.org/TR/odrl/). As, however, the external definitions allow different interpretations or provide more attributes than required, the Dataspace Protocol is leveraging _profiles_ of the original definitions rather than the complete original expressiveness. A _profile_ in this sense is a restriction or subset of an external definition, enforcing that every occurrence of an externally defined class is always conformant with the original definition. However, not every standard-compliant class might be compliant to the dataspace profile. + +#### 2.2.1 Catalog + +A [Catalog](./terminology.md#catalog) is a [DCAT Catalog](https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog) with the following attributes: + +- 0..N [Datasets](./terminology.md#dataset). Since a [Catalog](./terminology.md#catalog) may be dynamically generated for a request based on the requesting [Participant's](./terminology.md#participant) credentials it is possible for it to contain 0 matching [Datasets](./terminology.md#dataset). (DCAT PROFILE) +- 1..N [DCAT DataService](https://www.w3.org/TR/vocab-dcat-3/#Class:Data_Service) that references a [Connector](./terminology.md#connector--data-service-) where [Datasets](./terminology.md#dataset) may be obtained. (DCAT PROFILE) + +#### 2.2.2 Dataset + +A [Dataset](./terminology.md#dataset) is a [DCAT Dataset](https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset) with the following attributes: + +- 1..N `hasPolicy` attributes that contain an [ODRL `Offer`](https://www.w3.org/TR/odrl-vocab/#term-Offer) defining the [Usage Policy](./terminology.md#policy) associated with the [Dataset](./terminology.md#dataset). **_Offers must NOT contain any target attributes. The target of an [Offer](./terminology.md#offer) is the associated [Dataset](./terminology.md#dataset)._** (ODRL PROFILE) +- 1..N [DCAT Distributions](https://www.w3.org/TR/vocab-dcat-3/#Class:Distribution). Each distribution must have at least one `DataService` which specifies where the distribution + is obtained. Specifically, a `DataService` specifies the endpoint for initiating a [Contract Negotiation](./terminology.md#contract-negotiation) and [Transfer Process](./terminology.md#transfer-process). (DCAT PROFILE) + +#### 2.2.3 Offer + +An [Offer](./terminology.md#offer) is an [ODRL Offer](https://www.w3.org/TR/odrl-model/#policy-offer) with the following attributes: + +- An ODRL `uid` is represented as an "@id" that is a unique identifier. (ODRL PROFILE) +- The [Offer](./terminology.md#offer) must be unique to a [Dataset](./terminology.md#dataset) since the target of the [Offer](./terminology.md#offer) is derived from its enclosing context. +- The value of the `target` attribute is the dataset id. Except if the [Offer][Catalog](./terminology.md#offer) is used in an enclosing [Catalog](./terminology.md#catalog) or [Dataset](./terminology.md#dataset), then the there must not be any `target` attribute set. + +#### 2.2.4 Agreement + +An [Agreement](./terminology.md#agreement) is an [ODRL Agreement](https://www.w3.org/TR/odrl-model/#policy-agreement) with the following attributes: + +- The [Agreement](./terminology.md#agreement) class must include one `target` attribute that is the identifier of the [Dataset](./terminology.md#dataset) the [Agreement](./terminology.md#agreement) is associated with. An [Agreement](./terminology.md#agreement) is therefore associated with **EXACTLY ONE** [Dataset](./terminology.md#dataset). (ODRL PROFILE) diff --git a/model/terminology.md b/model/terminology.md new file mode 100644 index 0000000..64ce63b --- /dev/null +++ b/model/terminology.md @@ -0,0 +1,95 @@ +# Terminology + +This and the following sections define the core concepts, entities, and relationships that underpin a __dataspace__ and its protocol. + +### Agreement + +A concrete [Policy](#policy) associated with a specific [Dataset](#dataset) that has been signed by both the [Provider](#provider) and consumer [Participants](#participant). An Agreement is a result of a [Contract Negotiation](../negotiation/contract.negotiation.protocol.md) and is associated with _exactly one_ [Dataset](#dataset). + +### Catalog + +A collection of entries representing [Datasets](#dataset) and their [Offers](#offer) that is advertised by a [Provider](#provider) [Participant](#participant). + +### Catalog Protocol + +A set of allowable [Message Types](#message-type) that are used to request a [Catalog](#catalog) from a [Catalog Service](#catalog-service). + +### Catalog Service + +A [Participant Agent](#participant-agent) that makes a [Catalog](#catalog) accessible to [Participants](#participant). + +### Connector (Data Service) + +A [Participant Agent](#participant-agent) that produces [Agreements](#agreement) and manages [Dataset](#dataset) sharing. + +### Consumer + +A [Participant Agent](#participant-agent) that requests access to an offered [Dataset](#dataset). + +### Contract Negotiation + +A set of interactions between a [Provider](#provider) and [Consumer](#consumer) that establish an [Agreement](#agreement). It is an instantiation of the state machine of a [Contract Negotiation Protocol](#contract-negotiation-protocol). + +### Contract Negotiation Protocol + +A set of allowable [Message Type](#message-type) sequences defined as a state machine. + +## Credential Issuer + +A Credential Issuer is a trusted technology system that issues verifiable credentials for a [Participant](#participant) and [Participant Agents](#participant-agent). + +### Dataset + +Data or a technical service that can be shared by a [Participant](#participant). + +### Dataspace + +A set of technical services that facilitate interoperable [Dataset](#dataset) sharing between entities. + +### Dataspace Authority + +An entity that manages a [Dataspace](#dataspace). The form and capabilities of a Dataspace Authority are not covered in these specifications. + +### Dataspace Registration Service (Dataspace Registry) + +A technology system that maintains the state of [Participants](#participant) in a [Dataspace](#dataspace). The form and capabilities of a Dataspace Registration Service are not covered in these specifications. + +### Identity Provider + +A trusted technology system that creates, maintains, and manages identity information for a [Participant](#participant) and [Participant Agents](#participant-agent). + +### Message + +An instantiation of a [Message Type](#message-type). + +### Message Type + +A definition of the structure of a [Message](#message). + +### Offer + +A concrete [Policy](#policy) associated with a specific [Dataset](#dataset). + +### Participant + +A [Dataspace](#dataspace) member that provides and/or consumes [Datasets](#dataset). + +### Participant Agent + +A technology system that performs operations on behalf of a [Participant](#participant) that offers a [Dataset](#dataset). + +### Policy + +A set of rules, duties, and obligations that define the terms of use for a [Dataset](#dataset). Also referred to as "Usage Policy". + +### Provider + +A [Participant Agent](#participant-agent) that offers a [Dataset](#dataset). + +### Transfer Process + +A set of interactions between a [Provider](#provider) and [Consumer](#consumer) that give access to a [Dataset](#dataset) under the terms of an [Agreement](#agreement). It is an instantiation of the state machine of a [Transfer Process Protocol](#transfer-process-protocol). + +### Transfer Process Protocol + +A set of allowable [Message Type](#message-type) sequences defined as a state machine. diff --git a/negotiation/contract.negotiation.binding.https.md b/negotiation/contract.negotiation.binding.https.md new file mode 100644 index 0000000..3d93507 --- /dev/null +++ b/negotiation/contract.negotiation.binding.https.md @@ -0,0 +1,470 @@ +# Contract Negotiation HTTPS Binding + +This specification defines a RESTful API over HTTPS for the [Contract Negotiation Protocol](./contract.negotiation.protocol.md). + +- [Contract Negotiation HTTPS Binding](#contract-negotiation-https-binding) + - [1 Introduction](#1-introduction) + - [1.1 Prerequisites](#11-prerequisites) + - [1.2 Contract Negotiation Error](#12-contract-negotiation-error) + - [1.2.1 State Transition Errors](#121-state-transition-errors) + - [1.2.2 Object Not Found](#122-object-not-found) + - [1.2.3 Unauthorized Access](#123-unauthorized-access) + - [2 Provider Path Bindings](#2-provider-path-bindings) + - [2.1 The `negotiations` Endpoint _(Provider-side)_](#21-the-negotiations-endpoint-provider-side) + - [2.1.1 GET](#211-get) + - [Request](#request) + - [Response](#response) + - [2.2 The `negotiations/request` Endpoint _(Provider-side)_](#22-the-negotiationsrequest-endpoint-provider-side) + - [2.2.1 POST](#221-post) + - [Request](#request-1) + - [Response](#response-1) + - [2.3 The `negotiations/:providerPid/request` Endpoint _(Provider-side)_](#23-the-negotiationsproviderpidrequest-endpoint-provider-side) + - [2.3.1 POST](#231-post) + - [Request](#request-2) + - [Response](#response-2) + - [2.4 The `negotiations/:providerPid/events` Endpoint _(Provider-side)_](#24-the-negotiationsproviderpidevents-endpoint-provider-side) + - [2.4.1 POST](#241-post) + - [Request](#request-3) + - [Response](#response-3) + - [2.5 The `negotiations/:providerPid/agreement/verification` Endpoint _(Provider-side)_](#25-the-negotiationsproviderpidagreementverification-endpoint--provider-side) + - [2.5.1 POST](#251-post) + - [Request](#request-4) + - [Response](#response-4) + - [2.6 The `negotiations/:providerPid/termination` Endpoint _(Provider-side)_](#26-the-negotiationsproviderpidtermination-endpoint-provider-side) + - [2.6.1 POST](#261-post) + - [Request](#request-5) + - [Response](#response-5) + - [3 Consumer Callback Path Bindings](#3-consumer-callback-path-bindings) + - [3.1 Prerequisites](#31-prerequisites) + - [3.2 The `negotiations/offers` Endpoint _(Consumer-side)_](#32-the-negotiationsoffers-endpoint-consumer-side) + - [3.2.1 POST](#321-post) + - [Request](#request-6) + - [Response](#response-6) + - [3.3 The `negotiations/:consumerPid/offers` Endpoint _(Consumer-side)_](#33-the-negotiationsconsumerpidoffers-endpoint-consumer-side) + - [3.3.1 POST](#331-post) + - [Request](#request-7) + - [Response](#response-7) + - [3.4 The `negotiations/:consumerPid/agreement` Endpoint _(Consumer-side)_](#34-the-negotiationsconsumerpidagreement-endpoint-consumer-side) + - [3.4.1 POST](#341-post) + - [Request](#request-8) + - [Response](#response-8) + - [3.5 The `negotiations/:consumerPid/events` Endpoint _(Consumer-side)_](#35-the-negotiationsconsumerpidevents-endpoint-consumer-side) + - [3.5.1 POST](#351-post) + - [Request](#request-9) + - [Response](#response-9) + - [3.6 The `negotiations/:consumerPid/termination` Endpoint _(Consumer-side)_](#36-the-negotiationsconsumerpidtermination-endpoint-consumer-side) + - [3.6.1 POST](#361-post) + - [Request](#request-10) + - [Response](#response-10) + +## 1 Introduction + +### 1.1 Prerequisites + +1. The `` notation indicates the base URL for a [Connector](../model/terminology.md#connector--data-service-) endpoint. For example, if the base [Connector](../model/terminology.md#connector--data-service-) URL is `connector.example.com`, the URL `https:///negotiations/request` will map to `https//connector.example.com/negotiation/request`. + +2. All request and response messages must use the `application/json` media type. Derived media types, e.g., `application/ld+json` may be exposed in addition. + +### 1.2 Contract Negotiation Error + +In the event of a client request error, the [Connector](../model/terminology.md#connector--data-service-) must return an appropriate HTTP 4xx client error code. If an error body is returned it must be a [Contract Negotiation Error](./contract.negotiation.protocol.md#32-error---contract-negotiation-error). + +#### 1.2.1 State Transition Errors + +If a client makes a request that results in an invalid [state transition as defined by the Contract Negotiation Protocol](./contract.negotiation.protocol.md#11-states), it must return an HTTP code 400 (Bad Request) with a [Contract Negotiation Error](./contract.negotiation.protocol.md#32-error---contract-negotiation-error) in the response body. + +#### 1.2.2 Object Not Found + +If the [Contract Negotiation](../model/terminology.md#contract-negotiation) (CN) does not exist, the [Consumer](../model/terminology.md#consumer) or [Provider](../model/terminology.md#provider) must return an HTTP 404 (Not Found) response. + +#### 1.2.3 Unauthorized Access + +If the client is not authorized, the [Consumer](../model/terminology.md#consumer) or [Provider](../model/terminology.md#provider) must return an HTTP 404 (Not Found) response. + +### 1.3 Authorization + +All requests should use the `Authorization` header to include an authorization token. The semantics of such tokens are not part of this specification. The `Authorization` HTTP header is optional if the [Connector](../model/terminology.md#connector--data-service-) does not require authorization. + +## 2 Provider Path Bindings + +| Endpoint | Method | Description | +|:----------------------------------------------------------------------|:-------|:---------------------------| +| https://provider.com/negotiations/:providerPid | `GET` | Section [2.1.1](#211-get) | +| https://provider.com/negotiations/request | `POST` | Section [2.2.1](#221-post) | +| https://provider.com/negotiations/:providerPid/request | `POST` | Section [2.3.1](#231-post) | +| https://provider.com/negotiations/:providerPid/events | `POST` | Section [2.4.1](#241-post) | +| https://provider.com/negotiations/:providerPid/agreement/verification | `POST` | Section [2.5.1](#251-post) | +| https://provider.com/negotiations/:providerPid/termination | `POST` | Section [2.6.1](#261-post) | + +### 2.1 The `negotiations` Endpoint _(Provider-side)_ + +#### 2.1.1 GET + +##### Request + +A CN can be accessed by a [Consumer](../model/terminology.md#consumer) or [Provider](../model/terminology.md#provider) sending a GET request to `negotiations/:providerPid`: + +```http request +GET https://provider.com/negotiations/:providerPid + +Authorization: ... + +``` + +##### Response + +If the CN is found and the client is authorized, the [Provider](../model/terminology.md#provider) must return an HTTP 200 (OK) response and a body containing the [Contract Negotiation](./contract.negotiation.protocol.md#31-ack---contract-negotiation): + +```json +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiation", + "dspace:providerPid": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:state" :"REQUESTED" +} +``` + +Predefined states are: `REQUESTED`, `OFFERED`, `ACCEPTED`, `AGREED`, `VERIFIED`, `FINALIZED`, and `TERMINATED` (see [here](./contract.negotiation.protocol.md#11-states). + +### 2.2 The `negotiations/request` Endpoint _(Provider-side)_ + +#### 2.2.1 POST + +##### Request + +A CN is started and placed in the `REQUESTED` state when a [Consumer](../model/terminology.md#consumer) POSTs an initiating [Contract Request Message](./contract.negotiation.protocol.md#21-contract-request-message) to `negotiations/request`: + +```http request +POST https://provider.com/negotiations/request + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractRequestMessage", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "...", + "target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88" + }, + "dspace:callbackAddress": "https://..." +} +``` + +- The `callbackAddress` property specifies the base endpoint `URL` where the client receives messages associated with the CN. Support for the `HTTPS` scheme is required. Implementations may optionally support other URL schemes. + +- Callback messages will be sent to paths under the base URL as described by this specification. Note that [Providers](../model/terminology.md#provider) should properly handle the cases where a trailing `/` is included with or absent from the `callbackAddress` when resolving full URL. + +##### Response + +The [Provider](../model/terminology.md#provider) must return an HTTP 201 (Created) response with a body containing the [Contract Negotiation](./contract.negotiation.protocol.md#31-ack---contract-negotiation): + +```json +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiation", + "dspace:providerPid": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:state" :"REQUESTED" +} +``` + +### 2.3 The `negotiations/:providerPid/request` Endpoint _(Provider-side)_ + +#### 2.3.1 POST + +##### Request + +A [Consumer](../model/terminology.md#consumer) may make an [Offer](../model/terminology.md#offer) by POSTing a [Contract Request Message](./contract.negotiation.protocol.md#21-contract-request-message) to `negotiations/:providerPid/request`: + +```http request +POST https://provider.com/negotiations/:providerPid/request + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractRequestMessage", + "dspace:providerPid": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "...", + "target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88" + } +} +``` + +##### Response + +If the message is successfully processed, the [Provider](../model/terminology.md#provider) must return an HTTP 200 (OK) response. The response body is not specified and clients are not required to process it. + +### 2.4 The `negotiations/:providerPid/events` Endpoint _(Provider-side)_ + +#### 2.4.1 POST + +##### Request + +A [Consumer](../model/terminology.md#consumer) can POST a [Contract Negotiation Event Message](./contract.negotiation.protocol.md#25-contract-negotiation-event-message) to `negotiations/:providerPid/events` to accept the current [Provider's](../model/terminology.md#provider) [Offer](../model/terminology.md#offer). + + +```http request +POST https://provider.com/negotiations/:providerPid/events + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiationEventMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:eventType": "dspace:ACCEPTED" +} +``` + +##### Response + +If the CN's state is successfully transitioned, the [Provider](../model/terminology.md#provider) must return an HTTP code 200 (OK). The response body is not specified and clients are not required to process it. + +If the current [Offer](../model/terminology.md#offer) was created by the [Consumer](../model/terminology.md#consumer), the [Provider](../model/terminology.md#provider) must return an HTTP code 400 (Bad Request) with a [Contract Negotiation Error](./contract.negotiation.protocol.md#32-error---contract-negotiation-error) in the response body. + +### 2.5 The `negotiations/:providerPid/agreement/verification` Endpoint _(Provider-side)_ + +#### 2.5.1 POST + +##### Request + +The [Consumer](../model/terminology.md#consumer) can POST a [Contract Agreement Verification Message](./contract.negotiation.protocol.md#24-contract-agreement-verification-message) to verify an [Agreement](../model/terminology.md#agreement). + +```http request +POST https://provider.com/negotiations/:providerPid/agreement/verification + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractAgreementVerificationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833" +} +``` + +##### Response + +If the CN's state is successfully transitioned, the [Provider](../model/terminology.md#provider) must return an HTTP code 200 (OK). The response body is not specified and clients are not required to process it. + + +### 2.6 The `negotiations/:providerPid/termination` Endpoint _(Provider-side)_ + +#### 2.6.1 POST + +##### Request + +The [Consumer](../model/terminology.md#consumer) can POST a [Contract Negotiation Termination Message](./contract.negotiation.protocol.md#26-contract-negotiation-termination-message) to terminate a CN. + +```http request +POST https://provider.com/negotiations/:providerPid/termination + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiationTerminationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + ... + ] +} +``` + +##### Response + +If the CN's state is successfully transitioned, the [Provider](../model/terminology.md#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 + +| Endpoint | Method | Description | +|:---------------------------------------------------------------------|:-------|:---------------------------| +| https://consumer.com/negotiations/offers | `POST` | Section [3.2.1](#321-post) | +| https://consumer.com/:callback/negotiations/:consumerPid/offers | `POST` | Section [3.3.1](#331-post) | +| https://consumer.com/:callback/negotiations/:consumerPid/agreement | `POST` | Section [3.4.1](#341-post) | +| https://consumer.com/:callback/negotiations/:consumerPid/events | `POST` | Section [3.5.1](#351-post) | +| https://consumer.com/:callback/negotiations/:consumerPid/termination | `POST` | Section [3.6.1](#361-post) | + +**_Note:_** The `:callback` can be chosen freely by the implementations. + +### 3.1 Prerequisites + +All callback paths are relative to the `callbackAddress` base URL specified in the [Contract Request Message](./contract.negotiation.protocol.md#21-contract-request-message) that initiated a CN. For example, if the `callbackAddress` is specified as `https://consumer.com/callback` and a callback path binding is `negotiations/:consumerPid/offers`, the resolved URL will be `https://consumer.com/callback/negotiations/:consumerPid/offers`. + +### 3.2 The `negotiations/offers` Endpoint _(Consumer-side)_ + +#### 3.2.1 POST + +##### Request + +A CN is started and placed in the `OFFERED` state when a [Provider](../model/terminology.md#provider) POSTs a [Contract Offer Message](./contract.negotiation.protocol.md#22-contract-offer-message) to `negotiations/offers`: + +```http request +POST https://consumer.com/negotiations/offers + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractOfferMessage", + "dspace:providerPid": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "...", + "target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88" + }, + "dspace:callbackAddress": "https://..." +} +``` + +- The `callbackAddress` property specifies the base endpoint URL where the client receives messages associated with the CN. Support for the HTTPS scheme is required. Implementations may optionally support other URL schemes. + +- Callback messages will be sent to paths under the base URL as described by this specification. Note that [Consumers](../model/terminology.md#consumer) should properly handle the cases where a trailing / is included with or absent from the `callbackAddress` when resolving full URL. + +##### Response + +The [Consumer](../model/terminology.md#consumer) must return an HTTP 201 (Created) response with a body containing the [Contract Negotiation](./contract.negotiation.protocol.md#31-ack---contract-negotiation): + +```json +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiation", + "dspace:providerPid": "urn:uuid:dcbf434c-eacf-4582-9a02-f8dd50120fd3", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:state" :"OFFERED" +} +``` + +### 3.3 The `negotiations/:consumerPid/offers` Endpoint _(Consumer-side)_ + +#### 3.3.1 POST + +##### Request + +A [Provider](../model/terminology.md#provider) may make an [Offer](../model/terminology.md#offer) by POSTing a [Contract Offer Message](./contract.negotiation.protocol.md#22-contract-offer-message) to the `negotiations/:consumerPid/offers` callback: + +```http request +POST https://consumer.com/:callback/negotiations/:consumerPid/offers + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractOfferMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "urn:uuid:6bcea82e-c509-443d-ba8c-8eef25984c07", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "dspace:providerId": "urn:tsdshhs636378", + "dspace:consumerId": "urn:jashd766", + ... + }, + "dspace:callbackAddress": "https://......" +} +``` + +##### Response + +If the message is successfully processed, the [Consumer](../model/terminology.md#consumer) must return an HTTP 200 (OK) response. The response body is not specified and clients are not required to process it. + +### 3.4 The `negotiations/:consumerPid/agreement` Endpoint _(Consumer-side)_ + +#### 3.4.1 POST + +##### Request + +The [Provider](../model/terminology.md#provider) can POST a [Contract Agreement Message](./contract.negotiation.protocol.md#23-contract-agreement-message) to the `negotiations/:consumerPid/agreement` callback to create an [Agreement](../model/terminology.md#agreement). + +```http request +POST https://consumer.com/:callback/negotiations/:consumerPid/agreement + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractAgreementMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:agreement": { + "@id": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44", + "@type": "odrl:Agreement", + "odrl:target": "urn:uuid:3dd1add4-4d2d-569e-d634-8394a8836d23", + "dspace:timestamp": "2023-01-01T01:00:00Z", + "dspace:providerId": "urn:tsdshhs636378", + "dspace:consumerId": "urn:jashd766", + ... + }, + "dspace:callbackAddress": "https://......" +} +``` + +##### Response + +If the CN's state is successfully transitioned, the [Consumer](../model/terminology.md#consumer) must return an HTTP code 200 (OK). The response body is not specified and clients are not required to process it. + +### 3.5 The `negotiations/:consumerPid/events` Endpoint _(Consumer-side)_ + +#### 3.5.1 POST + +##### Request + +A [Provider](../model/terminology.md#provider) can POST a [Contract Negotiation Event Message](./contract.negotiation.protocol.md#25-contract-negotiation-event-message) to the `negotiations/:consumerPid/events` callback with an `eventType` of `FINALIZED` to finalize an [Agreement](../model/terminology.md#agreement). + +```http request +POST https://consumer.com/:callback/negotiations/:consumerPid/events + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiationEventMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:eventType": "dspace:FINALIZED" +} +``` + +##### Response + +If the CN's state is successfully transitioned, the [Consumer](../model/terminology.md#consumer) must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. + +### 3.6 The `negotiations/:consumerPid/termination` Endpoint _(Consumer-side)_ + +#### 3.6.1 POST + +##### Request + +The [Provider](../model/terminology.md#provider) can POST a [Contract Negotiation Termination Message](./contract.negotiation.protocol.md#26-contract-negotiation-termination-message) to terminate a CN. + +```http request +POST https://consumer.com/negotiations/:consumerPid/termination + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiationTerminationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + ... + ] +} +``` + +##### Response + +If the CN's state is successfully transitioned, the [Consumer](../model/terminology.md#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 new file mode 100644 index 0000000..9ba74df --- /dev/null +++ b/negotiation/contract.negotiation.protocol.md @@ -0,0 +1,190 @@ +# Contract Negotiation Protocol + +This document outlines the key elements of the [Contract Negotiation Protocol](../model/terminology.md#contract-negotiation-protocol). The used terms are described [here](../model/terminology.md). + +- [Contract Negotiation Protocol](#contract-negotiation-protocol) + - [1 Introduction](#1-introduction) + - [1.1 States](#11-states) + - [1.2 State Machine](#12-state-machine) + - [2 Message Types](#2-message-types) + - [2.1 Contract Request Message](#21-contract-request-message) + - [2.2 Contract Offer Message](#22-contract-offer-message) + - [2.3 Contract Agreement Message](#23-contract-agreement-message) + - [2.4 Contract Agreement Verification Message](#24-contract-agreement-verification-message) + - [2.5 Contract Negotiation Event Message](#25-contract-negotiation-event-message) + - [2.6 Contract Negotiation Termination Message](#26-contract-negotiation-termination-message) + - [3 Response Types](#3-response-types) + - [3.1 ACK - Contract Negotiation](#31-ack---contract-negotiation) + - [3.2 ERROR - Contract Negotiation Error](#32-error---contract-negotiation-error) + +## 1 Introduction + +A [Contract Negotiation](../model/terminology.md#contract-negotiation) (CN) involves two parties, a [Provider](../model/terminology.md#provider) that offers one or more [Datasets](../model/terminology.md#dataset) under a usage contract and [Consumer](../model/terminology.md#consumer) that requests [Datasets](../model/terminology.md#dataset). A CN is uniquely identified through an [IRI](https://www.w3.org/International/articles/idn-and-iri/). Each CN requires a newly generated IRI, which may not be used in a CN after a terminal state has been reached. A CN progresses through a series of states, which are tracked by the [Provider](../model/terminology.md#provider) and [Consumer](../model/terminology.md#consumer) using messages. A CN transitions to a state in response to an acknowledged message from the counter-party. Both parties have the same state of the CN. In case the states differ, the CN is terminated and a new CN has to be initiated. + +### 1.1 States + +The CN states are: + +- **REQUESTED**: A contract for a [Dataset](../model/terminology.md#dataset) has been requested by the [Consumer](../model/terminology.md#consumer) based on an [Offer](../model/terminology.md#offer) and the [Provider](../model/terminology.md#provider) has sent an ACK response. +- **OFFERED**: The [Provider](../model/terminology.md#provider) has sent an [Offer](../model/terminology.md#offer) to the [Consumer](../model/terminology.md#consumer) and the [Consumer](../model/terminology.md#consumer) has sent an ACK response. +- **ACCEPTED**: The [Consumer](../model/terminology.md#consumer) has accepted the latest [Offer](../model/terminology.md#offer) and the [Provider](../model/terminology.md#provider) has sent an ACK response. +- **AGREED**: The [Provider](../model/terminology.md#provider) has accepted the latest [Offer](../model/terminology.md#offer), sent an [Agreement](../model/terminology.md#agreement) to the [Consumer](../model/terminology.md#consumer), and the [Consumer](../model/terminology.md#consumer) has sent an ACK response. +- **VERIFIED**: The [Consumer](../model/terminology.md#consumer) has sent an [Agreement](../model/terminology.md#agreement) verification to the [Provider](../model/terminology.md#provider) and the [Provider](../model/terminology.md#provider) has sent an ACK response. +- **FINALIZED**: The [Provider](../model/terminology.md#provider) has sent a finalization message including his own [Agreement](../model/terminology.md#agreement) verification to the [Consumer](../model/terminology.md#consumer) and the [Consumer](../model/terminology.md#consumer) has sent an ACK response. Data is now available to the [Consumer](../model/terminology.md#consumer). +- **TERMINATED**: The [Provider](../model/terminology.md#provider) or [Consumer](../model/terminology.md#consumer) has placed the CN in a terminated state. A termination message has been sent by either of the [Participants](../model/terminology.md#participant) and the other has sent an ACK response. This is a terminal state. + +### 1.2 State Machine + +The CN state machine is represented in the following diagram: + +![](./figures/contract.negotiation.state.machine.png) + +Transitions marked with `C` indicate a message sent by the [Consumer](../model/terminology.md#consumer), transitions marked with `P` indicate a [Provider](../model/terminology.md#provider) message. Terminal states are final; the state machine may not transition to another state. A new CN may be initiated if, for instance, the CN entered the `TERMINATED` state due to a network issue. + +## 2 Message Types + +The CN state machine is transitioned upon receipt and acknowledgement of a message. This section details those messages as abstract message types. + +- Concrete wire formats are defined by the protocol binding, e.g., [Contract Negotiation HTTPS Binding](contract.negotiation.binding.https.md).. +- All [Policy](../model/terminology.md#policy) types ([Offer](../model/terminology.md#offer), [Agreement](../model/terminology.md#agreement)) must contain an unique identifier in the form of a URI. GUIDs can also be used in the form of URNs, for instance following the pattern . +- An [ODRL Agreement](https://www.w3.org/TR/odrl-vocab/#term-Agreement) must have a target property containing the [Dataset](../model/terminology.md#dataset) id. + +### 2.1 Contract Request Message + +| | | +|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer) | +| **Resulting state** | `REQUESTED`, `TERMINATED` | +| **Response** | [ACK](#31-ack---contract-negotiation) or [ERROR](#32-error---contract-negotiation-error) | +| **Schema** | [TTL Shape](./message/shape/contract-request-message-shape.ttl), [JSON Schema](./message/schema/contract-request-message-schema.json) | +| **Example** | Initiating [Message](./message/example/contract-request-message_initial.json), [Message](./message/example/contract-offer-message.json) | +| **Diagram(s)** | ![](./message/diagram/contract-request-message.png) | + +The Contract Request Message is sent by a [Consumer](../model/terminology.md#consumer) to initiate a CN or to respond to a [Contract Offer Message](#22-contract-offer-message) sent by a [Provider](../model/terminology.md#provider). +- The [Consumer](../model/terminology.md#consumer) must include an `offer` property, which itself must have a `@id` property. If the message includes a `providerPid` property, the request will be associated with an existing CN and a [Consumer](../model/terminology.md#consumer) [Offer](../model/terminology.md#offer) will be created using either the `offer` or `offer.@id` properties. If the message does not include a `providerPid`, a new CN will be created on [Provider](../model/terminology.md#provider) side using either the `offer` or `offer.@id` properties and the [Provider](../model/terminology.md#provider) selects an appropriate `providerPid`. +- An `offer.@id` will generally refer to an [Offer](../model/terminology.md#offer) contained in a [Catalog](../model/terminology.md#catalog). If the [Provider](../model/terminology.md#provider) is not aware of the `offer.@id` value, it must respond with an error message. +- The `callbackAddress` is a URL indicating where messages to the [Consumer](../model/terminology.md#consumer) should be sent in asynchronous settings. If the address is not understood, the [Provider](../model/terminology.md#provider) MUST return an UNRECOVERABLE error. +- Different to a [Catalog](../model/terminology.md#catalog) or [Dataset](../model/terminology.md#dataset), the [Offer](../model/terminology.md#offer) inside a [Contract Request Message](#21-contract-request-message) must have an `odrl:target` attribute. However, it's contained Rules must not have any `odrl:target` attributes to prevent inconsistencies with the [ODRL inferencing rules for compact policies](https://www.w3.org/TR/odrl-model/#composition-compact). + + +### 2.2 Contract Offer Message + +| | | +|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Provider](../model/terminology.md#provider) | +| **Resulting state** | `OFFERED`, `TERMINATED` | +| **Response** | [ACK](#31-ack---contract-negotiation) or [ERROR](#32-error---contract-negotiation-error) | +| **Schema** | [TTL Shape](./message/shape/contract-offer-message-shape.ttl), [JSON Schema](./message/schema/contract-offer-message-schema.json) | +| **Example** | [Example Initial Message](./message/example/contract-offer-message_initial.json), [Example Message](./message/example/contract-offer-message.json) | +| **Diagram(s)** |

Initial message (note the missing `consumerPid`)

![](./message/diagram/contract-offer-message_initial.png)

Message following a [Contract Request Message](#21-contract-request-message):

![](./message/diagram/contract-offer-message.png)

| + +The Contract Offer Message is sent by a [Provider](../model/terminology.md#provider) to initiate a CN or to respond to a [Contract Request Message](#21-contract-request-message) sent by a [Consumer](../model/terminology.md#consumer). +- If the message includes a `consumerPid` property, the request will be associated with an existing CN. If the message does not include a `consumerPid`, a new CN will be created on [Consumer](../model/terminology.md#consumer) side and the [Consumer](../model/terminology.md#consumer) selects an appropriate `consumerPid`. +- The [Dataset](../model/terminology.md#dataset) id is not required but can be included when the [Provider](../model/terminology.md#provider) initiates a CN. +- Different to a [Dataset](../model/terminology.md#dataset) (see [DCAT Vocabulry Mapping](../catalog/catalog.protocol.md#11-dcat-vocabulary-mapping)), the Offer inside a ContractOfferMessage must have an `odrl:target` attribute. However, it's contained Rules must not have any `odrl:target` attributes to prevent inconsistencies with the [ODRL inferencing rules for compact policies](https://www.w3.org/TR/odrl-model/#composition-compact). + + +### 2.3 Contract Agreement Message + +| | | +|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Provider](../model/terminology.md#provider) | +| **Resulting state** | `AGREED`, `TERMINATED` | +| **Response** | [ACK](#31-ack---contract-negotiation) or [ERROR](#32-error---contract-negotiation-error) | +| **Schema** | [TTL Shape](./message/shape/contract-agreement-message-shape.ttl), [JSON Schema](./message/schema/contract-agreement-message-schema.json) | +| **Example** | [Message](./message/example/contract-agreement-message.json) | +| **Diagram(s)** | ![](./message/diagram/contract-agreement-message.png) | + +The Contract Agreement Message is sent by a [Provider](../model/terminology.md#provider) when it agrees to a contract. It contains the complete [Agreement](../model/terminology.md#agreement). +- The message must contain a `consumerPid` and a `providerPid`. +- The message must contain an [ODRL Agreement](https://www.w3.org/TR/odrl-vocab/#term-Agreement). +- An [Agreement](../model/terminology.md#agreement) must contain a `timestamp` property defined as an [XSD DateTime](https://www.w3schools.com/XML/schema_dtypes_date.asp) type. +- An [Agreement](../model/terminology.md#agreement) must contain an `assigner` and `assignee`. The contents of these properties are a dataspace-specific unique identifier of the [Agreement](../model/terminology.md#agreement) parties. Note that these identifiers are not necessarily the same as the identifiers of the [Participant Agents](../model/terminology.md#participant-agent) negotiating the contract (e.g., [Connectors](../model/terminology.md#connector--data-service-)). +- An [Agreement](../model/terminology.md#agreement) must contain a `odrl:target` property. None of its Rules, however, must have any `odrl:target` attributes to prevent inconsistencies with the [ODRL inferencing rules for compact policies](https://www.w3.org/TR/odrl-model/#composition-compact). + + +### 2.4 Contract Agreement Verification Message + +| | | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer) | +| **Resulting state** | `VERIFIED`, `TERMINATED` | +| **Response** | [ACK](#31-ack---contract-negotiation) or [ERROR](#32-error---contract-negotiation-error) | +| **Schema** | [TTL Shape](./message/shape/contract-agreement-verification-message-shape.ttl), [JSON Schema](./message/schema/contract-agreement-verification-message-schema.json) | +| **Example** | [Message](./message/example/contract-agreement-verification-message.json) | +| **Diagram(s)** | ![](./message/diagram/contract-agreement-verification-message.png) | + +The Contract Agreement Verification Message is sent by a [Consumer](../model/terminology.md#consumer) to verify the acceptance of an [Agreement](../model/terminology.md#agreement). +- A [Provider](../model/terminology.md#provider) responds with an error if the contract cannot be validated or is incorrect. +- The message must contain a `consumerPid` and a `providerPid`. + +### 2.5 Contract Negotiation Event Message + +| | | +|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer), [Provider](../model/terminology.md#provider) | +| **Resulting state** | `FINALIZED`, `ACCEPTED`, `TERMINATED` | +| **Response** | [ACK](#31-ack---contract-negotiation) or [ERROR](#32-error---contract-negotiation-error) | +| **Schema** | [TTL Shape](./message/shape/contract-negotiation-event-message-shape.ttl), [JSON Schema](./message/schema/contract-negotiation-event-message-schema.json) | +| **Example** | [Message](./message/example/contract-negotiation-event-message.json) | +| **Diagram(s)** | ![](./message/diagram/contract-negotiation-event-message.png) | + +When the Contract Negotiation Event Message is sent by a [Provider](../model/terminology.md#provider) with an `eventType` property set to `FINALIZED`, an [Agreement](../model/terminology.md#agreement) has been finalized and the associated [Dataset](../model/terminology.md#dataset) is accessible. The state machine is transitioned to the `FINALIZED` state. +- Other event types may be defined in the future. +- A [Consumer](../model/terminology.md#consumer) responds with an error if the contract cannot be validated or is incorrect. +- The message must contain a `consumerPid` and a `providerPid`. +- When the message is sent by a [Consumer](../model/terminology.md#consumer) with an `eventType` set to `ACCEPTED`, the state machine is placed in the `ACCEPTED` state. +- It is an error for a [Consumer](../model/terminology.md#consumer) to send the message with an event type `FINALIZED` to the [Provider](../model/terminology.md#provider). +- It is an error for a [Provider](../model/terminology.md#provider) to send the message with an event type `ACCEPTED` to the [Consumer](../model/terminology.md#consumer). + +Note that CN events are not intended for propagation of an [Agreement](../model/terminology.md#agreement) state after a CN has entered a terminal state. It is considered an error for a [Consumer](../model/terminology.md#consumer) or [Provider](../model/terminology.md#provider) to send an event after the CN state machine has entered a terminal state. + +### 2.6 Contract Negotiation Termination Message + +| | | +|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer), [Provider](../model/terminology.md#provider) | +| **Resulting state** | `TERMINATED` | +| **Response** | [ACK](#31-ack---contract-negotiation) or [ERROR](#32-error---contract-negotiation-error) | +| **Schema** | [TTL Shape](./message/shape/contract-negotiation-termination-message-shape.ttl), [JSON Schema](./message/schema/contract-negotiation-termination-message-schema.json) | +| **Example** | [Message](./message/example/contract-negotiation-termination-message.json) | +| **Diagram(s)** | ![](./message/diagram/contract-negotiation-termination-message.png) | + +The Contract Negotiation Termination Message is sent by a [Consumer](../model/terminology.md#consumer) or [Provider](../model/terminology.md#provider) indicating it has cancelled the CN sequence. The message can be sent at any state of a CN without providing an explanation. Nevertheless, the sender may provide a description to help the receiver. +- The message must contain a `consumerPid` and a `providerPid`. +- If an error is received in response to the message, the sending party may choose to ignore the error. + +Note that a CN 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](../model/terminology.md#connector--data-service-) operator may remove terminated CN resources after it has reached the terminated state. + +## 3 Response Types + +The `ACK` and `ERROR` response types are mapped onto a protocol such as HTTPS. A description of an error might be provided in protocol-dependent forms, e.g., for an HTTPS binding in the request or response body. + +### 3.1 ACK - Contract Negotiation + +| | | +|-----------------|-------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer), [Provider](../model/terminology.md#provider) | +| **Schema** | [TTL Shape](./message/shape/contract-negotiation-shape.ttl), [JSON Schema](./message/schema/contract-negotiation-schema.json) | +| **Example** | [Process](./message/example/contract-negotiation.json) | +| **Diagram(s)** | ![](./message/diagram/contract-negotiation.png) | + +The Contract Negotiation is an object returned by a [Consumer](../model/terminology.md#consumer) or [Provider](../model/terminology.md#provider) indicating a successful state change happened. + +### 3.2 ERROR - Contract Negotiation Error + +| | | +|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer), [Provider](../model/terminology.md#provider) | +| **Schema** | [TTL Shape](./message/shape/contract-negotiation-error-shape.ttl), [JSON Schema](./message/schema/contract-negotiation-error-schema.json) | +| **Example** | [Error](./message/example/contract-negotiation-error.json) | +| **Diagram(s)** | ![](./message/diagram/contract-negotiation-error.png) | + +The Contract Negotiation Error is an object returned by a [Consumer](../model/terminology.md#consumer) or [Provider](../model/terminology.md#provider) indicating an error has occurred. It does not cause a state transition. + +| Field | Type | Description | +|---------------|---------------|------------------------------------------------------------------------| +| `consumerPid` | UUID | The CN unique id on [Consumer](../model/terminology.md#consumer) side. | +| `providerPid` | UUID | The CN unique id on [Provider](../model/terminology.md#provider) side. | +| `code` | String | An optional implementation-specific error code. | +| `reason` | Array[object] | An optional array of implementation-specific error objects. | diff --git a/negotiation/figures/contract.negotiation.state.machine.png b/negotiation/figures/contract.negotiation.state.machine.png new file mode 100644 index 0000000..9f1d095 Binary files /dev/null and b/negotiation/figures/contract.negotiation.state.machine.png differ diff --git a/negotiation/figures/contract.negotiation.state.machine.puml b/negotiation/figures/contract.negotiation.state.machine.puml new file mode 100644 index 0000000..6fd7136 --- /dev/null +++ b/negotiation/figures/contract.negotiation.state.machine.puml @@ -0,0 +1,39 @@ +@startuml "contract-negotiation-state-machine" +!pragma layout smetana + +!include ../common/style/diagram.styles.puml + +hide empty description + +state REQUESTED: ContractRequestMessage +state OFFERED: ContractOfferMessage +state ACCEPTED: ContractNegotiationEventMessage:accepted +state AGREED: ContractAgreementMessage +state VERIFIED: ContractAgreementVerificationMessage +state FINALIZED: ContractNegotiationEventMessage:finalized + +state TERMINATED $lightRed #$borderRed: ContractNegotiationTerminationMessage + +[*] --> REQUESTED: C +REQUESTED --> OFFERED: P +REQUESTED --> AGREED: P +REQUESTED --> TERMINATED: C/P + +[*] --> OFFERED: P +OFFERED --> REQUESTED: C +OFFERED --> ACCEPTED: C +OFFERED --> TERMINATED: C/P + +ACCEPTED --> AGREED: P +ACCEPTED -> TERMINATED: P + +AGREED --> VERIFIED: C +AGREED --> TERMINATED: C + +VERIFIED --> FINALIZED: P +VERIFIED -> TERMINATED: P + +FINALIZED -->[*] +TERMINATED --> [*] + +@enduml diff --git a/negotiation/message/diagram/contract-agreement-message.png b/negotiation/message/diagram/contract-agreement-message.png new file mode 100644 index 0000000..07121f5 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 0000000..51e36be --- /dev/null +++ b/negotiation/message/diagram/contract-agreement-message.puml @@ -0,0 +1,28 @@ +@startuml "contract-agreement-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "dspace:ContractAgreementMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:ContractAgreementMessage" + dspace:providerPid : String + dspace:consumerPid : String + dspace:callbackAddress : xsd:anyURI +} + +class odrl:Agreement { + @type : "odrl:Agreement" + @id: String + odrl:target : xsd:anyURI + dspace:timestamp : xsd:dateTime + odrl:assignee : String + odrl:assigner : String +} + +"dspace:ContractAgreementMessage" "1" *-- "1" "odrl:Agreement" : "dspace:agreement" + +@enduml 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 0000000..1ff82d1 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 0000000..a0e919e --- /dev/null +++ b/negotiation/message/diagram/contract-agreement-verification-message.puml @@ -0,0 +1,17 @@ +@startuml "contract-agreement-verification-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "dspace:ContractAgreementVerificationMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:ContractAgreementVerificationMessage" + dspace:providerPid : String + dspace:consumerPid : String +} + + +@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 0000000..392aef0 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 0000000..ac9cb74 --- /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 "dspace:ContractNegotiationError" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:ContractNegotiationError" + dspace:providerPid : String + dspace:consumerPid : String + dspace:code : String + dspace:reason : Array +} + +class "MultilanguageProperty" { + @language : BCP47 Language-Tag + @value: String +} + +"dspace: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 0000000..321d32f 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 0000000..05e1ecf --- /dev/null +++ b/negotiation/message/diagram/contract-negotiation-event-message.puml @@ -0,0 +1,23 @@ +@startuml "contract-negotiation-event-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "dspace:ContractNegotiationEventMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:ContractNegotiationEventMessage" + dspace:providerPid : String + dspace:consumerPid : String +} + +enum dspace:NegotiationEvent { + dspace:ACCEPTED + dspace:FINALIZED +} + +"dspace:ContractNegotiationEventMessage" "1" *-- "1" "dspace:NegotiationEvent" : "dspace: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 0000000..24a256a 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 0000000..cd54f0d --- /dev/null +++ b/negotiation/message/diagram/contract-negotiation-termination-message.puml @@ -0,0 +1,18 @@ +@startuml "contract-negotiation-termination-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "dspace:ContractNegotiationTerminationMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:ContractNegotiationTerminationMessage" + dspace:providerPid : String + dspace:consumerPid : String + dspace:code : String + dspace: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 0000000..305028d 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 0000000..f32abe4 --- /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 "dspace:ContractNegotiation" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:ContractNegotiation" + dspace:providerPid : String + dspace:consumerPid : String +} + +enum dspace:NegotiationState { + "dspace:REQUESTED" + "dspace:OFFERED" + "dspace:ACCEPTED" + "dspace:AGREED" + "dspace:VERIFIED" + "dspace:FINALIZED" + "dspace:TERMINATED" + "..." +} + +"dspace:ContractNegotiation" "1" *-- "1" "dspace:NegotiationState" : "dspace:state" + +@enduml diff --git a/negotiation/message/diagram/contract-offer-message.png b/negotiation/message/diagram/contract-offer-message.png new file mode 100644 index 0000000..eea70c4 Binary files /dev/null and b/negotiation/message/diagram/contract-offer-message.png differ diff --git a/negotiation/message/diagram/contract-offer-message.puml b/negotiation/message/diagram/contract-offer-message.puml new file mode 100644 index 0000000..dafd886 --- /dev/null +++ b/negotiation/message/diagram/contract-offer-message.puml @@ -0,0 +1,25 @@ +@startuml "contract-offer-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "dspace:ContractOfferMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : dspace:ContractOfferMessage + dspace:providerPid : String + dspace:consumerPid : String + dspace:callbackAddress : String +} + +class odrl:Offer { + @type : odrl:Offer, + @id: String + odrl:target : xsd:anyURI +} + +"dspace:ContractOfferMessage" "1" *-- "1" "odrl:Offer" : "dspace:offer" + +@enduml \ No newline at end of file diff --git a/negotiation/message/diagram/contract-offer-message_initial.png b/negotiation/message/diagram/contract-offer-message_initial.png new file mode 100644 index 0000000..29bac76 Binary files /dev/null and b/negotiation/message/diagram/contract-offer-message_initial.png differ diff --git a/negotiation/message/diagram/contract-offer-message_initial.puml b/negotiation/message/diagram/contract-offer-message_initial.puml new file mode 100644 index 0000000..1bec883 --- /dev/null +++ b/negotiation/message/diagram/contract-offer-message_initial.puml @@ -0,0 +1,24 @@ +@startuml "contract-offer-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "dspace:ContractOfferMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : dspace:ContractOfferMessage + dspace:providerPid : String + dspace:callbackAddress : String +} + +class odrl:Offer { + @type : odrl:Offer, + @id: String + odrl:target : xsd:anyURI +} + +"dspace:ContractOfferMessage" "1" *-- "1" "odrl:Offer" : "dspace:offer" + +@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 0000000..19c3aaf 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 0000000..fe1be30 --- /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 "dspace:ContractRequestMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : dspace:ContractRequestMessage + dspace:providerPid : String + dspace:consumerPid : String + dspace:callbackAddress : String +} + +class odrl:Offer { + @type : odrl:Offer, + @id: String + odrl:target : xsd:anyURI + ... +} + +"dspace:ContractRequestMessage" "1" *-- "1" "odrl:Offer" : "dspace:offer" + +@enduml \ No newline at end of file diff --git a/negotiation/message/diagram/contract-request-message_initial.png b/negotiation/message/diagram/contract-request-message_initial.png new file mode 100644 index 0000000..b50eefb Binary files /dev/null and b/negotiation/message/diagram/contract-request-message_initial.png differ diff --git a/negotiation/message/diagram/contract-request-message_initial.puml b/negotiation/message/diagram/contract-request-message_initial.puml new file mode 100644 index 0000000..3641174 --- /dev/null +++ b/negotiation/message/diagram/contract-request-message_initial.puml @@ -0,0 +1,25 @@ +@startuml "contract-request-message_initial" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "dspace:ContractRequestMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : dspace:ContractRequestMessage + dspace:consumerPid : String + dspace:callbackAddress : String +} + +class odrl:Offer { + @type : odrl:Offer, + @id: String + odrl:target : xsd:anyURI + ... +} + +"dspace:ContractRequestMessage" "1" *-- "*" "odrl:Offer" : "dspace:offer" + +@enduml diff --git a/negotiation/message/example/contract-agreement-message.json b/negotiation/message/example/contract-agreement-message.json new file mode 100644 index 0000000..a0016bc --- /dev/null +++ b/negotiation/message/example/contract-agreement-message.json @@ -0,0 +1,23 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractAgreementMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:agreement": { + "@id": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44", + "@type": "odrl:Agreement", + "odrl:target": "urn:uuid:3dd1add4-4d2d-569e-d634-8394a8836d23", + "dspace:timestamp": "2023-01-01T01:00:00Z", + "odrl:assigner": "urn:tsdshhs636378", + "odrl:assignee": "urn:jashd766", + "odrl:permission": [{ + "odrl:action": "odrl:use" , + "odrl:constraint": [{ + "odrl:leftOperand": "odrl:dateTime", + "odrl:operand": "odrl:lteq", + "odrl:rightOperand": { "@value": "2023-12-31T06:00Z", "@type": "xsd:dateTime" } + }] + }] + }, + "dspace:callbackAddress": "https://example.com/callback" +} diff --git a/negotiation/message/example/contract-agreement-verification-message.json b/negotiation/message/example/contract-agreement-verification-message.json new file mode 100644 index 0000000..419388f --- /dev/null +++ b/negotiation/message/example/contract-agreement-verification-message.json @@ -0,0 +1,6 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractAgreementVerificationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833" +} diff --git a/negotiation/message/example/contract-negotiation-error.json b/negotiation/message/example/contract-negotiation-error.json new file mode 100644 index 0000000..6ea7f33 --- /dev/null +++ b/negotiation/message/example/contract-negotiation-error.json @@ -0,0 +1,23 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiationError", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + { + "@value": "Catalog not provisioned for this requester.", + "@language": "en" + } + ], + "dct:description": [ + { + "@language": "en", + "@value": "The parsing of the input parameters failed." + }, + { + "@language": "de", + "@value": "Das Lesen der Eingabeparameter schlug fehl." + } + ] +} diff --git a/negotiation/message/example/contract-negotiation-event-message.json b/negotiation/message/example/contract-negotiation-event-message.json new file mode 100644 index 0000000..7f1fde8 --- /dev/null +++ b/negotiation/message/example/contract-negotiation-event-message.json @@ -0,0 +1,7 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiationEventMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:eventType": "dspace:ACCEPTED" +} diff --git a/negotiation/message/example/contract-negotiation-termination-message.json b/negotiation/message/example/contract-negotiation-termination-message.json new file mode 100644 index 0000000..95cbcd9 --- /dev/null +++ b/negotiation/message/example/contract-negotiation-termination-message.json @@ -0,0 +1,13 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiationTerminationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + { + "@value": "License model does not fit.", + "@language": "en" + } + ] +} diff --git a/negotiation/message/example/contract-negotiation.json b/negotiation/message/example/contract-negotiation.json new file mode 100644 index 0000000..becf0c5 --- /dev/null +++ b/negotiation/message/example/contract-negotiation.json @@ -0,0 +1,7 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiation", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:state": "dspace:REQUESTED" + } diff --git a/negotiation/message/example/contract-offer-message.json b/negotiation/message/example/contract-offer-message.json new file mode 100644 index 0000000..06fc69b --- /dev/null +++ b/negotiation/message/example/contract-offer-message.json @@ -0,0 +1,22 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractOfferMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "urn:uuid:6bcea82e-c509-443d-ba8c-8eef25984c07", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:assigner": "urn:tsdshhs636378", + "odrl:assignee": "urn:jashd766", + "odrl:permission": [{ + "odrl:action": "odrl:use" , + "odrl:constraint": [{ + "odrl:leftOperand": "odrl:dateTime", + "odrl:operand": "odrl:lteq", + "odrl:rightOperand": { "@value": "2023-12-31T06:00Z", "@type": "xsd:dateTime" } + }] + }] + }, + "dspace:callbackAddress": "https://example.com/callback" +} diff --git a/negotiation/message/example/contract-offer-message_initial.json b/negotiation/message/example/contract-offer-message_initial.json new file mode 100644 index 0000000..6e6b5a4 --- /dev/null +++ b/negotiation/message/example/contract-offer-message_initial.json @@ -0,0 +1,15 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractOfferMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "urn:uuid:d526561f-528e-4d5a-ae12-9a9dd9b7a518", + "odrl:assigner": "urn:tsdshhs636378", + "target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:permission": [{ + "odrl:action": "odrl:use" + }] + }, + "dspace:callbackAddress": "https://example.com/callback" +} diff --git a/negotiation/message/example/contract-request-message.json b/negotiation/message/example/contract-request-message.json new file mode 100644 index 0000000..32f7211 --- /dev/null +++ b/negotiation/message/example/contract-request-message.json @@ -0,0 +1,22 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractRequestMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "urn:uuid:d526561f-528e-4d5a-ae12-9a9dd9b7a815", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:assigner": "urn:tsdshhs636378", + "odrl:assignee": "urn:jashd766", + "odrl:permission": [{ + "odrl:action": "odrl:use" , + "odrl:constraint": [{ + "odrl:leftOperand": "odrl:dateTime", + "odrl:operand": "odrl:lteq", + "odrl:rightOperand": { "@value": "2023-12-31T06:00Z", "@type": "xsd:dateTime" } + }] + }] + }, + "dspace:callbackAddress": "https://example.com/callback" +} diff --git a/negotiation/message/example/contract-request-message_initial.json b/negotiation/message/example/contract-request-message_initial.json new file mode 100644 index 0000000..aafe340 --- /dev/null +++ b/negotiation/message/example/contract-request-message_initial.json @@ -0,0 +1,15 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractRequestMessage", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a89", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:assigner": "urn:tsdshhs636378", + "odrl:permission": [{ + "odrl:action": "odrl:use" + }] + }, + "dspace:callbackAddress": "https://example.com/callback" +} diff --git a/negotiation/message/example/contract.agreement.message.http.transfer.json b/negotiation/message/example/contract.agreement.message.http.transfer.json new file mode 100644 index 0000000..90006b4 --- /dev/null +++ b/negotiation/message/example/contract.agreement.message.http.transfer.json @@ -0,0 +1,44 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractAgreementMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:agreement": { + "@id": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44", + "@type": "odrl:Agreement", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:assignee": "...", + "odrl:assigner": "...", + "odrl:permission": [ + { + "@id": "some-permission-id", + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:equals", + "oderl:rightOperand": { + "@id": "dspace:HTTP_REST" + } + } + ] + } + ], + "odrl:duty": [ + { + "@id": "some-permission-id", + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:equals", + "oderl:rightOperand": { + "@id": "dspace:HTTP_REST" + } + } + ] + } + ] + }, + "dspace:callbackAddress": "https://example.com/callback" +} 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 0000000..a5a2369 --- /dev/null +++ b/negotiation/message/schema/contract-agreement-message-schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractAgreementMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractAgreementMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-agreement-message-schema.json", + "definitions": { + "ContractAgreementMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractAgreementMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:agreement": { + "$ref": "https://w3id.org/dspace/2024/1/negotiation/contract-schema.json#/definitions/Agreement" + }, + "dspace:callbackAddress": { + "type" : "string" + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:agreement", "dspace:callbackAddress"] + } + } +} 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 0000000..dbf27cd --- /dev/null +++ b/negotiation/message/schema/contract-agreement-verification-message-schema.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractAgreementVerificationMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractAgreementVerificationMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-agreement-verification-message-schema.json", + "definitions": { + "ContractAgreementVerificationMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractAgreementVerificationMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ 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 0000000..34d115a --- /dev/null +++ b/negotiation/message/schema/contract-negotiation-error-schema.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationErrorSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiationError" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-negotiation-error-schema.json", + "definitions": { + "ContractNegotiationError": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractNegotiationError" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "minItems": 1, + "items": {} + }, + "dct:description": { + "type": "array", + "items": { + "@language": { + "type": "string" + }, + "@value": { + "type": "string" + } + }, + "required": [ "@language", "@value"] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid"] + } + } +} \ 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 0000000..56ec3ab --- /dev/null +++ b/negotiation/message/schema/contract-negotiation-event-message-schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationEventMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiationEventMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-negotiation-event-message-schema.json", + "definitions": { + "ContractNegotiationEventMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractNegotiationEventMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:eventType": { + "type": "string", + "enum": [ + "dspace:ACCEPTED", + "dspace:FINALIZED" + ] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:eventType" ] + } + } +} \ 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 0000000..47f4c63 --- /dev/null +++ b/negotiation/message/schema/contract-negotiation-schema.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiation" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-negotiation-schema.json", + "definitions": { + "ContractNegotiation": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractNegotiation" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:state": { + "type": "string", + "enum": [ + "dspace:REQUESTED", + "dspace:OFFERED", + "dspace:ACCEPTED", + "dspace:AGREED", + "dspace:VERIFIED", + "dspace:FINALIZED", + "dspace:TERMINATED" + ] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:state" ] + } + } +} \ 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 0000000..816ea27 --- /dev/null +++ b/negotiation/message/schema/contract-negotiation-termination-message-schema.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationTerminationMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiationTerminationMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-negotiation-termination-message-schema.json", + "definitions": { + "ContractNegotiationTerminationMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractNegotiationTerminationMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "minItems": 1, + "items": {} + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/negotiation/message/schema/contract-offer-message-schema.json b/negotiation/message/schema/contract-offer-message-schema.json new file mode 100644 index 0000000..3ea7d45 --- /dev/null +++ b/negotiation/message/schema/contract-offer-message-schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractOfferMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractOfferMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-offer-message-schema.json", + "definitions": { + "ContractOfferMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractOfferMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:offer": { + "$ref": "https://w3id.org/dspace/2024/1/negotiation/contract-schema.json#/definitions/MessageOffer" + }, + "dspace:callbackAddress": { + "type" : "string" + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:offer", "dspace:callbackAddress" ] + } + } +} 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 0000000..3b1b8bb --- /dev/null +++ b/negotiation/message/schema/contract-request-message-schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractRequestMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-request-message-schema.json", + "definitions": { + "ContractRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractRequestMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:offer": { + "$ref": "https://w3id.org/dspace/2024/1/negotiation/contract-schema.json#/definitions/MessageOffer" + }, + "dspace:callbackAddress": { + "type" : "string" + } + }, + "required": [ "@context", "@type", "dspace:consumerPid", "dspace:offer", "dspace:callbackAddress" ] + } + } +} diff --git a/negotiation/message/schema/contract-schema.json b/negotiation/message/schema/contract-schema.json new file mode 100644 index 0000000..7689334 --- /dev/null +++ b/negotiation/message/schema/contract-schema.json @@ -0,0 +1,381 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "PolicySchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Policy" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-schema.json", + "definitions": { + "Policy": { + "oneOf": [ + { + "$ref": "#/definitions/MessageOffer" + }, + { + "$ref": "#/definitions/Offer" + }, + { + "$ref": "#/definitions/Agreement" + } + ] + }, + "PolicyClass": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractPolicyRule" + }, + { + "properties": { + "@id": { + "type": "string" + }, + "odrl:profile": { + "type": "array", + "items": { + "$ref": "#/definitions/Reference" + } + }, + "odrl:permission": { + "type": "array", + "items": { + "$ref": "#/definitions/Permission" + }, + "minItems": 1 + }, + "odrl:obligation": { + "type": "array", + "items": { + "$ref": "#/definitions/Duty" + }, + "minItems": 1 + } + }, + "required": [ + "@id" + ] + } + ] + }, + "AbstractPolicyRule": { + "properties": { + "odrl:assigner": { + "type": "string" + }, + "odrl:assignee": { + "type": "string" + } + } + }, + "MessageOffer": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/PolicyClass" + }, + { + "properties": { + "@type": { + "type": "string", + "const": "odrl:Offer" + } + } + }, + { + "anyOf": [ + { + "required": [ + "odrl:permission" + ] + }, + { + "required": [ + "odrl:prohibition" + ] + } + ] + } + ], + "required": [ "@type", "odrl:assigner" ] + }, + "Offer": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/MessageOffer" + } + ], + "not": { "required": [ "odrl:target" ] } + }, + "Agreement": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/PolicyClass" + }, + { + "properties": { + "@type": { + "type": "string", + "const": "odrl:Agreement" + }, + "@id": { + "type": "string" + }, + "odrl:target": { + "type": "string" + }, + "dspace:timestamp": { + "type": "string", + "pattern": "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?" + } + } + }, + { + "anyOf": [ + { + "required": [ + "odrl:permission" + ] + }, + { + "required": [ + "odrl:prohibition" + ] + } + ] + } + ], + "required": [ + "@type", + "@id", + "odrl:target", + "odrl:assignee", + "odrl:assigner" + ] + }, + "RuleClass": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractPolicyRule" + }, + { + "properties": { + "odrl:action": { + "$ref": "#/definitions/Action" + }, + "odrl:constraint": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraint" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "odrl:action" + ] + }, + "Permission": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractPolicyRule" + }, + { + "properties": { + "odrl:action": { + "$ref": "#/definitions/Action" + }, + "odrl:constraint": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraint" + }, + "minItems": 1 + }, + "odrl:duty": { + "$ref": "#/definitions/Duty" + } + }, + "required": [ + "odrl:action" + ] + } + ] + }, + "Duty": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractPolicyRule" + }, + { + "properties": { + "@id": { + "type": "string" + }, + "odrl:action": { + "$ref": "#/definitions/Action" + }, + "odrl:constraint": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraint" + } + } + }, + "required": [ + "odrl:action" + ] + } + ] + }, + "Action": { + "type": "string", + "enum": [ + "odrl:delete", + "odrl:execute", + "cc:SourceCode", + "odrl:anonymize", + "odrl:extract", + "odrl:read", + "odrl:index", + "odrl:compensate", + "odrl:sell", + "odrl:derive", + "odrl:ensureExclusivity", + "odrl:annotate", + "cc:Reproduction", + "odrl:translate", + "odrl:include", + "cc:DerivativeWorks", + "cc:Distribution", + "odrl:textToSpeech", + "odrl:inform", + "odrl:grantUse", + "odrl:archive", + "odrl:modify", + "odrl:aggregate", + "odrl:attribute", + "odrl:nextPolicy", + "odrl:digitize", + "cc:Attribution", + "odrl:install", + "odrl:concurrentUse", + "odrl:distribute", + "odrl:synchronize", + "odrl:move", + "odrl:obtainConsent", + "odrl:print", + "cc:Notice", + "odrl:give", + "odrl:uninstall", + "cc:Sharing", + "odrl:reviewPolicy", + "odrl:watermark", + "odrl:play", + "odrl:reproduce", + "odrl:transform", + "odrl:display", + "odrl:stream", + "cc:ShareAlike", + "odrl:acceptTracking", + "cc:CommericalUse", + "odrl:present", + "odrl:use" + ] + }, + "Constraint": { + "type": "object", + "properties": { + "odrl:rightOperand": { + "$ref": "#/definitions/RightOperand" + }, + "odrl:rightOperandReference": { + "$ref": "#/definitions/Reference" + }, + "odrl:leftOperand": { + "$ref": "#/definitions/LeftOperand" + }, + "odrl:operator": { + "$ref": "#/definitions/Operator" + } + } + }, + "Operator": { + "type": "string", + "enum": [ + "odrl:eq", + "odrl:gt", + "odrl:gteq", + "odrl:hasPart", + "odrl:isA", + "odrl:isAllOf", + "odrl:isAnyOf", + "odrl:isNoneOf", + "odrl:isPartOf", + "odrl:lt", + "odrl:term-lteq", + "odrl:neq" + ] + }, + "RightOperand": {}, + "LeftOperand": { + "type": "string", + "enum": [ + "odrl:absolutePosition", + "odrl:absoluteSize", + "odrl:absoluteSpatialPosition", + "odrl:absoluteTemporalPosition", + "odrl:count", + "odrl:dateTime", + "odrl:delayPeriod", + "odrl:deliveryChannel", + "odrl:device", + "odrl:elapsedTime", + "odrl:event", + "odrl:fileFormat", + "odrl:industry", + "odrl:language", + "odrl:media", + "odrl:meteredTime", + "odrl:payAmount", + "odrl:percentage", + "odrl:product", + "odrl:purpose", + "odrl:recipient", + "odrl:relativePosition", + "odrl:relativeSize", + "odrl:relativeSpatialPosition", + "odrl:relativeTemporalPosition", + "odrl:resolution", + "odrl:spatial", + "odrl:spatialCoordinates", + "odrl:system", + "odrl:systemDevice", + "odrl:timeInterval", + "odrl:unitOfCount", + "odrl:version", + "odrl:virtualLocation" + ] + }, + "Reference": { + "type": "object", + "properties": { + "@id": { + "type": "string" + } + }, + "required": [ + "@id" + ] + } + } +} 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 0000000..d5624b8 --- /dev/null +++ b/negotiation/message/shape/contract-agreement-message-shape.ttl @@ -0,0 +1,69 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractAgreementMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractAgreementMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:agreement ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:class odrl:Agreement ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementMessageShape): An dspace:agreement property must point to exactly one odrl:Agreement class."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:callbackAddress ; + sh:datatype xsd:anyURI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementMessageShape): An dspace:callbackAddress property must point to exactly one xsd:anyURI value."@en ; + ] +. 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 0000000..a3c3fea --- /dev/null +++ b/negotiation/message/shape/contract-agreement-verification-message-shape.ttl @@ -0,0 +1,51 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractAgreementVerificationMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractAgreementVerificationMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementVerificationMessageShape): A dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementVerificationMessageShape): A dspace:consumerPid property must point to exactly one xsd:string value."@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 0000000..60e119c --- /dev/null +++ b/negotiation/message/shape/contract-negotiation-error-shape.ttl @@ -0,0 +1,73 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationErrorShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiationError ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationErrorShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationErrorShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationErrorShape): An dspace:code property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:reason ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationErrorShape): An dspace:reason property must point to rdf:langString values."@en ; + ] ; + 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 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 0000000..43beb19 --- /dev/null +++ b/negotiation/message/shape/contract-negotiation-event-message-shape.ttl @@ -0,0 +1,60 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationEventMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiationEventMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationEventMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationEventMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:eventType ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationEventMessageShape): An dspace:eventType property must point to exactly one xsd:string value."@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 0000000..d4d38e1 --- /dev/null +++ b/negotiation/message/shape/contract-negotiation-message-shape.ttl @@ -0,0 +1,51 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiationMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationMessageShape): An dspace:providerPid property must point to exactly one xsd:string."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationMessageShape): An dspace:consumerPid 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 0000000..b18ef20 --- /dev/null +++ b/negotiation/message/shape/contract-negotiation-shape.ttl @@ -0,0 +1,69 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiation ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationShape): An dspace:providerPid property must point to exactly one xsd:string."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationShape): An dspace:consumerPid property must point to exactly one xsd:string."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:state ; + sh:in ( + dspace:REQUESTED + dspace:OFFERED + dspace:ACCEPTED + dspace:AGREED + dspace:VERIFIED + dspace:FINALIZED + dspace:TERMINATED + ) ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationShape): An dspace:state property must point to exactly one dspace:NegotiationState entity."@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 0000000..2d5cebb --- /dev/null +++ b/negotiation/message/shape/contract-negotiation-termination-message-shape.ttl @@ -0,0 +1,63 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationTerminationMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiationTerminationMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationTerminationMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationTerminationMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationTerminationMessageShape): An dspace:code property must point to an xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:reason ; + ] + +. \ No newline at end of file diff --git a/negotiation/message/shape/contract-offer-message-shape.ttl b/negotiation/message/shape/contract-offer-message-shape.ttl new file mode 100644 index 0000000..36de8ba --- /dev/null +++ b/negotiation/message/shape/contract-offer-message-shape.ttl @@ -0,0 +1,69 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractOfferMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractOfferMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractOfferMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractOfferMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:offer ; + sh:class odrl:Offer ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractOfferMessageShape): A dspace:offer property must point to exactly one odrl:Offer class."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:callbackAddress ; + sh:datatype xsd:anyURI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractOfferMessageShape): A dspace:callbackAddress property must point to exactly one xsd:anyURI value."@en ; + ] ; +. \ 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 0000000..c8f0e43 --- /dev/null +++ b/negotiation/message/shape/contract-request-message-shape.ttl @@ -0,0 +1,69 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractRequestMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractRequestMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:offer ; + sh:class odrl:Offer ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An dspace:offer property must point to exactly one odrl:Offer class."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:callbackAddress ; + sh:datatype xsd:anyURI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An dspace:callbackAddress property must point to exactly one xsd:anyURI value."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/2024-1/catalog/message/example/catalog-error.json b/releases/2024-1/catalog/message/example/catalog-error.json new file mode 100644 index 0000000..60ee338 --- /dev/null +++ b/releases/2024-1/catalog/message/example/catalog-error.json @@ -0,0 +1,11 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:CatalogError", + "dspace:code": "123:A", + "dspace:reason": [ + { + "@value": "Catalog not provisioned for this requester.", + "@language": "en" + } + ] +} diff --git a/releases/2024-1/catalog/message/example/catalog-request-message.json b/releases/2024-1/catalog/message/example/catalog-request-message.json new file mode 100644 index 0000000..69ce5e1 --- /dev/null +++ b/releases/2024-1/catalog/message/example/catalog-request-message.json @@ -0,0 +1,7 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:CatalogRequestMessage", + "dspace:filter": [ + "some-filter" + ] +} diff --git a/releases/2024-1/catalog/message/example/catalog.json b/releases/2024-1/catalog/message/example/catalog.json new file mode 100644 index 0000000..869ad7e --- /dev/null +++ b/releases/2024-1/catalog/message/example/catalog.json @@ -0,0 +1,76 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@id": "urn:uuid:3afeadd8-ed2d-569e-d634-8394a8836d57", + "@type": "dcat:Catalog", + "dct:title": "Data Provider A Catalog", + "dct:description": [ + { + "@value": "A catalog of data items", + "@language": "en" + } + ], + "dspace:participantId": "urn:example:DataProviderA", + "dcat:keyword": [ + "traffic", + "government" + ], + "dcat:service": [ + { + "@id": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77", + "@type": "dcat:DataService", + "dcat:endpointDescription": "dspace:connector", + "dcat:endpointURL": "https://provider-a.com/connector" + } + ], + "dcat:dataset": [ + { + "@id": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "@type": "dcat:Dataset", + "dct:title": "Traffic Data", + "dct:description": [ + { + "@value": "Traffic data sample extract", + "@language": "en" + } + ], + "dcat:keyword": [ + "traffic" + ], + "odrl:hasPolicy": [ + { + "@id": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "@type": "odrl:Offer", + "odrl:assigner": "http://example.com/Provider", + "odrl:permission": [ + { + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "odrl:spatial", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": "http://example.org/EU" + } + ], + "odrl:duty": { + "odrl:action": "cc:Attribution" + } + } + ] + } + ], + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:format": "dspace:s3+push", + "dcat:accessService": [ + { + "@id": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77", + "@type": "dcat:DataService", + "dcat:endpointURL": "https://provider-a.com/connector" + } + ] + } + ] + } + ] +} diff --git a/releases/2024-1/catalog/message/example/dataset-request-message.json b/releases/2024-1/catalog/message/example/dataset-request-message.json new file mode 100644 index 0000000..a1fe953 --- /dev/null +++ b/releases/2024-1/catalog/message/example/dataset-request-message.json @@ -0,0 +1,5 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:DatasetRequestMessage", + "dspace:dataset": "urn:uuid:3afeadd8-ed2d-569e-d634-8394a8836d57" +} diff --git a/releases/2024-1/catalog/message/example/dataset.json b/releases/2024-1/catalog/message/example/dataset.json new file mode 100644 index 0000000..2ccf961 --- /dev/null +++ b/releases/2024-1/catalog/message/example/dataset.json @@ -0,0 +1,46 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@id": "urn:uuid:3afeadd8-ed2d-569e-d634-8394a8836d57", + "@type": "dcat:Dataset", + "dct:title": "Traffic Data", + "dct:description": [ + { + "@value": "Traffic data sample extract", + "@language": "en" + } + ], + "dcat:keyword": [ + "traffic" + ], + "odrl:hasPolicy": [ { + "@type": "odrl:Offer", + "@id": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:assigner": "urn:tsdshhs636378", + "odrl:permission": [ + { + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "odrl:spatial", + "odrl:rightOperand": "_:EU", + "odrl:operator": "odrl:eq" + } + ] + } + ] + } ], + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "dspace:s3+push" + }, + "dcat:accessService": [ + { + "@id": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77", + "dcat:endpointURL": "https://provider-a.com/connector" + } + ] + } + ] +} diff --git a/releases/2024-1/catalog/message/schema/catalog-error-schema.json b/releases/2024-1/catalog/message/schema/catalog-error-schema.json new file mode 100644 index 0000000..b47409b --- /dev/null +++ b/releases/2024-1/catalog/message/schema/catalog-error-schema.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CatalogErrorSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CatalogError" + } + ], + "$id": "https://w3id.org/dspace/2024/1/catalog/catalog-error-schema.json", + "definitions": { + "CatalogError": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:CatalogError" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array" + } + }, + "required": [ "@context", "@type" ] + } + } +} diff --git a/releases/2024-1/catalog/message/schema/catalog-request-message-schema.json b/releases/2024-1/catalog/message/schema/catalog-request-message-schema.json new file mode 100644 index 0000000..cb17b9a --- /dev/null +++ b/releases/2024-1/catalog/message/schema/catalog-request-message-schema.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CatalogRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CatalogRequestMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/catalog/catalog-request-message-schema.json", + "definitions": { + "CatalogRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:CatalogRequestMessage" + }, + "dspace:filter": { + "type": "array", + "items": { + } + } + }, + "required": [ "@context", "@type"] + } + } +} diff --git a/releases/2024-1/catalog/message/schema/catalog-schema.json b/releases/2024-1/catalog/message/schema/catalog-schema.json new file mode 100644 index 0000000..c262573 --- /dev/null +++ b/releases/2024-1/catalog/message/schema/catalog-schema.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CatalogSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Catalog" + } + ], + "$id": "https://w3id.org/dspace/2024/1/catalog/catalog-schema.json", + "definitions": { + "Catalog": { + "type": "object", + "allOf": [ + { + "$ref": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json#/definitions/AbstractDataset" + }, + { + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dcat:Catalog" + }, + "dcat:dataset": { + "type": "array", + "items": { + "$ref": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json#/definitions/Dataset" + }, + "minItems": 1 + }, + "dcat:service": { + "type": "array", + "items": { + "$ref": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json#/definitions/DataService" + }, + "minItems": 1 + }, + "dspace:participantId": { + "type": "string" + }, + "foaf:homepage": { + "type": "string" + } + } + } + ], + "required": [ "@context", "@type" ], + "anyOf" : [ + { + "not" : { "required" : [ "odrl:hasPolicy" ] } + } + ] + } + } +} diff --git a/releases/2024-1/catalog/message/schema/dataset-request-message-schema.json b/releases/2024-1/catalog/message/schema/dataset-request-message-schema.json new file mode 100644 index 0000000..c05c4e9 --- /dev/null +++ b/releases/2024-1/catalog/message/schema/dataset-request-message-schema.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "DatasetRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/DatasetRequestMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/catalog/dataset-request-message-schema.json", + "definitions": { + "DatasetRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:DatasetRequestMessage" + }, + "dspace:dataset": { + "type": "string" + } + }, + "required": [ "@context", "@type", "dspace:dataset" ] + } + } +} diff --git a/releases/2024-1/catalog/message/schema/dataset-schema.json b/releases/2024-1/catalog/message/schema/dataset-schema.json new file mode 100644 index 0000000..e62634c --- /dev/null +++ b/releases/2024-1/catalog/message/schema/dataset-schema.json @@ -0,0 +1,175 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "DatasetSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Dataset" + } + ], + "$id": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json", + "definitions": { + "AbstractDataset": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + }, + { + "properties": { + "odrl:hasPolicy": { + "type": "array", + "items": { + "$ref": "https://w3id.org/dspace/2024/1/negotiation/contract-schema.json#/definitions/Offer" + }, + "minItems": 1 + }, + "dcat:distribution": { + "type": "array", + "items": { + "$ref": "#/definitions/Distribution" + }, + "minItems": 1 + } + } + } + ] + }, + "Dataset": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractDataset" + } + ], + "required": [ + "odrl:hasPolicy" + ] + }, + "Resource": { + "type": "object", + "properties": { + "dcat:keyword": { + "type": "array", + "items": { + "type": "string" + } + }, + "dcat:theme": { + "type": "array", + "items": { + "$ref": "#/definitions/Reference" + }, + "minItems": 1 + }, + "dct:conformsTo": { + "type": "string" + }, + "dct:creator": { + "type": "string" + }, + "dct:description": { + "type": "array", + "items": { + "$ref": "#/definitions/Multilanguage" + } + }, + "dct:identifier": { + "type": "string" + }, + "dct:issued": { + "type": "string" + }, + "dct:modified": { + "type": "string" + }, + "dct:title": { + "type": "string" + } + } + }, + "Distribution": { + "type": "object", + "properties": { + "dct:title": { + "type": "string" + }, + "dct:description": { + "type": "array", + "items": { + "$ref": "#/definitions/Multilanguage" + } + }, + "dct:issued": { + "type": "string" + }, + "dct:modified": { + "type": "string" + }, + "odrl:hasPolicy": { + "type": "array", + "items": { + "$ref": "https://w3id.org/dspace/2024/1/negotiation/contract-schema.json#/definitions/Offer" + }, + "minItems": 1 + }, + "dcat:accessService": { + "type": "array", + "items": { + "$ref": "#/definitions/DataService" + }, + "minItems": 1 + } + }, + "required": [ + "dcat:accessService" + ] + }, + "DataService": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + }, + { + "properties": { + "dcat:endpointDescription": { + "type": "string" + }, + "dcat:endpointURL": { + "type": "string" + }, + "dcat:servesDataset": { + "type": "array", + "items": { + "$ref": "#/definitions/Dataset" + }, + "minItems": 1 + } + } + } + ] + }, + "Reference": { + "type": "object", + "properties": { + "@id": { + "type": "string" + } + }, + "required": [ "@id" ] + }, + "Multilanguage": { + "type": "object", + "properties": { + "@value": { + "type": "string" + }, + "@language": { + "type": "string" + } + }, + "required": [ "@value", "@language" ] + } + } +} diff --git a/releases/2024-1/catalog/message/shape/catalog-error-shape.ttl b/releases/2024-1/catalog/message/shape/catalog-error-shape.ttl new file mode 100644 index 0000000..9a28e39 --- /dev/null +++ b/releases/2024-1/catalog/message/shape/catalog-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 dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:CatalogErrorShape + a sh:NodeShape ; + sh:targetClass dspace:CatalogError ; + sh:property [ + sh:path dspace:code ; + sh:datatype xsd:string ; + ] ; + sh:property [ + sh:path dspace:reason ; + sh:datatype rdf:langString ; + ] ; + +. diff --git a/releases/2024-1/catalog/message/shape/catalog-request-message-shape.ttl b/releases/2024-1/catalog/message/shape/catalog-request-message-shape.ttl new file mode 100644 index 0000000..30030f2 --- /dev/null +++ b/releases/2024-1/catalog/message/shape/catalog-request-message-shape.ttl @@ -0,0 +1,37 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:CatalogRequestMessageShape + a sh:NodeShape ; + sh:targetClass dspace:CatalogRequestMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:filter ; + ] ; + +. \ No newline at end of file diff --git a/releases/2024-1/catalog/message/shape/dataset-request-message-shape.ttl b/releases/2024-1/catalog/message/shape/dataset-request-message-shape.ttl new file mode 100644 index 0000000..c1542a6 --- /dev/null +++ b/releases/2024-1/catalog/message/shape/dataset-request-message-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 dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:DatasetRequestMessageShape + a sh:NodeShape ; + sh:targetClass dspace:DatasetRequestMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:dataset ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (DatasetRequestMessage): There must be exactly one dspace:dataset property."@en ; + ] ; +. diff --git a/releases/2024-1/catalog/message/shape/dataset-shape.ttl b/releases/2024-1/catalog/message/shape/dataset-shape.ttl new file mode 100644 index 0000000..2bb0c50 --- /dev/null +++ b/releases/2024-1/catalog/message/shape/dataset-shape.ttl @@ -0,0 +1,78 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . +@prefix prov: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:DatasetShape + a sh:NodeShape ; + sh:targetClass dcat:Dataset ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:distribution ; + sh:class dcat:Distribution ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dcat:distribution property must point to a dcat:Distribution."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:keyword ; + sh:datatype xsd:string ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dcat:keyword property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:description ; + sh:datatype rdf:langString ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dct:description property must point to a rdf:langString field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:title ; + sh:datatype rdf:langString ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dct:title property must point to a language tagged field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:hasPolicy ; + sh:class odrl:Offer ; + sh:severity sh:Violation ; + sh:minCount 0; + sh:message " (DatasetShape): An odrl:hasPolicy property must point to an odrl:Policy."@en ; + ] ; + +. diff --git a/releases/2024-1/catalog/message/shape/dcat-shapes.ttl b/releases/2024-1/catalog/message/shape/dcat-shapes.ttl new file mode 100644 index 0000000..217aa89 --- /dev/null +++ b/releases/2024-1/catalog/message/shape/dcat-shapes.ttl @@ -0,0 +1,267 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . +@prefix foaf: . +@prefix prov: . +@prefix skos: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + + +dspace_shapes:ResourceShape + a sh:NodeShape ; + sh:targetClass dcat:Resource ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:keyword ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dcat:keyword property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:theme ; + sh:class skos:Concept ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dcat:theme property must point to a skos:Concept."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:conformsTo ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:accessconformsToRights property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:creator ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:creator property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:description ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:description property must point to a rdf:langString field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:identifier ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:identifier property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:issued ; + sh:datatype xsd:dateTime ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:issued property must point to a xsd:dateTime field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:modified ; + sh:datatype xsd:dateTime ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:modified property must point to a xsd:dateTime field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:title ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:title property must point to a rdf:langString field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:hasPolicy ; + sh:class odrl:Offer ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): An odrl:hasPolicy property must point to an odrl:Offer."@en ; + ] ; + +. + + +dspace_shapes:DatasetShape + a sh:NodeShape ; + sh:targetClass dcat:Dataset ; + rdfs:subClassOf dspace_shapes:ResourceShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:distribution ; + sh:class dcat:Distribution ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dcat:distribution property must point to a dcat:Distribution."@en ; + ] ; + +. + +dspace_shapes:CatalogShape + a sh:NodeShape ; + sh:targetClass dcat:Catalog ; + rdfs:subClassOf dspace_shapes:DatasetShape ; + + 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 ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:service ; + sh:class dcat:DataService ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dcat:service property must point to a dcat:DataService."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path foaf:homepage ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A foaf:homepage property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:participantId ; + sh:nodeKind sh:IRI ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dspace:participantId property must point to an IRI."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:hasPolicy ; + sh:maxCount 0 ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dspace:Catalog must not have any odrl:hasPolicy property."@en ; + ] ; + +. + + +dspace_shapes:DistributionShape + a sh:NodeShape ; + sh:targetClass dcat:Distribution ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:description ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:description property must point to a rdf:langString field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:issued ; + sh:datatype xsd:dateTime ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:issued property must point to a xsd:dateTime field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:modified ; + sh:datatype xsd:dateTime ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:modified property must point to a xsd:dateTime field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:title ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:title property must point to a rdf:langString field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:accessService ; + sh:class dcat:DataService ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dcat:accessService property must point to a dcat:DataService."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:hasPolicy ; + sh:class odrl:Offer ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): An odrl:hasPolicy property must point to an odrl:Offer."@en ; + ] ; +. + +dspace_shapes:DataServiceShape + a sh:NodeShape ; + sh:targetClass dcat:DataService ; + rdfs:subClassOf dspace_shapes:ResourceShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:endpointDescription ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:message " (DataServiceShape): A dcat:endpointDescription property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:endpointURL ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:message " (DataServiceShape): A dcat:endpointURL property must point to a xsd:anyURI field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:servesDataset ; + sh:class dcat:Dataset ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DataServiceShape): A dcat:servesDataset property must point to a dcat:Dataset."@en ; + ] ; + +. diff --git a/releases/2024-1/common/schema/context.json b/releases/2024-1/common/schema/context.json new file mode 100644 index 0000000..f26eaff --- /dev/null +++ b/releases/2024-1/common/schema/context.json @@ -0,0 +1,62 @@ +{ + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "cred": "https://www.w3.org/2018/credentials#", + "sec": "https://w3id.org/security#", + "foaf": "http://xmlns.com/foaf/0.1/", + "cc": "http://creativecommons.org/ns#", + "dct": "http://purl.org/dc/terms/", + "dcat": "http://www.w3.org/ns/dcat#", + "dspace": "https://w3id.org/dspace/2024/1/", + + "dct:title": { "@language": "en" }, + "dct:creator": { "@type": "@id" }, + "dct:description": { "@container": "@set" }, + "dct:issued": { "@type": "xsd:dateTime" }, + "dct:modified": { "@type": "xsd:dateTime" }, + + "dcat:byteSize": { "@type": "xsd:decimal" }, + "dcat:distribution": { "@container": "@set" }, + "dcat:theme": { "@type": "@id" }, + "dcat:conformsTo": { "@type": "@id" }, + "dcat:dataset": { "@container": "@set" }, + "dcat:endpointURL": { "@type": "xsd:anyURI" }, + "dcat:endpointDescription": { "@type": "xsd:anyURI" }, + "dcat:keyword": { "@container": "@set" }, + "dcat:servesDataset": {"@container": "@set" }, + "dcat:service": { "@container": "@set" }, + "dcat:accessService": { "@container": "@set" }, + + "dspace:agreementId": { "@type": "@id" }, + "dspace:dataset": { "@type": "@id" }, + "dspace:transportType": { "@type": "@id" }, + "dspace:state": { "@type": "@id" }, + "dspace:providerId": { "@type": "@id" }, + "dspace:consumerId": { "@type": "@id" }, + "dspace:participantId": { "@type": "@id" }, + "dspace:reason": { "@container": "@set" }, + "dspace:catalog": { "@container": "@set" }, + "dspace:filter": { "@container": "@set" }, + "dspace:timestamp": { "@type": "xsd:dateTime" }, + "dspace:callbackAddress": { "@type": "xsd:anyURI" }, + "dspace:endpointProperties": { "@container": "@set" }, + + "foaf:homepage": { "@type": "xsd:anyURI" }, + + "odrl:hasPolicy": { "@container": "@set" }, + "odrl:permission": { "@container": "@set" }, + "odrl:prohibition": { "@container": "@set" }, + "odrl:obligation": { "@container": "@set" }, + "odrl:duty": { "@container": "@set" }, + "odrl:constraint": { "@container": "@set" }, + "odrl:action": { "@type": "@id" }, + "odrl:target": { "@type": "@id" }, + "odrl:leftOperand": { "@type": "@id" }, + "odrl:operator": { "@type": "@id" }, + "odrl:rightOperandReference": { "@type": "@id" }, + "odrl:profile": { "@container": "@set" }, + "odrl:assigner": { "@type": "@id" }, + "odrl:assignee": { "@type": "@id" } + } +} diff --git a/releases/2024-1/common/schema/definitions.schema.json b/releases/2024-1/common/schema/definitions.schema.json new file mode 100644 index 0000000..c914f74 --- /dev/null +++ b/releases/2024-1/common/schema/definitions.schema.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "definitions": { + + } +} diff --git a/releases/2024-1/common/schema/version-schema.json b/releases/2024-1/common/schema/version-schema.json new file mode 100644 index 0000000..528a764 --- /dev/null +++ b/releases/2024-1/common/schema/version-schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "VersionSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Version" + } + ], + "$id": "https://w3id.org/dspace/2024/1/common/version-schema.json", + "definitions": { + "Version": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "protocolVersions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "path": { + "type": "string" + } + }, + "required": ["version", "path"] + }, + "minItems": 1 + } + }, + "required": ["@context", "protocolVersions"] + } + } +} \ No newline at end of file diff --git a/releases/2024-1/common/shape/odrl-shapes.ttl b/releases/2024-1/common/shape/odrl-shapes.ttl new file mode 100644 index 0000000..4cc342e --- /dev/null +++ b/releases/2024-1/common/shape/odrl-shapes.ttl @@ -0,0 +1,79 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_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 ; + ] ; +. + + +dspace_shapes:AgreementShape + a sh:NodeShape ; + sh:targetClass odrl:Agreement ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:target ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:timestamp ; + sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (AgreementShape): An dspace:timestamp property must point to exactly one xsd:dateTime value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path odrl:assigner ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (AgreementShape): An odrl:assigner property must point to exactly one Provider Node."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path odrl:assignee ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (AgreementShape): An odrl:assignee property must point to exactly one Consumer Node."@en ; + ] ; +. diff --git a/releases/2024-1/common/shape/version-shape.ttl b/releases/2024-1/common/shape/version-shape.ttl new file mode 100644 index 0000000..e69de29 diff --git a/releases/2024-1/negotiation/message/example/contract-agreement-message.json b/releases/2024-1/negotiation/message/example/contract-agreement-message.json new file mode 100644 index 0000000..a0016bc --- /dev/null +++ b/releases/2024-1/negotiation/message/example/contract-agreement-message.json @@ -0,0 +1,23 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractAgreementMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:agreement": { + "@id": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44", + "@type": "odrl:Agreement", + "odrl:target": "urn:uuid:3dd1add4-4d2d-569e-d634-8394a8836d23", + "dspace:timestamp": "2023-01-01T01:00:00Z", + "odrl:assigner": "urn:tsdshhs636378", + "odrl:assignee": "urn:jashd766", + "odrl:permission": [{ + "odrl:action": "odrl:use" , + "odrl:constraint": [{ + "odrl:leftOperand": "odrl:dateTime", + "odrl:operand": "odrl:lteq", + "odrl:rightOperand": { "@value": "2023-12-31T06:00Z", "@type": "xsd:dateTime" } + }] + }] + }, + "dspace:callbackAddress": "https://example.com/callback" +} diff --git a/releases/2024-1/negotiation/message/example/contract-agreement-verification-message.json b/releases/2024-1/negotiation/message/example/contract-agreement-verification-message.json new file mode 100644 index 0000000..419388f --- /dev/null +++ b/releases/2024-1/negotiation/message/example/contract-agreement-verification-message.json @@ -0,0 +1,6 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractAgreementVerificationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833" +} diff --git a/releases/2024-1/negotiation/message/example/contract-negotiation-error.json b/releases/2024-1/negotiation/message/example/contract-negotiation-error.json new file mode 100644 index 0000000..6ea7f33 --- /dev/null +++ b/releases/2024-1/negotiation/message/example/contract-negotiation-error.json @@ -0,0 +1,23 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiationError", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + { + "@value": "Catalog not provisioned for this requester.", + "@language": "en" + } + ], + "dct:description": [ + { + "@language": "en", + "@value": "The parsing of the input parameters failed." + }, + { + "@language": "de", + "@value": "Das Lesen der Eingabeparameter schlug fehl." + } + ] +} diff --git a/releases/2024-1/negotiation/message/example/contract-negotiation-event-message.json b/releases/2024-1/negotiation/message/example/contract-negotiation-event-message.json new file mode 100644 index 0000000..7f1fde8 --- /dev/null +++ b/releases/2024-1/negotiation/message/example/contract-negotiation-event-message.json @@ -0,0 +1,7 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiationEventMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:eventType": "dspace:ACCEPTED" +} diff --git a/releases/2024-1/negotiation/message/example/contract-negotiation-termination-message.json b/releases/2024-1/negotiation/message/example/contract-negotiation-termination-message.json new file mode 100644 index 0000000..95cbcd9 --- /dev/null +++ b/releases/2024-1/negotiation/message/example/contract-negotiation-termination-message.json @@ -0,0 +1,13 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiationTerminationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + { + "@value": "License model does not fit.", + "@language": "en" + } + ] +} diff --git a/releases/2024-1/negotiation/message/example/contract-negotiation.json b/releases/2024-1/negotiation/message/example/contract-negotiation.json new file mode 100644 index 0000000..becf0c5 --- /dev/null +++ b/releases/2024-1/negotiation/message/example/contract-negotiation.json @@ -0,0 +1,7 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractNegotiation", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:state": "dspace:REQUESTED" + } diff --git a/releases/2024-1/negotiation/message/example/contract-offer-message.json b/releases/2024-1/negotiation/message/example/contract-offer-message.json new file mode 100644 index 0000000..06fc69b --- /dev/null +++ b/releases/2024-1/negotiation/message/example/contract-offer-message.json @@ -0,0 +1,22 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractOfferMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "urn:uuid:6bcea82e-c509-443d-ba8c-8eef25984c07", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:assigner": "urn:tsdshhs636378", + "odrl:assignee": "urn:jashd766", + "odrl:permission": [{ + "odrl:action": "odrl:use" , + "odrl:constraint": [{ + "odrl:leftOperand": "odrl:dateTime", + "odrl:operand": "odrl:lteq", + "odrl:rightOperand": { "@value": "2023-12-31T06:00Z", "@type": "xsd:dateTime" } + }] + }] + }, + "dspace:callbackAddress": "https://example.com/callback" +} diff --git a/releases/2024-1/negotiation/message/example/contract-offer-message_initial.json b/releases/2024-1/negotiation/message/example/contract-offer-message_initial.json new file mode 100644 index 0000000..6e6b5a4 --- /dev/null +++ b/releases/2024-1/negotiation/message/example/contract-offer-message_initial.json @@ -0,0 +1,15 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractOfferMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "urn:uuid:d526561f-528e-4d5a-ae12-9a9dd9b7a518", + "odrl:assigner": "urn:tsdshhs636378", + "target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:permission": [{ + "odrl:action": "odrl:use" + }] + }, + "dspace:callbackAddress": "https://example.com/callback" +} diff --git a/releases/2024-1/negotiation/message/example/contract-request-message.json b/releases/2024-1/negotiation/message/example/contract-request-message.json new file mode 100644 index 0000000..32f7211 --- /dev/null +++ b/releases/2024-1/negotiation/message/example/contract-request-message.json @@ -0,0 +1,22 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractRequestMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "urn:uuid:d526561f-528e-4d5a-ae12-9a9dd9b7a815", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:assigner": "urn:tsdshhs636378", + "odrl:assignee": "urn:jashd766", + "odrl:permission": [{ + "odrl:action": "odrl:use" , + "odrl:constraint": [{ + "odrl:leftOperand": "odrl:dateTime", + "odrl:operand": "odrl:lteq", + "odrl:rightOperand": { "@value": "2023-12-31T06:00Z", "@type": "xsd:dateTime" } + }] + }] + }, + "dspace:callbackAddress": "https://example.com/callback" +} diff --git a/releases/2024-1/negotiation/message/example/contract-request-message_initial.json b/releases/2024-1/negotiation/message/example/contract-request-message_initial.json new file mode 100644 index 0000000..aafe340 --- /dev/null +++ b/releases/2024-1/negotiation/message/example/contract-request-message_initial.json @@ -0,0 +1,15 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractRequestMessage", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a89", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:assigner": "urn:tsdshhs636378", + "odrl:permission": [{ + "odrl:action": "odrl:use" + }] + }, + "dspace:callbackAddress": "https://example.com/callback" +} diff --git a/releases/2024-1/negotiation/message/example/contract.agreement.message.http.transfer.json b/releases/2024-1/negotiation/message/example/contract.agreement.message.http.transfer.json new file mode 100644 index 0000000..90006b4 --- /dev/null +++ b/releases/2024-1/negotiation/message/example/contract.agreement.message.http.transfer.json @@ -0,0 +1,44 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:ContractAgreementMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:agreement": { + "@id": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44", + "@type": "odrl:Agreement", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:assignee": "...", + "odrl:assigner": "...", + "odrl:permission": [ + { + "@id": "some-permission-id", + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:equals", + "oderl:rightOperand": { + "@id": "dspace:HTTP_REST" + } + } + ] + } + ], + "odrl:duty": [ + { + "@id": "some-permission-id", + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:equals", + "oderl:rightOperand": { + "@id": "dspace:HTTP_REST" + } + } + ] + } + ] + }, + "dspace:callbackAddress": "https://example.com/callback" +} diff --git a/releases/2024-1/negotiation/message/schema/contract-agreement-message-schema.json b/releases/2024-1/negotiation/message/schema/contract-agreement-message-schema.json new file mode 100644 index 0000000..a5a2369 --- /dev/null +++ b/releases/2024-1/negotiation/message/schema/contract-agreement-message-schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractAgreementMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractAgreementMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-agreement-message-schema.json", + "definitions": { + "ContractAgreementMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractAgreementMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:agreement": { + "$ref": "https://w3id.org/dspace/2024/1/negotiation/contract-schema.json#/definitions/Agreement" + }, + "dspace:callbackAddress": { + "type" : "string" + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:agreement", "dspace:callbackAddress"] + } + } +} diff --git a/releases/2024-1/negotiation/message/schema/contract-agreement-verification-message-schema.json b/releases/2024-1/negotiation/message/schema/contract-agreement-verification-message-schema.json new file mode 100644 index 0000000..dbf27cd --- /dev/null +++ b/releases/2024-1/negotiation/message/schema/contract-agreement-verification-message-schema.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractAgreementVerificationMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractAgreementVerificationMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-agreement-verification-message-schema.json", + "definitions": { + "ContractAgreementVerificationMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractAgreementVerificationMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/releases/2024-1/negotiation/message/schema/contract-negotiation-error-schema.json b/releases/2024-1/negotiation/message/schema/contract-negotiation-error-schema.json new file mode 100644 index 0000000..34d115a --- /dev/null +++ b/releases/2024-1/negotiation/message/schema/contract-negotiation-error-schema.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationErrorSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiationError" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-negotiation-error-schema.json", + "definitions": { + "ContractNegotiationError": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractNegotiationError" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "minItems": 1, + "items": {} + }, + "dct:description": { + "type": "array", + "items": { + "@language": { + "type": "string" + }, + "@value": { + "type": "string" + } + }, + "required": [ "@language", "@value"] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid"] + } + } +} \ No newline at end of file diff --git a/releases/2024-1/negotiation/message/schema/contract-negotiation-event-message-schema.json b/releases/2024-1/negotiation/message/schema/contract-negotiation-event-message-schema.json new file mode 100644 index 0000000..56ec3ab --- /dev/null +++ b/releases/2024-1/negotiation/message/schema/contract-negotiation-event-message-schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationEventMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiationEventMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-negotiation-event-message-schema.json", + "definitions": { + "ContractNegotiationEventMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractNegotiationEventMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:eventType": { + "type": "string", + "enum": [ + "dspace:ACCEPTED", + "dspace:FINALIZED" + ] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:eventType" ] + } + } +} \ No newline at end of file diff --git a/releases/2024-1/negotiation/message/schema/contract-negotiation-schema.json b/releases/2024-1/negotiation/message/schema/contract-negotiation-schema.json new file mode 100644 index 0000000..47f4c63 --- /dev/null +++ b/releases/2024-1/negotiation/message/schema/contract-negotiation-schema.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiation" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-negotiation-schema.json", + "definitions": { + "ContractNegotiation": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractNegotiation" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:state": { + "type": "string", + "enum": [ + "dspace:REQUESTED", + "dspace:OFFERED", + "dspace:ACCEPTED", + "dspace:AGREED", + "dspace:VERIFIED", + "dspace:FINALIZED", + "dspace:TERMINATED" + ] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:state" ] + } + } +} \ No newline at end of file diff --git a/releases/2024-1/negotiation/message/schema/contract-negotiation-termination-message-schema.json b/releases/2024-1/negotiation/message/schema/contract-negotiation-termination-message-schema.json new file mode 100644 index 0000000..816ea27 --- /dev/null +++ b/releases/2024-1/negotiation/message/schema/contract-negotiation-termination-message-schema.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationTerminationMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiationTerminationMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-negotiation-termination-message-schema.json", + "definitions": { + "ContractNegotiationTerminationMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractNegotiationTerminationMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "minItems": 1, + "items": {} + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/releases/2024-1/negotiation/message/schema/contract-offer-message-schema.json b/releases/2024-1/negotiation/message/schema/contract-offer-message-schema.json new file mode 100644 index 0000000..3ea7d45 --- /dev/null +++ b/releases/2024-1/negotiation/message/schema/contract-offer-message-schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractOfferMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractOfferMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-offer-message-schema.json", + "definitions": { + "ContractOfferMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractOfferMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:offer": { + "$ref": "https://w3id.org/dspace/2024/1/negotiation/contract-schema.json#/definitions/MessageOffer" + }, + "dspace:callbackAddress": { + "type" : "string" + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:offer", "dspace:callbackAddress" ] + } + } +} diff --git a/releases/2024-1/negotiation/message/schema/contract-request-message-schema.json b/releases/2024-1/negotiation/message/schema/contract-request-message-schema.json new file mode 100644 index 0000000..3b1b8bb --- /dev/null +++ b/releases/2024-1/negotiation/message/schema/contract-request-message-schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractRequestMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-request-message-schema.json", + "definitions": { + "ContractRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractRequestMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:offer": { + "$ref": "https://w3id.org/dspace/2024/1/negotiation/contract-schema.json#/definitions/MessageOffer" + }, + "dspace:callbackAddress": { + "type" : "string" + } + }, + "required": [ "@context", "@type", "dspace:consumerPid", "dspace:offer", "dspace:callbackAddress" ] + } + } +} diff --git a/releases/2024-1/negotiation/message/schema/contract-schema.json b/releases/2024-1/negotiation/message/schema/contract-schema.json new file mode 100644 index 0000000..7689334 --- /dev/null +++ b/releases/2024-1/negotiation/message/schema/contract-schema.json @@ -0,0 +1,381 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "PolicySchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Policy" + } + ], + "$id": "https://w3id.org/dspace/2024/1/negotiation/contract-schema.json", + "definitions": { + "Policy": { + "oneOf": [ + { + "$ref": "#/definitions/MessageOffer" + }, + { + "$ref": "#/definitions/Offer" + }, + { + "$ref": "#/definitions/Agreement" + } + ] + }, + "PolicyClass": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractPolicyRule" + }, + { + "properties": { + "@id": { + "type": "string" + }, + "odrl:profile": { + "type": "array", + "items": { + "$ref": "#/definitions/Reference" + } + }, + "odrl:permission": { + "type": "array", + "items": { + "$ref": "#/definitions/Permission" + }, + "minItems": 1 + }, + "odrl:obligation": { + "type": "array", + "items": { + "$ref": "#/definitions/Duty" + }, + "minItems": 1 + } + }, + "required": [ + "@id" + ] + } + ] + }, + "AbstractPolicyRule": { + "properties": { + "odrl:assigner": { + "type": "string" + }, + "odrl:assignee": { + "type": "string" + } + } + }, + "MessageOffer": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/PolicyClass" + }, + { + "properties": { + "@type": { + "type": "string", + "const": "odrl:Offer" + } + } + }, + { + "anyOf": [ + { + "required": [ + "odrl:permission" + ] + }, + { + "required": [ + "odrl:prohibition" + ] + } + ] + } + ], + "required": [ "@type", "odrl:assigner" ] + }, + "Offer": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/MessageOffer" + } + ], + "not": { "required": [ "odrl:target" ] } + }, + "Agreement": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/PolicyClass" + }, + { + "properties": { + "@type": { + "type": "string", + "const": "odrl:Agreement" + }, + "@id": { + "type": "string" + }, + "odrl:target": { + "type": "string" + }, + "dspace:timestamp": { + "type": "string", + "pattern": "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?" + } + } + }, + { + "anyOf": [ + { + "required": [ + "odrl:permission" + ] + }, + { + "required": [ + "odrl:prohibition" + ] + } + ] + } + ], + "required": [ + "@type", + "@id", + "odrl:target", + "odrl:assignee", + "odrl:assigner" + ] + }, + "RuleClass": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractPolicyRule" + }, + { + "properties": { + "odrl:action": { + "$ref": "#/definitions/Action" + }, + "odrl:constraint": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraint" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "odrl:action" + ] + }, + "Permission": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractPolicyRule" + }, + { + "properties": { + "odrl:action": { + "$ref": "#/definitions/Action" + }, + "odrl:constraint": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraint" + }, + "minItems": 1 + }, + "odrl:duty": { + "$ref": "#/definitions/Duty" + } + }, + "required": [ + "odrl:action" + ] + } + ] + }, + "Duty": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractPolicyRule" + }, + { + "properties": { + "@id": { + "type": "string" + }, + "odrl:action": { + "$ref": "#/definitions/Action" + }, + "odrl:constraint": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraint" + } + } + }, + "required": [ + "odrl:action" + ] + } + ] + }, + "Action": { + "type": "string", + "enum": [ + "odrl:delete", + "odrl:execute", + "cc:SourceCode", + "odrl:anonymize", + "odrl:extract", + "odrl:read", + "odrl:index", + "odrl:compensate", + "odrl:sell", + "odrl:derive", + "odrl:ensureExclusivity", + "odrl:annotate", + "cc:Reproduction", + "odrl:translate", + "odrl:include", + "cc:DerivativeWorks", + "cc:Distribution", + "odrl:textToSpeech", + "odrl:inform", + "odrl:grantUse", + "odrl:archive", + "odrl:modify", + "odrl:aggregate", + "odrl:attribute", + "odrl:nextPolicy", + "odrl:digitize", + "cc:Attribution", + "odrl:install", + "odrl:concurrentUse", + "odrl:distribute", + "odrl:synchronize", + "odrl:move", + "odrl:obtainConsent", + "odrl:print", + "cc:Notice", + "odrl:give", + "odrl:uninstall", + "cc:Sharing", + "odrl:reviewPolicy", + "odrl:watermark", + "odrl:play", + "odrl:reproduce", + "odrl:transform", + "odrl:display", + "odrl:stream", + "cc:ShareAlike", + "odrl:acceptTracking", + "cc:CommericalUse", + "odrl:present", + "odrl:use" + ] + }, + "Constraint": { + "type": "object", + "properties": { + "odrl:rightOperand": { + "$ref": "#/definitions/RightOperand" + }, + "odrl:rightOperandReference": { + "$ref": "#/definitions/Reference" + }, + "odrl:leftOperand": { + "$ref": "#/definitions/LeftOperand" + }, + "odrl:operator": { + "$ref": "#/definitions/Operator" + } + } + }, + "Operator": { + "type": "string", + "enum": [ + "odrl:eq", + "odrl:gt", + "odrl:gteq", + "odrl:hasPart", + "odrl:isA", + "odrl:isAllOf", + "odrl:isAnyOf", + "odrl:isNoneOf", + "odrl:isPartOf", + "odrl:lt", + "odrl:term-lteq", + "odrl:neq" + ] + }, + "RightOperand": {}, + "LeftOperand": { + "type": "string", + "enum": [ + "odrl:absolutePosition", + "odrl:absoluteSize", + "odrl:absoluteSpatialPosition", + "odrl:absoluteTemporalPosition", + "odrl:count", + "odrl:dateTime", + "odrl:delayPeriod", + "odrl:deliveryChannel", + "odrl:device", + "odrl:elapsedTime", + "odrl:event", + "odrl:fileFormat", + "odrl:industry", + "odrl:language", + "odrl:media", + "odrl:meteredTime", + "odrl:payAmount", + "odrl:percentage", + "odrl:product", + "odrl:purpose", + "odrl:recipient", + "odrl:relativePosition", + "odrl:relativeSize", + "odrl:relativeSpatialPosition", + "odrl:relativeTemporalPosition", + "odrl:resolution", + "odrl:spatial", + "odrl:spatialCoordinates", + "odrl:system", + "odrl:systemDevice", + "odrl:timeInterval", + "odrl:unitOfCount", + "odrl:version", + "odrl:virtualLocation" + ] + }, + "Reference": { + "type": "object", + "properties": { + "@id": { + "type": "string" + } + }, + "required": [ + "@id" + ] + } + } +} diff --git a/releases/2024-1/negotiation/message/shape/contract-agreement-message-shape.ttl b/releases/2024-1/negotiation/message/shape/contract-agreement-message-shape.ttl new file mode 100644 index 0000000..d5624b8 --- /dev/null +++ b/releases/2024-1/negotiation/message/shape/contract-agreement-message-shape.ttl @@ -0,0 +1,69 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractAgreementMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractAgreementMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:agreement ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:class odrl:Agreement ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementMessageShape): An dspace:agreement property must point to exactly one odrl:Agreement class."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:callbackAddress ; + sh:datatype xsd:anyURI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementMessageShape): An dspace:callbackAddress property must point to exactly one xsd:anyURI value."@en ; + ] +. diff --git a/releases/2024-1/negotiation/message/shape/contract-agreement-verification-message-shape.ttl b/releases/2024-1/negotiation/message/shape/contract-agreement-verification-message-shape.ttl new file mode 100644 index 0000000..a3c3fea --- /dev/null +++ b/releases/2024-1/negotiation/message/shape/contract-agreement-verification-message-shape.ttl @@ -0,0 +1,51 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractAgreementVerificationMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractAgreementVerificationMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementVerificationMessageShape): A dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementVerificationMessageShape): A dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/2024-1/negotiation/message/shape/contract-negotiation-error-shape.ttl b/releases/2024-1/negotiation/message/shape/contract-negotiation-error-shape.ttl new file mode 100644 index 0000000..60e119c --- /dev/null +++ b/releases/2024-1/negotiation/message/shape/contract-negotiation-error-shape.ttl @@ -0,0 +1,73 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationErrorShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiationError ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationErrorShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationErrorShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationErrorShape): An dspace:code property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:reason ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationErrorShape): An dspace:reason property must point to rdf:langString values."@en ; + ] ; + 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 zero or more rdf:langString values."@en ; + ] +. \ No newline at end of file diff --git a/releases/2024-1/negotiation/message/shape/contract-negotiation-event-message-shape.ttl b/releases/2024-1/negotiation/message/shape/contract-negotiation-event-message-shape.ttl new file mode 100644 index 0000000..43beb19 --- /dev/null +++ b/releases/2024-1/negotiation/message/shape/contract-negotiation-event-message-shape.ttl @@ -0,0 +1,60 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationEventMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiationEventMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationEventMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationEventMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:eventType ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationEventMessageShape): An dspace:eventType property must point to exactly one xsd:string value."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/2024-1/negotiation/message/shape/contract-negotiation-message-shape.ttl b/releases/2024-1/negotiation/message/shape/contract-negotiation-message-shape.ttl new file mode 100644 index 0000000..d4d38e1 --- /dev/null +++ b/releases/2024-1/negotiation/message/shape/contract-negotiation-message-shape.ttl @@ -0,0 +1,51 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiationMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationMessageShape): An dspace:providerPid property must point to exactly one xsd:string."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationMessageShape): An dspace:consumerPid property must point to exactly one xsd:string."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/2024-1/negotiation/message/shape/contract-negotiation-shape.ttl b/releases/2024-1/negotiation/message/shape/contract-negotiation-shape.ttl new file mode 100644 index 0000000..b18ef20 --- /dev/null +++ b/releases/2024-1/negotiation/message/shape/contract-negotiation-shape.ttl @@ -0,0 +1,69 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiation ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationShape): An dspace:providerPid property must point to exactly one xsd:string."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationShape): An dspace:consumerPid property must point to exactly one xsd:string."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:state ; + sh:in ( + dspace:REQUESTED + dspace:OFFERED + dspace:ACCEPTED + dspace:AGREED + dspace:VERIFIED + dspace:FINALIZED + dspace:TERMINATED + ) ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationShape): An dspace:state property must point to exactly one dspace:NegotiationState entity."@en ; + ] + +. \ No newline at end of file diff --git a/releases/2024-1/negotiation/message/shape/contract-negotiation-termination-message-shape.ttl b/releases/2024-1/negotiation/message/shape/contract-negotiation-termination-message-shape.ttl new file mode 100644 index 0000000..2d5cebb --- /dev/null +++ b/releases/2024-1/negotiation/message/shape/contract-negotiation-termination-message-shape.ttl @@ -0,0 +1,63 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationTerminationMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiationTerminationMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationTerminationMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationTerminationMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationTerminationMessageShape): An dspace:code property must point to an xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:reason ; + ] + +. \ No newline at end of file diff --git a/releases/2024-1/negotiation/message/shape/contract-offer-message-shape.ttl b/releases/2024-1/negotiation/message/shape/contract-offer-message-shape.ttl new file mode 100644 index 0000000..36de8ba --- /dev/null +++ b/releases/2024-1/negotiation/message/shape/contract-offer-message-shape.ttl @@ -0,0 +1,69 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractOfferMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractOfferMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractOfferMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractOfferMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:offer ; + sh:class odrl:Offer ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractOfferMessageShape): A dspace:offer property must point to exactly one odrl:Offer class."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:callbackAddress ; + sh:datatype xsd:anyURI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractOfferMessageShape): A dspace:callbackAddress property must point to exactly one xsd:anyURI value."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/2024-1/negotiation/message/shape/contract-request-message-shape.ttl b/releases/2024-1/negotiation/message/shape/contract-request-message-shape.ttl new file mode 100644 index 0000000..c8f0e43 --- /dev/null +++ b/releases/2024-1/negotiation/message/shape/contract-request-message-shape.ttl @@ -0,0 +1,69 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractRequestMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractRequestMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:offer ; + sh:class odrl:Offer ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An dspace:offer property must point to exactly one odrl:Offer class."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:callbackAddress ; + sh:datatype xsd:anyURI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An dspace:callbackAddress property must point to exactly one xsd:anyURI value."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/2024-1/transfer/message/example/transfer-completion-message.json b/releases/2024-1/transfer/message/example/transfer-completion-message.json new file mode 100644 index 0000000..75fc9be --- /dev/null +++ b/releases/2024-1/transfer/message/example/transfer-completion-message.json @@ -0,0 +1,6 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferCompletionMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833" +} diff --git a/releases/2024-1/transfer/message/example/transfer-error.json b/releases/2024-1/transfer/message/example/transfer-error.json new file mode 100644 index 0000000..083c97c --- /dev/null +++ b/releases/2024-1/transfer/message/example/transfer-error.json @@ -0,0 +1,11 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferError", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + {}, + {} + ] +} diff --git a/releases/2024-1/transfer/message/example/transfer-process.json b/releases/2024-1/transfer/message/example/transfer-process.json new file mode 100644 index 0000000..474ad32 --- /dev/null +++ b/releases/2024-1/transfer/message/example/transfer-process.json @@ -0,0 +1,7 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferProcess", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:state": "dspace:REQUESTED" +} \ No newline at end of file diff --git a/releases/2024-1/transfer/message/example/transfer-request-message.json b/releases/2024-1/transfer/message/example/transfer-request-message.json new file mode 100644 index 0000000..2da79e3 --- /dev/null +++ b/releases/2024-1/transfer/message/example/transfer-request-message.json @@ -0,0 +1,25 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferRequestMessage", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:agreementId": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44", + "dct:format": "example:HTTP_PUSH", + "dspace:dataAddress": { + "@type": "dspace:DataAddress", + "dspace:endpointType": "https://w3id.org/idsa/v4.1/HTTP", + "dspace:endpoint": "http://example.com", + "dspace:endpointProperties": [ + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authorization", + "dspace:value": "TOKEN-ABCDEFG" + }, + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authType", + "dspace:value": "bearer" + } + ] + }, + "dspace:callbackAddress": "https://example.com/callback" +} diff --git a/releases/2024-1/transfer/message/example/transfer-start-message.json b/releases/2024-1/transfer/message/example/transfer-start-message.json new file mode 100644 index 0000000..50a6793 --- /dev/null +++ b/releases/2024-1/transfer/message/example/transfer-start-message.json @@ -0,0 +1,23 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferStartMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:dataAddress": { + "@type": "dspace:DataAddress", + "dspace:endpointType": "https://w3id.org/idsa/v4.1/HTTP", + "dspace:endpoint": "http://example.com", + "dspace:endpointProperties": [ + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authorization", + "dspace:value": "TOKEN-ABCDEFG" + }, + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authType", + "dspace:value": "bearer" + } + ] + } +} diff --git a/releases/2024-1/transfer/message/example/transfer-suspension-message.json b/releases/2024-1/transfer/message/example/transfer-suspension-message.json new file mode 100644 index 0000000..bb2026c --- /dev/null +++ b/releases/2024-1/transfer/message/example/transfer-suspension-message.json @@ -0,0 +1,11 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferSuspensionMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + {}, + {} + ] +} diff --git a/releases/2024-1/transfer/message/example/transfer-termination-message.json b/releases/2024-1/transfer/message/example/transfer-termination-message.json new file mode 100644 index 0000000..9c902be --- /dev/null +++ b/releases/2024-1/transfer/message/example/transfer-termination-message.json @@ -0,0 +1,11 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferTerminationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + {}, + {} + ] +} diff --git a/releases/2024-1/transfer/message/schema/transfer-completion-message-schema.json b/releases/2024-1/transfer/message/schema/transfer-completion-message-schema.json new file mode 100644 index 0000000..d7d00ee --- /dev/null +++ b/releases/2024-1/transfer/message/schema/transfer-completion-message-schema.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferCompletionMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferCompletionMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-completion-message-schema.json", + "definitions": { + "TransferCompletionMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferCompletionMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/releases/2024-1/transfer/message/schema/transfer-error-schema.json b/releases/2024-1/transfer/message/schema/transfer-error-schema.json new file mode 100644 index 0000000..9945896 --- /dev/null +++ b/releases/2024-1/transfer/message/schema/transfer-error-schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferErrorSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferError" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-error-schema.json", + "definitions": { + "TransferError": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferError" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "items": {} + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid"] + } + } +} \ No newline at end of file diff --git a/releases/2024-1/transfer/message/schema/transfer-process-schema.json b/releases/2024-1/transfer/message/schema/transfer-process-schema.json new file mode 100644 index 0000000..3fc6901 --- /dev/null +++ b/releases/2024-1/transfer/message/schema/transfer-process-schema.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferProcessSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferProcess" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-process-schema.json", + "definitions": { + "TransferProcess": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferProcess" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:state": { + "type": "string", + "enum": [ + "dspace:REQUESTED", + "dspace:STARTED", + "dspace:TERMINATED", + "dspace:COMPLETED", + "dspace:SUSPENDED" + ] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:state" ] + } + } +} \ No newline at end of file diff --git a/releases/2024-1/transfer/message/schema/transfer-request-message-schema.json b/releases/2024-1/transfer/message/schema/transfer-request-message-schema.json new file mode 100644 index 0000000..a357991 --- /dev/null +++ b/releases/2024-1/transfer/message/schema/transfer-request-message-schema.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferRequestMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-request-message-schema.json", + "definitions": { + "TransferRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferRequestMessage" + }, + "dspace:agreementId": { + "type": "string" + }, + "dct:format": { + "type": "string" + }, + "dspace:dataAddress": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "dspace:DataAddress" + }, + "dspace:endpointType": { + "type": "string" + }, + "dspace:endpoint": { + "type": "string" + }, + "dspace:endpointProperties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "dspace:EndpointProperty" + }, + "dspace:name": { + "type": "string" + }, + "dspace:value": { + "type": "string" + } + }, + "required": ["@type", "dspace:name", "dspace:value"] + } + } + }, + "required": ["@type", "dspace:endpointType", "dspace:endpoint"] + }, + "dspace:callbackAddress": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + } + }, + "required": [ "@context", "@type", "dspace:agreementId", "dct:format", "dspace:callbackAddress", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/releases/2024-1/transfer/message/schema/transfer-start-message-schema.json b/releases/2024-1/transfer/message/schema/transfer-start-message-schema.json new file mode 100644 index 0000000..3db706c --- /dev/null +++ b/releases/2024-1/transfer/message/schema/transfer-start-message-schema.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferStartMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferStartMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-start-message-schema.json", + "definitions": { + "TransferStartMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferStartMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:dataAddress": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "dspace:DataAddress" + }, + "dspace:endpointType": { + "type": "string" + }, + "dspace:endpoint": { + "type": "string" + }, + "dspace:endpointProperties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "dspace:EndpointProperty" + }, + "dspace:name": { + "type": "string" + }, + "dspace:value": { + "type": "string" + } + }, + "required": ["@type", "dspace:name", "dspace:value"] + } + } + }, + "required": ["@type", "dspace:endpointType", "dspace:endpoint"] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/releases/2024-1/transfer/message/schema/transfer-suspension-message-schema.json b/releases/2024-1/transfer/message/schema/transfer-suspension-message-schema.json new file mode 100644 index 0000000..4226590 --- /dev/null +++ b/releases/2024-1/transfer/message/schema/transfer-suspension-message-schema.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferSuspensionMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferSuspensionMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-suspension-message-schema.json", + "definitions": { + "TransferSuspensionMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferSuspensionMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "minItems": 1, + "items": {} + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/releases/2024-1/transfer/message/schema/transfer-termination-message-schema.json b/releases/2024-1/transfer/message/schema/transfer-termination-message-schema.json new file mode 100644 index 0000000..85b65fe --- /dev/null +++ b/releases/2024-1/transfer/message/schema/transfer-termination-message-schema.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferTerminationMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferTerminationMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-termination-message-schema.json", + "definitions": { + "TransferTerminationMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferTerminationMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "minItems": 1, + "items": { + + } + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/releases/2024-1/transfer/message/shape/transfer-completion-message-shape.ttl b/releases/2024-1/transfer/message/shape/transfer-completion-message-shape.ttl new file mode 100644 index 0000000..c39999b --- /dev/null +++ b/releases/2024-1/transfer/message/shape/transfer-completion-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 dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferCompletionMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferCompletionMessage ; + rdfs:subClassOf dspace_shapes:MessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferCompletionMessageShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferCompletionMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + +. \ No newline at end of file diff --git a/releases/2024-1/transfer/message/shape/transfer-data-address-shape.ttl b/releases/2024-1/transfer/message/shape/transfer-data-address-shape.ttl new file mode 100644 index 0000000..6223610 --- /dev/null +++ b/releases/2024-1/transfer/message/shape/transfer-data-address-shape.ttl @@ -0,0 +1,85 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +shapes:DataAddressShape + a sh:NodeShape ; + sh:targetClass dspace:DataAddress ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:endpointType ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (DataAddressShape): An dspace:endpointType property must point exactly one xsd:anyURI field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:endpoint ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (DataAddressShape): An dspace:endpoint property must point exactly one xsd:anyURI field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:endpointProperties ; + sh:class dspace:EndpointProperty ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (TransferErrorShape): An dspace:endpointProperties property must point to zero or more dspace:EndpointProperty."@en ; + ] ; + +. + +shapes:EndpointPropertyShape + sh:targetClass dspace:EndpointProperty ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:name ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (EndpointPropertyShape): An dspace:name property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:value ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (EndpointPropertyShape): An dspace:value property must point exactly one xsd:string field."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/2024-1/transfer/message/shape/transfer-error-shape.ttl b/releases/2024-1/transfer/message/shape/transfer-error-shape.ttl new file mode 100644 index 0000000..c0a11e1 --- /dev/null +++ b/releases/2024-1/transfer/message/shape/transfer-error-shape.ttl @@ -0,0 +1,66 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferErrorShape + a sh:NodeShape ; + sh:targetClass dspace:TransferError ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferErrorShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferErrorShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (TransferErrorShape): An dspace:code property must point to exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:reason ; + ] ; + +. \ No newline at end of file diff --git a/releases/2024-1/transfer/message/shape/transfer-process-shape.ttl b/releases/2024-1/transfer/message/shape/transfer-process-shape.ttl new file mode 100644 index 0000000..ad9d941 --- /dev/null +++ b/releases/2024-1/transfer/message/shape/transfer-process-shape.ttl @@ -0,0 +1,69 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferProcessShape + a sh:NodeShape ; + sh:targetClass dspace:TransferProcess ; + rdfs:subClassOf dspace_shapes:MessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferProcessShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferProcessShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:state ; + sh:in ( + dspace:REQUESTED + dspace:STARTED + dspace:TERMINATED + dspace:COMPLETED + dspace:SUSPENDED + ) ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferProcessShape): An dspace:state property must point exactly one dspace:TransferState entity."@en ; + ] ; + +. \ No newline at end of file diff --git a/releases/2024-1/transfer/message/shape/transfer-request-message-shape.ttl b/releases/2024-1/transfer/message/shape/transfer-request-message-shape.ttl new file mode 100644 index 0000000..e712ca7 --- /dev/null +++ b/releases/2024-1/transfer/message/shape/transfer-request-message-shape.ttl @@ -0,0 +1,82 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferRequestMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferRequestMessage ; + + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:agreementId ; + sh:nodeKind sh:IRI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferRequestMessageShape): An dspace:agreementId property must point exactly one resource."@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 xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:dataAddress ; + sh:class dspace:DataAddress ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:message " (TransferRequestMessageShape): An dspace:dataAddress property must point zero or one dspace:DataAddress field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:callbackAddress ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferRequestMessageShape): An dspace:callbackAddress property must point exactly one xsd:anyURI field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferRequestMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; +. diff --git a/releases/2024-1/transfer/message/shape/transfer-start-message-shape.ttl b/releases/2024-1/transfer/message/shape/transfer-start-message-shape.ttl new file mode 100644 index 0000000..a636af4 --- /dev/null +++ b/releases/2024-1/transfer/message/shape/transfer-start-message-shape.ttl @@ -0,0 +1,62 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferStartMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferStartMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferStartMessageShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferStartMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:dataAddress ; + sh:class dspace:DataAddress ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (TransferStartMessageShape): An dspace:dataAddress property must point from an dspace:TransferStartMessage to a dspace:DataAddress object."@en ; + ] ; + +. \ No newline at end of file diff --git a/releases/2024-1/transfer/message/shape/transfer-suspension-message-shape.ttl b/releases/2024-1/transfer/message/shape/transfer-suspension-message-shape.ttl new file mode 100644 index 0000000..6402f94 --- /dev/null +++ b/releases/2024-1/transfer/message/shape/transfer-suspension-message-shape.ttl @@ -0,0 +1,60 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferSuspensionMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferSuspensionMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferSuspensionMessageShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferSuspensionMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (TransferSuspensionMessageShape): An dspace:code property must point to an xsd:string value."@en ; + ] ; + +. \ No newline at end of file diff --git a/releases/2024-1/transfer/message/shape/transfer-termination-message-shape.ttl b/releases/2024-1/transfer/message/shape/transfer-termination-message-shape.ttl new file mode 100644 index 0000000..30d2778 --- /dev/null +++ b/releases/2024-1/transfer/message/shape/transfer-termination-message-shape.ttl @@ -0,0 +1,67 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferTerminationMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferTerminationMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferTerminationMessageShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferTerminationMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (TransferTerminationMessageShape): An dspace:code property must point from an dspace:TransferTerminationMessage to exactly one xsd:string value."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:reason ; + ] + +. \ No newline at end of file diff --git a/releases/v0.8/catalog/message/catalog-error.json b/releases/v0.8/catalog/message/catalog-error.json new file mode 100644 index 0000000..f97e689 --- /dev/null +++ b/releases/v0.8/catalog/message/catalog-error.json @@ -0,0 +1,11 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:CatalogError", + "dspace:code": "123:A", + "dspace:reason": [ + { + "@value": "Catalog not provisioned for this requester.", + "@language": "en" + } + ] +} diff --git a/releases/v0.8/catalog/message/catalog-request-message.json b/releases/v0.8/catalog/message/catalog-request-message.json new file mode 100644 index 0000000..5ab9078 --- /dev/null +++ b/releases/v0.8/catalog/message/catalog-request-message.json @@ -0,0 +1,7 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:CatalogRequestMessage", + "dspace:filter": [ + "some-filter" + ] +} diff --git a/releases/v0.8/catalog/message/catalog.json b/releases/v0.8/catalog/message/catalog.json new file mode 100644 index 0000000..06e7294 --- /dev/null +++ b/releases/v0.8/catalog/message/catalog.json @@ -0,0 +1,64 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@id": "urn:uuid:3afeadd8-ed2d-569e-d634-8394a8836d57", + "@type": "dcat:Catalog", + "dct:title": "Data Provider A Catalog", + "dct:description": [ + "A catalog of data items" + ], + "dct:publisher": "Data Provider A", + "dcat:keyword": [ + "traffic", + "government" + ], + "dcat:service": [ + { + "@id": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77", + "@type": "dcat:DataService", + "dcat:endpointDescription": "dspace:connector", + "dcat:endpointURL": "https://provider-a.com/connector" + } + ], + "dcat:dataset": [ + { + "@id": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "@type": "dcat:Dataset", + "dct:title": "Traffic Data", + "dct:description": [ + { + "@value": "Traffic data sample extract", + "@language": "en" + } + ], + "dcat:keyword": [ + "traffic" + ], + "odrl:hasPolicy": [ + { + "@type": "odrl:Offer", + "dspace:providerId": "http://example.com/Provider", + "odrl:permission": [ + { + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "odrl:spatial", + "odrl:operator": "odrl:EQ", + "odrl:rightOperand": "odrl:EU" + } + ], + "odrl:duty": [] + } + ], + "odrl:prohibition": [], + "odrl:obligation": [] + } + ], + "dcat:distribution": { + "@type": "dcat:Distribution", + "dct:format": "dspace:s3+push", + "dcat:accessService": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77" + } + } + ] +} diff --git a/releases/v0.8/catalog/message/dataset-request-message.json b/releases/v0.8/catalog/message/dataset-request-message.json new file mode 100644 index 0000000..e6a16d3 --- /dev/null +++ b/releases/v0.8/catalog/message/dataset-request-message.json @@ -0,0 +1,5 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:DatasetRequestMessage", + "dspace:dataset": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88" +} diff --git a/releases/v0.8/catalog/message/dataset.json b/releases/v0.8/catalog/message/dataset.json new file mode 100644 index 0000000..a2d13ab --- /dev/null +++ b/releases/v0.8/catalog/message/dataset.json @@ -0,0 +1,47 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@id": "urn:uuid:3afeadd8-ed2d-569e-d634-8394a8836d57", + "@type": "dcat:Dataset", + "dct:title": "Traffic Data", + "dct:description": [ + { + "@value": "Traffic data sample extract", + "@language": "en" + } + ], + "dcat:keyword": [ + { + "@value": "traffic", + "@language": "en" + } + ], + "odrl:hasPolicy": { + "@type": "odrl:Offer", + "@id": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:permission": [ + { + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "odrl:spatial", + "odrl:rightOperand": "_:EU", + "odrl:operator": "odrl:eq" + } + ] + } + ] + }, + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "dspace:s3+push" + }, + "dcat:accessService": [ + { + "@id": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77" + } + ] + } + ] +} diff --git a/releases/v0.8/catalog/message/example/dcat.distribution.example.json b/releases/v0.8/catalog/message/example/dcat.distribution.example.json new file mode 100644 index 0000000..4b2fb27 --- /dev/null +++ b/releases/v0.8/catalog/message/example/dcat.distribution.example.json @@ -0,0 +1,101 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@id": "http://provider.com/catalog1/dataset1/", + "@type": "dcat:Dataset", + "dct:title": "IDS Dataset #1", + "dct:description": [ + { + "@language": "en", + "@value": "This is the number 1 data asset of the IDS. The consumer must be a TRUST_PLUS certified connector." + }, + { + "@language": "de", + "@value": "Dies ist das Nummer 1 Data Asset im IDS. Der Consumer muss ein TRUST_PLUS zertifizierter Connector sein." + } + ], + "dcat:keyword": [ + "high value data", + "example" + ], + "odrl:hasPolicy": [ + { + "@id": "https://provider.com/edc/offer/1", + "@type": "odrl:Offer", + "odrl:permission": [ + { + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "idsc:SECURITY_LEVEL", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": "idsc:TRUST_SECURITY_PROFILE" + } + ] + } + ], + "odrl:prohibition": [ + { + "odrl:action": "odrl:distribute" + } + ] + } + ], + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:title": "Distribution#1", + "dct:description": [ + "This is a distribution which provides the data via a HTTP REST API." + ], + "dcat:keyword": [ + "HTTP", + "REST" + ], + "dspace:transportType": "dspace:HTTP_REST", + "dcat:accessService": [ + { + "@type": [ + "dcat:DataService", + "dspace:NEGOTIATION_SERVICE" + ], + "dcat:endpointURL": "https://provider.com/connector/negotiation" + }, + { + "@type": [ + "dcat:DataService", + "dspace:TRANSFER_SERVICE" + ], + "dcat:endpointURL": "https://provider.com/connector/transfer" + } + ] + }, + { + "@type": "dcat:Distribution", + "dct:title": "Distribution#2", + "dct:description": [ + "This is another distribution using an S3 API." + ], + "dcat:keyword": [ + "S3", + "public" + ], + "dcat:accessService": [ + { + "@type": [ + "dcat:DataService", + "dspace:NEGOTIATION_SERVICE" + ], + "dcat:endpointURL": "https://provider.com/connector/negotiation" + }, + { + "@type": [ + "dcat:DataService", + "dspace:TRANSFER_SERVICE" + ], + "dcat:endpointURL": "https://provider.com/connector/transfer" + } + ], + "dspace:transportType": "dspace:S3" + } + ] + } \ No newline at end of file diff --git a/releases/v0.8/catalog/message/example/dcat.distribution.example.option1.json b/releases/v0.8/catalog/message/example/dcat.distribution.example.option1.json new file mode 100644 index 0000000..a72a93f --- /dev/null +++ b/releases/v0.8/catalog/message/example/dcat.distribution.example.option1.json @@ -0,0 +1,154 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@id": "http://provider.com/catalog1/dataset1/", + "@type": "dcat:Dataset", + "dct:title": "IDS Dataset Collection", + "dct:description": [ + { + "@language": "en", + "@value": "This dataset includes all assets which identifiers comply to the pattern 'urn:guid:[A-F0-9]{8}\\-[A-F0-9]{4}\\-[A-F0-9]{4}\\-[A-F0-9]{4}\\-[A-F0-9]{12}'. A download via a S3 transfer costs 5 EUR, while the HTTP_REST transfer option costs only 2 EUR. The consumer must be a TRUST_PLUS certfified connector. No further distribution is allowed." + }, + { + "@language": "de", + "@value": "Dieses Dataset bezeichnet alle Assets, deren Identifier dem Pattern 'urn:guid:[A-F0-9]{8}\\-[A-F0-9]{4}\\-[A-F0-9]{4}\\-[A-F0-9]{4}\\-[A-F0-9]{12}' folgen. Ein Transfer via S3 kostet etwa 5 Euro, wohingegen der Transfer via HTTP_RESt nur mit etwa 2 Euro zu Buche schlägt. Der Consumer muss ein TRUST_PLUS zertifizierter Connetor sein. Eine Weiterverbreitung ist nicht gestattet." + } + ], + "dcat:keyword": [ + "data space", + "data asset", + "dcat dataset", + "collection" + ], + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:title": "Distribution#1", + "dct:description": [ + "This is a distribution everyone can see." + ], + "dcat:keyword": [ + "HTTP", + "REST" + ], + "dspace:transportType": "dspace:HTTP_REST", + "dcat:accessService": [ + { + "@type": [ + "dcat:DataService", + "dspace:NEGOTIATION_SERVICE" + ], + "dcat:endpointURL": "https://provider.com/connector/negotiation" + }, + { + "@type": [ + "dcat:DataService", + "dspace:TRANSFER_SERVICE" + ], + "dcat:endpointURL": "https://provider.com/connector/transfer" + } + ] + }, + { + "@type": "dcat:Distribution", + "dct:title": "Distribution#2", + "dct:description": [ + "This is another distribution." + ], + "dcat:keyword": [ + "S3", + "public" + ], + "dspace:transportType": "dspace:S3", + "dcat:accessService": [ + { + "@type": [ + "dcat:DataService", + "dspace:NEGOTIATION_SERVICE" + ], + "dcat:endpointURL": "https://provider.com/connector/negotiation" + }, + { + "@type": [ + "dcat:DataService", + "dspace:TRANSFER_SERVICE" + ], + "dcat:endpointURL": "https://provider.com/connector/transfer" + } + ] + } + ], + "odrl:hasPolicy": [ + { + "@type": "odrl:Offer", + "@id": "https://provider.com/connector/offer/1", + "odrl:permission": [ + { + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "idsc:SECURITY_LEVEL", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": "idsc:TRUST_PLUS_SECURITY_PROFILE" + } + ], + "odrl:duty": [ + { + "odrl:action": "odrl:compensate", + "odrl:constraint": [ + { + "odrl:xone": [ + { + "odrl:and": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": "dspace:S3" + }, + { + "odrl:leftOperand": "odrl:payAmount", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": { + "@type": "xsd:decimal", + "@value": "5.0" + }, + "odrl:unit": { + "@id": "http://dbpedia.org/resource/Euro" + } + } + ] + }, + { + "odrl:and": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": "dspace:HTTP_REST" + }, + { + "odrl:leftOperand": "odrl:payAmount", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": { + "@type": "xsd:decimal", + "@value": "2.0" + }, + "odrl:unit": { + "@id": "http://dbpedia.org/resource/Euro" + } + } + ] + } + ] + } + ] + } + ] + } + ], + "odrl:prohibition": [ + { + "odrl:action": "odrl:distribute" + } + ] + } + ] +} diff --git a/releases/v0.8/catalog/message/example/dcat.distribution.example.option2.json b/releases/v0.8/catalog/message/example/dcat.distribution.example.option2.json new file mode 100644 index 0000000..9eeb46f --- /dev/null +++ b/releases/v0.8/catalog/message/example/dcat.distribution.example.option2.json @@ -0,0 +1,172 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@id": "http://provider.com/catalog1/dataset1/", + "@type": "dcat:Dataset", + "dct:title": "IDS Dataset Collection", + "dct:description": [ + { + "@language": "en", + "@value": "This dataset includes all assets which identifiers comply to the pattern 'urn\\:guid\\:[A-F0-9]{8}\\-[A-F0-9]{4}\\-[A-F0-9]{4}\\-[A-F0-9]{4}\\-[A-F0-9]{12}'. A download via an S3 transfer costs 5 EUR, while the HTTP_REST transfer option costs only 2 EUR. The consumer must be a TRUST_PLUS certfified connector. No further distribution is allowed." + }, + { + "@language": "de", + "@value": "Dieses Dataset bezeichnet alle Assets, deren Identifier dem Pattern 'urn:guid:[A-F0-9]{8}\\-[A-F0-9]{4}\\-[A-F0-9]{4}\\-[A-F0-9]{4}\\-[A-F0-9]{12}' folgen. Ein Transfer via S3 kostet etwa 5 Euro, wohingegen der Transfer via HTTP_RESt nur mit etwa 2 Euro zu Buche schlägt.. Der Consumer muss ein TRUST_PLUS zertifizierter Connetor sein. Eine Weiterverbreitung ist nicht gestattet." + } + ], + "dcat:keyword": [ + "data space", + "data asset", + "dcat dataset", + "collection" + ], + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:title": "Distribution#1", + "dct:description": [ + "This is a distribution everyone can see." + ], + "dcat:keyword": [ + "HTTP", + "REST" + ], + "dspace:transportType": "dspace:HTTP_REST", + "odrl:hasPolicy": [ + { + "@type": "odrl:Offer", + "@id": "https://provider.com/edc/offer/1", + "odrl:permission": [ + { + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "idsc:SECURITY_LEVEL", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": "idsc:TRUST_PLUS_SECURITY_PROFILE" + } + ], + "odrl:duty": [ + { + "odrl:action": "odrl:compensate", + "odrl:constraint": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": "dspace:HTTP_REST" + }, + { + "odrl:leftOperand": "odrl:payAmount", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": { + "@type": "xsd:decimal", + "@value": "2.0" + }, + "odrl:unit": { + "@id": "http://dbpedia.org/resource/Euro" + } + } + ] + } + ] + } + ], + "odrl:prohibition": [ + { + "odrl:action": "odrl:distribute" + } + ] + } + ], + "dcat:accessService": [ + { + "@type": [ + "dcat:DataService", + "dspace:NEGOTIATION_SERVICE" + ], + "dcat:endpointURL": "https://provider.com/connector/negotiation" + }, + { + "@type": [ + "dcat:DataService", + "dspace:TRANSFER_SERVICE" + ], + "dcat:endpointURL": "https://provider.com/connector/transfer" + } + ] + }, + { + "@type": "dcat:Distribution", + "dct:description": [ + "This is another distribution." + ], + "dct:title": "Distribution#2", + "dcat:accessService": [ + { + "@type": [ + "dcat:DataService", + "dspace:NEGOTIATION_SERVICE" + ], + "dcat:endpointURL": "https://provider.com/connector/negotiation" + }, + { + "@type": [ + "dcat:DataService", + "dspace:TRANSFER_SERVICE" + ], + "dcat:endpointURL": "https://provider.com/connector/transfer" + } + ], + "dcat:keyword": [ + "S3", + "public" + ], + "odrl:hasPolicy": [ + { + "@id": "https://provider.com/edc/offer/1", + "@type": "odrl:Offer", + "odrl:permission": [ + { + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "idsc:SECURITY_LEVEL", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": "idsc:TRUST_PLUS_SECURITY_PROFILE" + } + ], + "odrl:duty": [ + { + "odrl:action": "odrl:compensate", + "odrl:constraint": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": "dspace:S3" + }, + { + "odrl:leftOperand": "odrl:payAmount", + "odrl:operator": "odrl:eq", + "odrl:rightOperand": { + "@type": "xsd:decimal", + "@value": "5.0" + }, + "odrl:unit": { + "@id": "http://dbpedia.org/resource/Euro" + } + } + ] + } + ] + } + ], + "odrl:prohibition": [ + { + "odrl:action": "odrl:distribute" + } + ] + } + ], + "dspace:transportType": "dspace:S3" + } + ] + } \ No newline at end of file diff --git a/releases/v0.8/catalog/message/schema/catalog-error-schema.json b/releases/v0.8/catalog/message/schema/catalog-error-schema.json new file mode 100644 index 0000000..800110e --- /dev/null +++ b/releases/v0.8/catalog/message/schema/catalog-error-schema.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CatalogErrorSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CatalogError" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/CatalogErrorSchema", + "definitions": { + "CatalogError": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:CatalogError" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@value": { + "type": "string" + }, + "@language": { + "type": "string" + } + }, + "required": ["@value", "@language"] + }, + "minItems": 1 + } + }, + "required": [ "@context", "@type" ] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/catalog/message/schema/catalog-request-message-schema.json b/releases/v0.8/catalog/message/schema/catalog-request-message-schema.json new file mode 100644 index 0000000..82845d1 --- /dev/null +++ b/releases/v0.8/catalog/message/schema/catalog-request-message-schema.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CatalogRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CatalogRequestMessage" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/CatalogRequestMessageSchema", + "definitions": { + "CatalogRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:CatalogRequestMessage" + }, + "dspace:filter": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ "@context", "@type"] + } + } +} diff --git a/releases/v0.8/catalog/message/schema/catalog-schema.json b/releases/v0.8/catalog/message/schema/catalog-schema.json new file mode 100644 index 0000000..30a20fc --- /dev/null +++ b/releases/v0.8/catalog/message/schema/catalog-schema.json @@ -0,0 +1,335 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CatalogSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Catalog" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/CatalogSchema", + "definitions": { + "Catalog": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Dataset" + }, + { + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dcat:Catalog" + }, + "dcat:dataset": { + "type": "array", + "items": { + "$ref": "#/definitions/Dataset" + }, + "minItems": 1 + }, + "dcat:record": { + "$ref": "#/definitions/CatalogRecord" + }, + "dcat:service": { + "type": "array", + "items": { + "$ref": "#/definitions/DataService" + }, + "minItems": 1 + }, + "dcat:themeTaxonomy": { + "$ref": "#/definitions/Reference" + }, + "dct:hasPart": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceChoice" + }, + "minItems": 1 + }, + "foaf:homepage": { + "$ref": "#/definitions/Reference" + } + } + } + ], + "required": [ + "@context", + "@type" + ], + "additionalProperties": false + }, + "ResourceChoice": { + "oneOf": [ + { + "$ref": "#/definitions/Catalog" + }, + { + "$ref": "#/definitions/Dataset" + }, + { + "$ref": "#/definitions/DataService" + } + ] + }, + "CatalogRecord": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "dcat:CatalogRecord" + }, + "dct:conformsTo": { + "$ref": "#/definitions/Reference" + }, + "dct:description": { + "type": "array", + "items": { + "$ref": "#/definitions/Multilanguage" + } + }, + "dct:issued": { + "type": "string" + }, + "dct:modified": { + "type": "string" + }, + "dct:title": { + "type": "string" + }, + "foaf:primaryTopic": { + "$ref": "#/definitions/Resource" + } + } + }, + "Resource": { + "type": "object", + "properties": { + "dcat:contactPoint": { + "$ref": "#/definitions/Reference" + }, + "dcat:keyword": { + "type": "array", + "items": { + "$ref": "#/definitions/Multilanguage" + } + }, + "dcat:landingPage": { + "$ref": "#/definitions/Reference" + }, + "dcat:theme": { + "type": "array", + "items": { + "$ref": "#/definitions/Reference" + }, + "minItems": 1 + }, + "dct:conformsTo": { + "$ref": "#/definitions/Reference" + }, + "dct:creator": { + "$ref": "#/definitions/Reference" + }, + "dct:description": { + "type": "array", + "items": { + "$ref": "#/definitions/Multilanguage" + } + }, + "dct:identifier": { + "type": "string" + }, + "dct:isReferencedBy": { + "$ref": "#/definitions/Reference" + }, + "dct:issued": { + "type": "string" + }, + "dct:language": { + "$ref": "#/definitions/Reference" + }, + "dct:license": { + "$ref": "#/definitions/Reference" + }, + "dct:modified": { + "type": "string" + }, + "dct:publisher": { + "type": "string" + }, + "dct:relation": { + "$ref": "#/definitions/Reference" + }, + "dct:title": { + "type": "string" + }, + "dct:type": { + "type": "string" + }, + "odrl:hasPolicy": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/dcat-catalog-schema-and-shape/negotiation/message/schema/contract-schema.json#/definitions/Policy" + }, + "minItems": 1 + } + } + }, + "DataService": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + }, + { + "properties": { + "dcat:endpointDescription": { + "$ref": "#/definitions/Reference" + }, + "dcat:endpointURL": { + "type": "string" + }, + "dcat:servesDataset": { + "type": "array", + "items": { + "$ref": "https://w3id.org/dspace/schemas/v0.8/dataset-schema.json#/definitions/Dataset" + }, + "minItems": 1 + } + } + } + ] + }, + "Distribution": { + "type": "object", + "properties": { + "dcat:accessService": { + "type": "array", + "items": { + "$ref": "#/definitions/DataService" + }, + "minItems": 1 + }, + "dcat:accessURL": { + "$ref": "#/definitions/Reference" + }, + "dcat:byteSize": { + "type": "string" + }, + "dcat:compressFormat": { + "$ref": "#/definitions/Reference" + }, + "dcat:downloadURL": { + "$ref": "#/definitions/Reference" + }, + "dcat:mediaType": { + "$ref": "#/definitions/Reference" + }, + "dcat:packageFormat": { + "$ref": "#/definitions/Reference" + }, + "dcat:spatialResolutionInMeters": { + "$ref": "#/definitions/decimal" + }, + "dcat:temporalResolution": { + "$ref": "#/definitions/duration" + }, + "dct:conformsTo": { + "$ref": "#/definitions/Reference" + }, + "dct:description": { + "type": "array", + "items": { + "$ref": "#/definitions/Multilanguage" + } + }, + "dct:format": { + "type": "string" + }, + "dct:issued": { + "type": "string" + }, + "dct:modified": { + "type": "string" + }, + "dct:title": { + "type": "string" + }, + "odrl:hasPolicy": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/dcat-catalog-schema-and-shape/negotiation/message/schema/contract-schema.json#/definitions/Policy" + }, + "minItems": 1 + } + } + }, + "time": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "xsd:dateTime" + }, + "@value": { + "type": "string", + "pattern": "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?" + } + }, + "required": ["@value", "@type"] + }, + "duration": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "xsd:duration" + }, + "@value": { + "type": "string", + "pattern": "^(-?)P(?=.)((\\d+)Y)?((\\d+)M)?((\\d+)D)?(T(?=.)((\\d+)H)?((\\d+)M)?(\\d*(\\.\\d+)?S)?)?$" + } + }, + "required": ["@value", "@type"] + }, + "decimal": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "xsd:decimal" + }, + "@value": { + "type": "string" + } + }, + "required": ["@value", "@type"] + }, + "Reference": { + "type": "object", + "properties": { + "@id": { + "type": "string" + } + }, + "required": ["@id"] + }, + "Multilanguage": { + "type": "object", + "properties": { + "@value": { + "type": "string" + }, + "@language": { + "type": "string" + } + }, + "required": ["@value", "@language"] + } + } +} diff --git a/releases/v0.8/catalog/message/schema/dataset-request-message-schema.json b/releases/v0.8/catalog/message/schema/dataset-request-message-schema.json new file mode 100644 index 0000000..d1e76b8 --- /dev/null +++ b/releases/v0.8/catalog/message/schema/dataset-request-message-schema.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "DatasetRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/DatasetRequestMessage" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/DatasetRequestMessageSchema", + "definitions": { + "DatasetRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:DatasetRequestMessage" + }, + "dspace:dataset": { + "type": "string" + } + }, + "required": [ "@context", "@type", "dspace:dataset" ] + } + } +} diff --git a/releases/v0.8/catalog/message/schema/dataset-schema.json b/releases/v0.8/catalog/message/schema/dataset-schema.json new file mode 100644 index 0000000..59d6815 --- /dev/null +++ b/releases/v0.8/catalog/message/schema/dataset-schema.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "DatasetSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Dataset" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/DatasetSchema", + "definitions": { + "Dataset": { + "type": "object", + "allOf": [ + { + "$ref": "https://w3id.org/dspace/schemas/v0.8/catalog-schema.json#/definitions/Resource" + }, + { + "properties": { + "dcat:distribution": { + "type": "array", + "items": { + "$ref": "https://w3id.org/dspace/schemas/v0.8/catalog-schema.json#/definitions/Distribution" + }, + "minItems": 1 + } + } + } + ] + } + } +} diff --git a/releases/v0.8/catalog/message/shape/catalog-error-shape.ttl b/releases/v0.8/catalog/message/shape/catalog-error-shape.ttl new file mode 100644 index 0000000..92a7664 --- /dev/null +++ b/releases/v0.8/catalog/message/shape/catalog-error-shape.ttl @@ -0,0 +1,38 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:CatalogErrorShape + a sh:NodeShape ; + sh:targetClass dspace:CatalogError ; + sh:property [ + sh:path dspace:code ; + sh:datatype xsd:string ; + ] ; + sh:property [ + sh:path dspace:reason ; + sh:datatype rdf:langString ; + ] . \ No newline at end of file diff --git a/releases/v0.8/catalog/message/shape/catalog-request-message-shape.ttl b/releases/v0.8/catalog/message/shape/catalog-request-message-shape.ttl new file mode 100644 index 0000000..3bdbdc3 --- /dev/null +++ b/releases/v0.8/catalog/message/shape/catalog-request-message-shape.ttl @@ -0,0 +1,36 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:CatalogRequestMessageShape + a sh:NodeShape ; + sh:targetClass dspace:CatalogRequestMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:filter ; + ] ; +. \ No newline at end of file diff --git a/releases/v0.8/catalog/message/shape/dataset-request-message-shape.ttl b/releases/v0.8/catalog/message/shape/dataset-request-message-shape.ttl new file mode 100644 index 0000000..8f9a00b --- /dev/null +++ b/releases/v0.8/catalog/message/shape/dataset-request-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 dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:DatasetRequestMessageShape + a sh:NodeShape ; + sh:targetClass dspace:DatasetRequestMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:dataset ; + sh:class dcat:Dataset ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (DatasetRequestMessage): An dspace:dataset property must point to one dcat:Dataset."@en ; + ] ; +. diff --git a/releases/v0.8/catalog/message/shape/dcat-shapes.ttl b/releases/v0.8/catalog/message/shape/dcat-shapes.ttl new file mode 100644 index 0000000..859cf76 --- /dev/null +++ b/releases/v0.8/catalog/message/shape/dcat-shapes.ttl @@ -0,0 +1,597 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . +@prefix foaf: . +@prefix prov: . +@prefix skos: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + + +dspace_shapes:ResourceShape + a sh:NodeShape ; + sh:targetClass dcat:Resource ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:contactPoint ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dcat:contractPoint property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:keyword ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dcat:keyword property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:landingPage ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dcat:landingPage property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:theme ; + sh:class skos:Concept ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dcat:theme property must point to a skos:Concept."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:accessRights ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:accessRights property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:conformsTo ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:accessconformsToRights property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:creator ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:creator property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:description ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:description property must point to a rdf:langString field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:identifier ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:identifier property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:isReferencedBy ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:isReferencedBy property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:issued ; + sh:datatype xsd:dateTime ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:issued property must point to a xsd:dateTime field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:language ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:language property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:license ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:license property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:modified ; + sh:datatype xsd:boolean ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:modified property must point to a xsd:dateTime field."@en ; + ] ; + + + sh:property [ + a sh:PropertyShape ; + sh:path dct:publisher ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:relation ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:rights ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:rights property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:title ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:title property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:type ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A dct:type property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:hasPolicy ; + sh:class odrl:Policy ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): An odrl:hasPolicy property must point to an odrl:Policy."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path prov:qualifiedAttribution ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (ResourceShape): A prov:qualifiedAttribution property must point to a xsd:string field."@en ; + ] ; + +. + + +dspace_shapes:DatasetShape + a sh:NodeShape ; + sh:targetClass dcat:Dataset ; + rdfs:subClassOf dspace_shapes:ResourceShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:distribution ; + sh:class dcat:Distribution ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dcat:distribution property must point to a dcat:Distribution."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:spatialResolutionInMeters ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dcat:spatialResolutionInMeters property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:temporalResolution ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dcat:temporalResolution property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:accrualPeriodicity ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dcat:accrualPeriodicity property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:spatial ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dcat:spatial property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:temporal ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dcat:temporal property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:wasGeneratedBy ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DatasetShape): A dcat:wasGeneratedBy property must point to a xsd:string field."@en ; + ] ; + +. + +dspace_shapes:CatalogShape + a sh:NodeShape ; + sh:targetClass dcat:Catalog ; + rdfs:subClassOf dspace_shapes:DatasetShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:catalog ; + sh:class dcat:Catalog ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dcat:catalog property must point to a dcat:Catalog."@en ; + ] ; + + 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 ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:record ; + sh:class dcat:CatalogRecord ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dcat:record property must point to a dcat:CatalogRecord."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:service ; + sh:class dcat:DataService ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dcat:service property must point to a dcat:DataService."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:themeTaxonomy ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dcat:record property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path foaf:homepage ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A foaf:homepage property must point to a xsd:string field."@en ; + ] ; + +. + +dspace_shapes:CatalogRecordShape + a sh:NodeShape ; + sh:targetClass dcat:CatalogRecord ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:conformsTo ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dct:conformsTo property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:description ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dct:description property must point to a rdf:langString field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:issued ; + sh:datatype xsd:dateTime ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dct:issued property must point to a xsd:dateTime field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:modified ; + sh:datatype xsd:dateTime ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dct:modified property must point to a xsd:dateTime field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:title ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A dct:title property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path foaf:primaryTopic ; + sh:class dcat:Resource ; + sh:maxCount 1; + sh:severity sh:Violation ; + sh:message " (CatalogShape): A foaf:primaryTopic property must point to maximal one dcat:Resource."@en ; + ] ; + +. + + +dspace_shapes:ConceptShape + a sh:NodeShape ; + sh:targetClass skos:Concept ; + + sh:property [ + a sh:PropertyShape ; + sh:path skos:inScheme ; + sh:class dcat:Resource ; + sh:severity sh:Violation ; + sh:message " (ConceptShape): A skos:inScheme property must point to a dcat:Resource."@en ; + ] ; +. + +dspace_shapes:ConceptSchemeShape + a sh:NodeShape ; + sh:targetClass skos:ConceptScheme ; + +. + +dspace_shapes:AgentShape + a sh:NodeShape ; + sh:targetClass foaf:Agent ; + +. + + +dspace_shapes:DataServiceShape + a sh:NodeShape ; + sh:targetClass dcat:DataService ; + rdfs:subClassOf dcat:Resource ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:endpointDescription ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DataServiceShape): A dcat:endpointDescription property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:endpointURL ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DataServiceShape): A dcat:endpointURL property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:servesDataset ; + sh:class dcat:Dataset ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DataServiceShape): A dcat:servesDataset property must point to a dcat:Distribution."@en ; + ] ; + +. + + +dspace_shapes:DistributionShape + a sh:NodeShape ; + sh:targetClass dcat:Distribution ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:accessService ; + sh:class dcat:Dataset ; + sh:minCount 0; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dcat:accessService property must point to a dcat:Distribution."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:accessURL ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dcat:accessURL property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:byteSize ; + sh:datatype xsd:integer ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dcat:accessURL property must point to a xsd:integer field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:compressFormat ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dcat:compressFormat property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:downloadURL ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dcat:downloadURL property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:mediaType ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dcat:mediaType property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:packageFormat ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dcat:packageFormat property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:spatialResolutionInMeters ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dcat:spatialResolutionInMeters property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dcat:temporalResolution ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dcat:temporalResolution property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:accessRights ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:accessRights property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:conformsTo ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:conformsTo property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:description ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:description property must point to a rdf:langString field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:format ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:format property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:issued ; + sh:datatype xsd:dateTime ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:issued property must point to a xsd:dateTime field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:license ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:license property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:modified ; + sh:datatype xsd:dateTime ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:modified property must point to a xsd:dateTime field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:rights ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:rights property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dct:title ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): A dct:title property must point to a xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:hasPolicy ; + sh:class odrl:Policy ; + sh:severity sh:Violation ; + sh:message " (DistributionShape): An odrl:hasPolicy property must point to an odrl:Policy."@en ; + ] ; + +. + diff --git a/releases/v0.8/common/schema/context.json b/releases/v0.8/common/schema/context.json new file mode 100644 index 0000000..9948961 --- /dev/null +++ b/releases/v0.8/common/schema/context.json @@ -0,0 +1,47 @@ +{ + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "cred": "https://www.w3.org/2018/credentials#", + "sec": "https://w3id.org/security#", + "foaf": "http://xmlns.com/foaf/0.1/", + "cc": "http://creativecommons.org/ns#", + "dct": "http://purl.org/dc/terms/", + "dcat": "http://www.w3.org/ns/dcat#", + "dspace": "https://w3id.org/dspace/v0.8/", + "dct:title": { "@language": "en" }, + "dspace:timestamp": { "@type": "xsd:dateTime" }, + "dct:issued": { "@type": "xsd:dateTime" }, + "dct:modified": { "@type": "xsd:dateTime" }, + "dct:created": { "@type": "xsd:dateTime" }, + "dcat:byteSize": { "@type": "xsd:decimal" }, + "dcat:endpointURL": { "@type": "xsd:anyURI" }, + "dspace:agreementId": { "@type": "@id" }, + "dspace:dataset": { "@type": "@id" }, + "dspace:transportType": { "@type": "@id" }, + "dspace:state": { "@type": "@id" }, + "dct:publisher": { "@type": "@id" }, + "dct:format": { "@type": "@id" }, + "dct:type": { "@type": "@id" }, + "dspace:providerId": { "@type": "@id" }, + "dspace:consumerId": { "@type": "@id" }, + "odrl:action": { "@type": "@id" }, + "odrl:target": { "@type": "@id" }, + "odrl:leftOperand": { "@type": "@id" }, + "odrl:operator": { "@type": "@id" }, + "odrl:rightOperandReference": { "@type": "@id" }, + "odrl:profile": { "@type": "@id" }, + "dspace:reason": { "@container": "@set" }, + "dspace:catalog": { "@container": "@set" }, + "dspace:filter": { "@container": "@set" }, + "dct:description": { "@container": "@set" }, + "dcat:keyword": { "@container": "@set" }, + "dcat:service": { "@container": "@set" }, + "dcat:dataset": { "@container": "@set" }, + "odrl:hasPolicy": { "@container": "@set" }, + "odrl:permission": { "@container": "@set" }, + "odrl:prohibition": { "@container": "@set" }, + "odrl:duty": { "@container": "@set" }, + "odrl:constraint": { "@container": "@set" } + } +} \ No newline at end of file diff --git a/releases/v0.8/common/schema/definitions.schema.json b/releases/v0.8/common/schema/definitions.schema.json new file mode 100644 index 0000000..c914f74 --- /dev/null +++ b/releases/v0.8/common/schema/definitions.schema.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "definitions": { + + } +} diff --git a/releases/v0.8/common/shape/message-shape.ttl b/releases/v0.8/common/shape/message-shape.ttl new file mode 100644 index 0000000..3d19016 --- /dev/null +++ b/releases/v0.8/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 dspace: . +@prefix dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +shapes:MessageShape + a sh:NodeShape ; + sh:targetClass dspace:Message ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:processId ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (MessageShape): An dspace:processId property must point to exactly one xsd:string."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/v0.8/common/shape/odrl-shapes.ttl b/releases/v0.8/common/shape/odrl-shapes.ttl new file mode 100644 index 0000000..fb472ef --- /dev/null +++ b/releases/v0.8/common/shape/odrl-shapes.ttl @@ -0,0 +1,79 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +dspace_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 ; + ] ; +. + + +dspace_shapes:AgreementShape + a sh:NodeShape ; + sh:targetClass odrl:Agreement ; + + sh:property [ + a sh:PropertyShape ; + sh:path odrl:target ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:timestamp ; + sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (AgreementShape): An dspace:timestamp property must point to exactly one xsd:dateTime value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerId ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (AgreementShape): An dspace:providerId property must point to exactly one Provider Node."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerId ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (AgreementShape): An dspace:consumerId property must point to exactly one Consumer Node."@en ; + ] ; +. diff --git a/releases/v0.8/negotiation/message/contract-agreement-message.json b/releases/v0.8/negotiation/message/contract-agreement-message.json new file mode 100644 index 0000000..58dfd73 --- /dev/null +++ b/releases/v0.8/negotiation/message/contract-agreement-message.json @@ -0,0 +1,24 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:ContractAgreementMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:agreement": { + "@id": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44", + "@type": "odrl:Agreement", + "odrl:target": "urn:uuid:3dd1add4-4d2d-569e-d634-8394a8836d23", + "dspace:timestamp": "2023-01-01T01:00:00Z", + "dspace:providerId": "urn:tsdshhs636378", + "dspace:consumerId": "urn:jashd766", + "odrl:permission": [{ + "odrl:action": "odrl:use" , + "odrl:constraint": [{ + "odrl:leftOperand": "odrl:dateTime", + "odrl:operand": "odrl:lteq", + "odrl:rightOperand": { "@value": "2023-12-31T06:00Z", "@type": "xsd:dateTime" } + }] + }] + }, + "dspace:signature": {}, + "dspace:callbackAddress": "https://......" +} diff --git a/releases/v0.8/negotiation/message/contract-agreement-verification-message.json b/releases/v0.8/negotiation/message/contract-agreement-verification-message.json new file mode 100644 index 0000000..e558add --- /dev/null +++ b/releases/v0.8/negotiation/message/contract-agreement-verification-message.json @@ -0,0 +1,11 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:ContractAgreementVerificationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:hashedMessage": { + "dspace:digest": "some-hash", + "dspace:algorithm": "SHA-384" + }, + "dspace:signature": {} +} diff --git a/releases/v0.8/negotiation/message/contract-negotiation-error.json b/releases/v0.8/negotiation/message/contract-negotiation-error.json new file mode 100644 index 0000000..718645b --- /dev/null +++ b/releases/v0.8/negotiation/message/contract-negotiation-error.json @@ -0,0 +1,23 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:ContractNegotiationError", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + { + "@value": "Catalog not provisioned for this requester.", + "@language": "en" + } + ], + "dct:description": [ + { + "@language": "en", + "@value": "The parsing of the input parameters failed." + }, + { + "@language": "de", + "@value": "Das Lesen der Eingabeparameter schlug fehl." + } + ] +} diff --git a/releases/v0.8/negotiation/message/contract-negotiation-event-message.json b/releases/v0.8/negotiation/message/contract-negotiation-event-message.json new file mode 100644 index 0000000..deb34a7 --- /dev/null +++ b/releases/v0.8/negotiation/message/contract-negotiation-event-message.json @@ -0,0 +1,7 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:ContractNegotiationEventMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:eventType": "dspace:ACCEPTED" +} diff --git a/releases/v0.8/negotiation/message/contract-negotiation-termination-message.json b/releases/v0.8/negotiation/message/contract-negotiation-termination-message.json new file mode 100644 index 0000000..fa2a3df --- /dev/null +++ b/releases/v0.8/negotiation/message/contract-negotiation-termination-message.json @@ -0,0 +1,13 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:ContractNegotiationTerminationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + { + "@value": "License model does not fit.", + "@language": "en" + } + ] +} diff --git a/releases/v0.8/negotiation/message/contract-negotiation.json b/releases/v0.8/negotiation/message/contract-negotiation.json new file mode 100644 index 0000000..4069acb --- /dev/null +++ b/releases/v0.8/negotiation/message/contract-negotiation.json @@ -0,0 +1,7 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:ContractNegotiation", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:state": "dspace:REQUESTED" + } diff --git a/releases/v0.8/negotiation/message/contract-offer-message.json b/releases/v0.8/negotiation/message/contract-offer-message.json new file mode 100644 index 0000000..77a6c91 --- /dev/null +++ b/releases/v0.8/negotiation/message/contract-offer-message.json @@ -0,0 +1,22 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:ContractOfferMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "urn:uuid:6bcea82e-c509-443d-ba8c-8eef25984c07", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "dspace:providerId": "urn:tsdshhs636378", + "dspace:consumerId": "urn:jashd766", + "odrl:permission": [{ + "odrl:action": "odrl:use" , + "odrl:constraint": [{ + "odrl:leftOperand": "odrl:dateTime", + "odrl:operand": "odrl:lteq", + "odrl:rightOperand": { "@value": "2023-12-31T06:00Z", "@type": "xsd:dateTime" } + }] + }] + }, + "dspace:callbackAddress": "https://......" +} diff --git a/releases/v0.8/negotiation/message/contract-offer-message_initial.json b/releases/v0.8/negotiation/message/contract-offer-message_initial.json new file mode 100644 index 0000000..0bda491 --- /dev/null +++ b/releases/v0.8/negotiation/message/contract-offer-message_initial.json @@ -0,0 +1,12 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:ContractOfferMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:dataset": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "urn:uuid:d526561f-528e-4d5a-ae12-9a9dd9b7a518", + "target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88" + }, + "dspace:callbackAddress": "https://......" +} diff --git a/releases/v0.8/negotiation/message/contract-request-message.json b/releases/v0.8/negotiation/message/contract-request-message.json new file mode 100644 index 0000000..c65fb1b --- /dev/null +++ b/releases/v0.8/negotiation/message/contract-request-message.json @@ -0,0 +1,20 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:ContractRequestMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:offer": { + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "dspace:providerId": "urn:tsdshhs636378", + "dspace:consumerId": "urn:jashd766", + "odrl:permission": [{ + "odrl:action": "odrl:use" , + "odrl:constraint": [{ + "odrl:leftOperand": "odrl:dateTime", + "odrl:operand": "odrl:lteq", + "odrl:rightOperand": { "@value": "2023-12-31T06:00Z", "@type": "xsd:dateTime" } + }] + }] + }, + "dspace:callbackAddress": "https://......" +} diff --git a/releases/v0.8/negotiation/message/contract-request-message_initial.json b/releases/v0.8/negotiation/message/contract-request-message_initial.json new file mode 100644 index 0000000..5462605 --- /dev/null +++ b/releases/v0.8/negotiation/message/contract-request-message_initial.json @@ -0,0 +1,12 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:ContractRequestMessage", + "dspace:dataset": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:offer": { + "@type": "odrl:Offer", + "@id": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a89", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88" + }, + "dspace:callbackAddress": "https://......" +} diff --git a/releases/v0.8/negotiation/message/example/contract.agreement.message.http.transfer.json b/releases/v0.8/negotiation/message/example/contract.agreement.message.http.transfer.json new file mode 100644 index 0000000..d3e7c5c --- /dev/null +++ b/releases/v0.8/negotiation/message/example/contract.agreement.message.http.transfer.json @@ -0,0 +1,43 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:ContractAgreementMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:consumerId": "...", + "dspace:providerId": "...", + "dspace:agreement": { + "@id": "some-other-id", + "@type": "odrl:Agreement", + "odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", + "odrl:permission": [ + { + "@id": "some-permission-id", + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:equals", + "oderl:rightOperand": { + "@id": "dspace:HTTP_REST" + } + } + ] + } + ], + "odrl:duty": [ + { + "@id": "some-permission-id", + "odrl:action": "odrl:use", + "odrl:constraint": [ + { + "odrl:leftOperand": "dspace:TRANSPORT", + "odrl:operator": "odrl:equals", + "oderl:rightOperand": { + "@id": "dspace:HTTP_REST" + } + } + ] + } + ] + } +} diff --git a/releases/v0.8/negotiation/message/schema/contract-agreement-message-schema.json b/releases/v0.8/negotiation/message/schema/contract-agreement-message-schema.json new file mode 100644 index 0000000..fd057a7 --- /dev/null +++ b/releases/v0.8/negotiation/message/schema/contract-agreement-message-schema.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractAgreementMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractAgreementMessage" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/ContractAgreementMessageSchema", + "definitions": { + "ContractAgreementMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractAgreementMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:agreement": { + "$ref": "https://w3id.org/dspace/schemas/v0.8/contract-schema.json#/definitions/Agreement" + }, + "dspace:signature": { + "type": "object" + }, + "dspace:callbackAddress": { + "type" : "string" + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:agreement", "dspace:callbackAddress"] + } + } +} diff --git a/releases/v0.8/negotiation/message/schema/contract-agreement-verification-message-schema.json b/releases/v0.8/negotiation/message/schema/contract-agreement-verification-message-schema.json new file mode 100644 index 0000000..7f6fc26 --- /dev/null +++ b/releases/v0.8/negotiation/message/schema/contract-agreement-verification-message-schema.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractAgreementVerificationMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractAgreementVerificationMessage" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/ContractAgreementVerificationMessageSchema", + "definitions": { + "ContractAgreementVerificationMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractAgreementVerificationMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:hashedMessage": { + "type": "object", + "properties": { + "dspace:digest": { + "type": "string" + }, + "dspace:algorithm": { + "type": "string" + } + }, + "required": [ "dspace:digest", "dspace:algorithm"] + } + + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:hashedMessage" ] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/schema/contract-negotiation-error-schema.json b/releases/v0.8/negotiation/message/schema/contract-negotiation-error-schema.json new file mode 100644 index 0000000..d80df00 --- /dev/null +++ b/releases/v0.8/negotiation/message/schema/contract-negotiation-error-schema.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationErrorSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiationError" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/ContractNegotiationErrorSchema", + "definitions": { + "ContractNegotiationError": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractNegotiationError" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "minItems": 1, + "items": {} + }, + "dct:description": { + "type": "array", + "items": { + "@language": { + "type": "string" + }, + "@value": { + "type": "string" + } + }, + "required": [ "@language", "@value"] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid"] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/schema/contract-negotiation-event-message-schema.json b/releases/v0.8/negotiation/message/schema/contract-negotiation-event-message-schema.json new file mode 100644 index 0000000..393571b --- /dev/null +++ b/releases/v0.8/negotiation/message/schema/contract-negotiation-event-message-schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationEventMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiationEventMessage" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/ContractNegotiationEventMessageSchema", + "definitions": { + "ContractNegotiationEventMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractNegotiationEventMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:eventType": { + "type": "string", + "enum": [ + "dspace:ACCEPTED", + "dspace:FINALIZED" + ] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:eventType" ] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/schema/contract-negotiation-schema.json b/releases/v0.8/negotiation/message/schema/contract-negotiation-schema.json new file mode 100644 index 0000000..dd28f14 --- /dev/null +++ b/releases/v0.8/negotiation/message/schema/contract-negotiation-schema.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiation" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/ContractNegotiationSchema", + "definitions": { + "ContractNegotiation": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractNegotiation" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:state": { + "type": "string", + "enum": [ + "dspace:REQUESTED", + "dspace:OFFERED", + "dspace:ACCEPTED", + "dspace:AGREED", + "dspace:VERIFIED", + "dspace:FINALIZED", + "dspace:TERMINATED" + ] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:state" ] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/schema/contract-negotiation-termination-message-schema.json b/releases/v0.8/negotiation/message/schema/contract-negotiation-termination-message-schema.json new file mode 100644 index 0000000..d1fc86b --- /dev/null +++ b/releases/v0.8/negotiation/message/schema/contract-negotiation-termination-message-schema.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractNegotiationTerminationMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractNegotiationTerminationMessage" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/ContractNegotiationTerminationMessageSchema", + "definitions": { + "ContractNegotiationTerminationMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractNegotiationTerminationMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "minItems": 1, + "items": {} + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/schema/contract-offer-message-schema.json b/releases/v0.8/negotiation/message/schema/contract-offer-message-schema.json new file mode 100644 index 0000000..2d78671 --- /dev/null +++ b/releases/v0.8/negotiation/message/schema/contract-offer-message-schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractOfferMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractOfferMessage" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/ContractOfferMessageSchema", + "definitions": { + "ContractOfferMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractOfferMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "odrl:offer": { + "$ref": "https://w3id.org/dspace/schemas/v0.8/contract-schema.json#/definitions/Offer" + }, + "dspace:callbackAddress": { + "type" : "string" + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:offer", "dspace:callbackAddress" ] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/schema/contract-request-message-schema.json b/releases/v0.8/negotiation/message/schema/contract-request-message-schema.json new file mode 100644 index 0000000..e627794 --- /dev/null +++ b/releases/v0.8/negotiation/message/schema/contract-request-message-schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ContractRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContractRequestMessage" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/ContractRequestMessageSchema", + "definitions": { + "ContractRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:ContractRequestMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "odrl:offer": { + "$ref": "https://w3id.org/dspace/schemas/v0.8/contract-schema.json#/definitions/Offer" + }, + "dspace:callbackAddress": { + "type" : "string" + } + }, + "required": [ "@context", "@type", "dspace:consumerPid", "dspace:offer", "dspace:callbackAddress" ] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/schema/contract-schema.json b/releases/v0.8/negotiation/message/schema/contract-schema.json new file mode 100644 index 0000000..612703f --- /dev/null +++ b/releases/v0.8/negotiation/message/schema/contract-schema.json @@ -0,0 +1,365 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "PolicySchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Policy" + } + ], + "$id": "https://w3id.org/dspace/schemas/0/8/PolicySchema", + "definitions": { + "Policy": { + "oneOf": [ + { + "$ref": "#/definitions/Offer" + }, + { + "$ref": "#/definitions/Agreement" + } + ] + }, + "PolicyClass": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractPolicyRule" + }, + { + "properties": { + "@id": { + "type": "string" + }, + "odrl:profile": { + "type": "array", + "items": { + "$ref": "#/definitions/Reference" + } + }, + "odrl:permission": { + "type": "array", + "items": { + "$ref": "#/definitions/Permission" + }, + "minItems": 1 + }, + "odrl:obligation": { + "type": "array", + "items": { + "$ref": "#/definitions/Duty" + }, + "minItems": 1 + } + }, + "required": [ + "@id" + ] + } + ] + }, + "AbstractPolicyRule": { + "properties": { + "dspace:providerId": { + "type": "string" + }, + "dspace:consumerId": { + "type": "string" + } + } + }, + "Offer": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/PolicyClass" + }, + { + "properties": { + "@type": { + "type": "string", + "const": "odrl:Offer" + } + } + }, + { + "anyOf": [ + { + "required": [ + "odrl:permission" + ] + }, + { + "required": [ + "odrl:prohibition" + ] + } + ] + } + ], + "required": [ + "@type", + "dspace:providerId" + ] + }, + "Agreement": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/PolicyClass" + }, + { + "properties": { + "@type": { + "type": "string", + "const": "odrl:Agreement" + }, + "dspace:timestamp": { + "type": "string", + "pattern": "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?" + } + } + }, + { + "anyOf": [ + { + "required": [ + "odrl:permission" + ] + }, + { + "required": [ + "odrl:prohibition" + ] + } + ] + } + ], + "required": [ + "@type", + "dspace:providerId", + "dspace:consumerId", + "dspace:timestamp" + ] + }, + "RuleClass": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractPolicyRule" + }, + { + "properties": { + "odrl:action": { + "$ref": "#/definitions/Action" + }, + "odrl:constraint": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraint" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "odrl:action" + ] + }, + "Permission": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractPolicyRule" + }, + { + "properties": { + "odrl:action": { + "$ref": "#/definitions/Action" + }, + "odrl:constraint": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraint" + }, + "minItems": 1 + }, + "odrl:duty": { + "$ref": "#/definitions/Duty" + } + }, + "required": [ + "odrl:action" + ] + } + ] + }, + "Duty": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AbstractPolicyRule" + }, + { + "properties": { + "@id": { + "type": "string" + }, + "odrl:action": { + "$ref": "#/definitions/Action" + }, + "odrl:constraint": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraint" + } + } + }, + "required": [ + "odrl:action" + ] + } + ] + }, + "Action": { + "type": "string", + "enum": [ + "odrl:delete", + "odrl:execute", + "cc:SourceCode", + "odrl:anonymize", + "odrl:extract", + "odrl:read", + "odrl:index", + "odrl:compensate", + "odrl:sell", + "odrl:derive", + "odrl:ensureExclusivity", + "odrl:annotate", + "cc:Reproduction", + "odrl:translate", + "odrl:include", + "cc:DerivativeWorks", + "cc:Distribution", + "odrl:textToSpeech", + "odrl:inform", + "odrl:grantUse", + "odrl:archive", + "odrl:modify", + "odrl:aggregate", + "odrl:attribute", + "odrl:nextPolicy", + "odrl:digitize", + "cc:Attribution", + "odrl:install", + "odrl:concurrentUse", + "odrl:distribute", + "odrl:synchronize", + "odrl:move", + "odrl:obtainConsent", + "odrl:print", + "cc:Notice", + "odrl:give", + "odrl:uninstall", + "cc:Sharing", + "odrl:reviewPolicy", + "odrl:watermark", + "odrl:play", + "odrl:reproduce", + "odrl:transform", + "odrl:display", + "odrl:stream", + "cc:ShareAlike", + "odrl:acceptTracking", + "cc:CommericalUse", + "odrl:present", + "odrl:use" + ] + }, + "Constraint": { + "type": "object", + "properties": { + "odrl:rightOperand": { + "$ref": "#/definitions/RightOperand" + }, + "odrl:rightOperandReference": { + "$ref": "#/definitions/Reference" + }, + "odrl:leftOperand": { + "$ref": "#/definitions/LeftOperand" + }, + "odrl:operator": { + "$ref": "#/definitions/Operator" + } + } + }, + "Operator": { + "type": "string", + "enum": [ + "odrl:eq", + "odrl:gt", + "odrl:gteq", + "odrl:hasPart", + "odrl:isA", + "odrl:isAllOf", + "odrl:isAnyOf", + "odrl:isNoneOf", + "odrl:isPartOf", + "odrl:lt", + "odrl:term-lteq", + "odrl:neq" + ] + }, + "RightOperand": {}, + "LeftOperand": { + "type": "string", + "enum": [ + "odrl:absolutePosition", + "odrl:absoluteSize", + "odrl:absoluteSpatialPosition", + "odrl:absoluteTemporalPosition", + "odrl:count", + "odrl:dateTime", + "odrl:delayPeriod", + "odrl:deliveryChannel", + "odrl:device", + "odrl:elapsedTime", + "odrl:event", + "odrl:fileFormat", + "odrl:industry", + "odrl:language", + "odrl:media", + "odrl:meteredTime", + "odrl:payAmount", + "odrl:percentage", + "odrl:product", + "odrl:purpose", + "odrl:recipient", + "odrl:relativePosition", + "odrl:relativeSize", + "odrl:relativeSpatialPosition", + "odrl:relativeTemporalPosition", + "odrl:resolution", + "odrl:spatial", + "odrl:spatialCoordinates", + "odrl:system", + "odrl:systemDevice", + "odrl:timeInterval", + "odrl:unitOfCount", + "odrl:version", + "odrl:virtualLocation" + ] + }, + "Reference": { + "type": "object", + "properties": { + "@id": { + "type": "string" + } + }, + "required": [ + "@id" + ] + } + } +} diff --git a/releases/v0.8/negotiation/message/shape/contract-agreement-message-shape.ttl b/releases/v0.8/negotiation/message/shape/contract-agreement-message-shape.ttl new file mode 100644 index 0000000..437fd2b --- /dev/null +++ b/releases/v0.8/negotiation/message/shape/contract-agreement-message-shape.ttl @@ -0,0 +1,73 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractAgreementMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractAgreementMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:agreement ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:class odrl:Agreement ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementMessageShape): An dspace:agreement property must point to exactly one odrl:Agreement class."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:signature ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:callbackAddress ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementMessageShape): An dspace:callbackAddress property must point to exactly one xsd:string value."@en ; + ] +. \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/shape/contract-agreement-verification-message-shape.ttl b/releases/v0.8/negotiation/message/shape/contract-agreement-verification-message-shape.ttl new file mode 100644 index 0000000..f534042 --- /dev/null +++ b/releases/v0.8/negotiation/message/shape/contract-agreement-verification-message-shape.ttl @@ -0,0 +1,80 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractAgreementVerificationMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractAgreementVerificationMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementVerificationMessageShape): A dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementVerificationMessageShape): A dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:hashedMessage ; + sh:node [ + a sh:NodeShape ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:digest ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementVerificationMessageShape): A ContractAgreementVerificationMessage requires a dspace:hashedMessage which has exactly one dspace:digest property pointing to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:algorithm ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementVerificationMessageShape): A ContractAgreementVerificationMessage requires a dspace:hashedMessage which has exactly one dspace:algorithm property pointing to exactly one xsd:string value."@en ; + ] ; + ] ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractAgreementVerificationMessageShape): A dspace:hashedMessage property must point to exactly one hashed message object."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/shape/contract-negotiation-error-shape.ttl b/releases/v0.8/negotiation/message/shape/contract-negotiation-error-shape.ttl new file mode 100644 index 0000000..3839fb1 --- /dev/null +++ b/releases/v0.8/negotiation/message/shape/contract-negotiation-error-shape.ttl @@ -0,0 +1,73 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationErrorShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiationError ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationErrorShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationErrorShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationErrorShape): An dspace:code property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:reason ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationErrorShape): An dspace:reason property must point to rdf:langString values."@en ; + ] ; + 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 zero or more rdf:langString values."@en ; + ] +. \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/shape/contract-negotiation-event-message-shape.ttl b/releases/v0.8/negotiation/message/shape/contract-negotiation-event-message-shape.ttl new file mode 100644 index 0000000..4ba5904 --- /dev/null +++ b/releases/v0.8/negotiation/message/shape/contract-negotiation-event-message-shape.ttl @@ -0,0 +1,60 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationEventMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiationEventMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationEventMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationEventMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:eventType ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationEventMessageShape): An dspace:eventType property must point to exactly one xsd:string value."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/shape/contract-negotiation-message-shape.ttl b/releases/v0.8/negotiation/message/shape/contract-negotiation-message-shape.ttl new file mode 100644 index 0000000..d92d53d --- /dev/null +++ b/releases/v0.8/negotiation/message/shape/contract-negotiation-message-shape.ttl @@ -0,0 +1,51 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiationMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationMessageShape): An dspace:providerPid property must point to exactly one xsd:string."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationMessageShape): An dspace:consumerPid property must point to exactly one xsd:string."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/shape/contract-negotiation-shape.ttl b/releases/v0.8/negotiation/message/shape/contract-negotiation-shape.ttl new file mode 100644 index 0000000..2b3eac5 --- /dev/null +++ b/releases/v0.8/negotiation/message/shape/contract-negotiation-shape.ttl @@ -0,0 +1,69 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiation ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationShape): An dspace:providerPid property must point to exactly one xsd:string."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationShape): An dspace:consumerPid property must point to exactly one xsd:string."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:state ; + sh:in ( + dspace:REQUESTED + dspace:OFFERED + dspace:ACCEPTED + dspace:AGREED + dspace:VERIFIED + dspace:FINALIZED + dspace:TERMINATED + ) ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationShape): An dspace:state property must point to exactly one dspace:NegotiationState entity."@en ; + ] + +. \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/shape/contract-negotiation-termination-message-shape.ttl b/releases/v0.8/negotiation/message/shape/contract-negotiation-termination-message-shape.ttl new file mode 100644 index 0000000..f3ad5f7 --- /dev/null +++ b/releases/v0.8/negotiation/message/shape/contract-negotiation-termination-message-shape.ttl @@ -0,0 +1,61 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractNegotiationTerminationMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractNegotiationTerminationMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationTerminationMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractNegotiationTerminationMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:reason ; + ] + +. \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/shape/contract-offer-message-shape.ttl b/releases/v0.8/negotiation/message/shape/contract-offer-message-shape.ttl new file mode 100644 index 0000000..69ae234 --- /dev/null +++ b/releases/v0.8/negotiation/message/shape/contract-offer-message-shape.ttl @@ -0,0 +1,69 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractOfferMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractOfferMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractOfferMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractOfferMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:offer ; + sh:class odrl:Offer ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractOfferMessageShape): A dspace:offer property must point to exactly one odrl:Offer class."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:callbackAddress ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractOfferMessageShape): A dspace:callbackAddress property must point to exactly one xsd:string value."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/v0.8/negotiation/message/shape/contract-request-message-shape.ttl b/releases/v0.8/negotiation/message/shape/contract-request-message-shape.ttl new file mode 100644 index 0000000..68f94ff --- /dev/null +++ b/releases/v0.8/negotiation/message/shape/contract-request-message-shape.ttl @@ -0,0 +1,69 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:ContractRequestMessageShape + a sh:NodeShape ; + sh:targetClass dspace:ContractRequestMessage ; + rdfs:subClassOf dspace_shapes:ContractNegotiationMessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An dspace:providerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An dspace:consumerPid property must point to exactly one xsd:string value."@en ; + ] ; + sh:property [ + a sh:PropertyShape ; + sh:path dspace:offer ; + sh:class odrl:Offer ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An dspace:offer property must point to exactly one odrl:Offer class."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:callbackAddress ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (ContractRequestMessageShape): An dspace:callbackAddress property must point to exactly one xsd:string value."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/v0.8/transfer/message/schema/transfer-completion-message-schema.json b/releases/v0.8/transfer/message/schema/transfer-completion-message-schema.json new file mode 100644 index 0000000..840a3ca --- /dev/null +++ b/releases/v0.8/transfer/message/schema/transfer-completion-message-schema.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferCompletionMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferCompletionMessage" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/TransferCompletionMessageSchema", + "definitions": { + "TransferCompletionMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferCompletionMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/transfer/message/schema/transfer-error-schema.json b/releases/v0.8/transfer/message/schema/transfer-error-schema.json new file mode 100644 index 0000000..1a68d79 --- /dev/null +++ b/releases/v0.8/transfer/message/schema/transfer-error-schema.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferErrorSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferError" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/TransferErrorSchema", + "definitions": { + "TransferError": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferError" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "minItems": 1, + "items": { + + } + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid"] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/transfer/message/schema/transfer-process-schema.json b/releases/v0.8/transfer/message/schema/transfer-process-schema.json new file mode 100644 index 0000000..9045565 --- /dev/null +++ b/releases/v0.8/transfer/message/schema/transfer-process-schema.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferProcessSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferProcess" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/TransferProcessSchema", + "definitions": { + "TransferProcess": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferProcess" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:state": { + "type": "string", + "enum": [ + "dspace:REQUESTED", + "dspace:STARTED", + "dspace:TERMINATED", + "dspace:COMPLETED", + "dspace:SUSPENDED" + ] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:consumerPid", "dspace:state" ] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/transfer/message/schema/transfer-request-message-schema.json b/releases/v0.8/transfer/message/schema/transfer-request-message-schema.json new file mode 100644 index 0000000..eb84507 --- /dev/null +++ b/releases/v0.8/transfer/message/schema/transfer-request-message-schema.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferRequestMessage" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/TransferRequestMessageSchema", + "definitions": { + "TransferRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferRequestMessage" + }, + "dspace:agreementId": { + "type": "string" + }, + "dct:format": { + "type": "string" + }, + "dspace:dataAddress": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "dspace:DataAddress" + }, + "dspace:endpointType": { + "type": "string" + }, + "dspace:endpoint": { + "type": "string" + }, + "dspace:endpointProperties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "dspace:EndpointProperty" + }, + "dspace:name": { + "type": "string" + }, + "dspace:value": { + "type": "string" + } + }, + "required": ["@type", "dspace:name", "dspace:value"] + } + } + }, + "required": ["@type", "dspace:endpointType", "dspace:endpoint"] + }, + "dspace:callbackAddress": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + } + }, + "required": [ "@context", "@type", "dspace:agreementId", "dct:format", "dspace:callbackAddress", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/transfer/message/schema/transfer-start-message-schema.json b/releases/v0.8/transfer/message/schema/transfer-start-message-schema.json new file mode 100644 index 0000000..1a46166 --- /dev/null +++ b/releases/v0.8/transfer/message/schema/transfer-start-message-schema.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferStartMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferStartMessage" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/TransferStartMessageSchema", + "definitions": { + "TransferStartMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferStartMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:dataAddress": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "dspace:DataAddress" + }, + "dspace:endpointType": { + "type": "string" + }, + "dspace:endpoint": { + "type": "string" + }, + "dspace:endpointProperties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "dspace:EndpointProperty" + }, + "dspace:name": { + "type": "string" + }, + "dspace:value": { + "type": "string" + } + }, + "required": ["@type", "dspace:name", "dspace:value"] + } + } + }, + "required": ["@type", "dspace:endpointType", "dspace:endpoint"] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/transfer/message/schema/transfer-suspension-message-schema.json b/releases/v0.8/transfer/message/schema/transfer-suspension-message-schema.json new file mode 100644 index 0000000..b27afb6 --- /dev/null +++ b/releases/v0.8/transfer/message/schema/transfer-suspension-message-schema.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferSuspensionMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferSuspensionMessage" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/TransferSuspensionMessageSchema", + "definitions": { + "TransferSuspensionMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferSuspensionMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "minItems": 1, + "items": { + + } + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/transfer/message/schema/transfer-termination-message-schema.json b/releases/v0.8/transfer/message/schema/transfer-termination-message-schema.json new file mode 100644 index 0000000..2df323a --- /dev/null +++ b/releases/v0.8/transfer/message/schema/transfer-termination-message-schema.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferTerminationMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferTerminationMessage" + } + ], + "$id": "https://w3id.org/dspace/schemas/v0.8/TransferTerminationMessageSchema", + "definitions": { + "TransferTerminationMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/v0.8/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferTerminationMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "minItems": 1, + "items": { + + } + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ No newline at end of file diff --git a/releases/v0.8/transfer/message/shape/transfer-completion-message-shape.ttl b/releases/v0.8/transfer/message/shape/transfer-completion-message-shape.ttl new file mode 100644 index 0000000..548552a --- /dev/null +++ b/releases/v0.8/transfer/message/shape/transfer-completion-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 dspace: . +@prefix dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferCompletionMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferCompletionMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferCompletionMessageShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferCompletionMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + +. \ No newline at end of file diff --git a/releases/v0.8/transfer/message/shape/transfer-data-address-shape.ttl b/releases/v0.8/transfer/message/shape/transfer-data-address-shape.ttl new file mode 100644 index 0000000..0b2939e --- /dev/null +++ b/releases/v0.8/transfer/message/shape/transfer-data-address-shape.ttl @@ -0,0 +1,85 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +shapes:DataAddressShape + a sh:NodeShape ; + sh:targetClass dspace:DataAddress ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:endpointType ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (DataAddressShape): An dspace:endpointType property must point exactly one xsd:anyURI field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:endpoint ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (DataAddressShape): An dspace:endpoint property must point exactly one xsd:anyURI field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:endpointProperties ; + sh:class dspace:EndpointProperty ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (TransferErrorShape): An dspace:endpointProperties property must point to zero or more dspace:EndpointProperty."@en ; + ] ; + +. + +shapes:EndpointPropertyShape + sh:targetClass dspace:EndpointProperty ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:name ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (EndpointPropertyShape): An dspace:name property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:value ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (EndpointPropertyShape): An dspace:value property must point exactly one xsd:string field."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/v0.8/transfer/message/shape/transfer-error-shape.ttl b/releases/v0.8/transfer/message/shape/transfer-error-shape.ttl new file mode 100644 index 0000000..f7e831e --- /dev/null +++ b/releases/v0.8/transfer/message/shape/transfer-error-shape.ttl @@ -0,0 +1,70 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferErrorShape + a sh:NodeShape ; + sh:targetClass dspace:TransferError ; + rdfs:subClassOf dspace:MessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferErrorShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferErrorShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (TransferErrorShape): An dspace:code property must point from an dspace:TransferError to exactly one dspace:TerminationCode."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:reason ; + sh:datatype rdf:langString ; + sh:severity sh:Violation ; + sh:message " (TransferErrorShape): An dspace:reason property must point to rdf:langString values."@en ; + ] ; + +. \ No newline at end of file diff --git a/releases/v0.8/transfer/message/shape/transfer-process-shape.ttl b/releases/v0.8/transfer/message/shape/transfer-process-shape.ttl new file mode 100644 index 0000000..50036df --- /dev/null +++ b/releases/v0.8/transfer/message/shape/transfer-process-shape.ttl @@ -0,0 +1,68 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferProcessShape + a sh:NodeShape ; + sh:targetClass dspace:TransferProcess ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferProcessShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferProcessShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:state ; + sh:in ( + dspace:REQUESTED + dspace:STARTED + dspace:TERMINATED + dspace:COMPLETED + dspace:SUSPENDED + ) ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferProcessShape): An dspace:state property must point exactly one dspace:TransferState entity."@en ; + ] ; + +. \ No newline at end of file diff --git a/releases/v0.8/transfer/message/shape/transfer-request-message-shape.ttl b/releases/v0.8/transfer/message/shape/transfer-request-message-shape.ttl new file mode 100644 index 0000000..236fd19 --- /dev/null +++ b/releases/v0.8/transfer/message/shape/transfer-request-message-shape.ttl @@ -0,0 +1,81 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferRequestMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferRequestMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:agreementId ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferRequestMessageShape): An dspace: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 dspace:dataAddress ; + sh:class dspace:DataAddress ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:message " (TransferRequestMessageShape): An dspace:dataAddress property must point zero or one dspace:DataAddress field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:callbackAddress ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferRequestMessageShape): An dspace:callbackAddress property must point exactly one xsd:anyURI field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferRequestMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; +. \ No newline at end of file diff --git a/releases/v0.8/transfer/message/shape/transfer-start-message-shape.ttl b/releases/v0.8/transfer/message/shape/transfer-start-message-shape.ttl new file mode 100644 index 0000000..7455d3e --- /dev/null +++ b/releases/v0.8/transfer/message/shape/transfer-start-message-shape.ttl @@ -0,0 +1,63 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferStartMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferStartMessage ; + rdfs:subClassOf dspace:MessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferStartMessageShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferStartMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:dataAddress ; + sh:class dspace:DataAddress ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:severity sh:Violation ; + sh:message " (TransferStartMessageShape): An dspace:dataAddress property must point from an dspace:TransferStartMessage to exactly one dspace:DataAddress field."@en ; + ] ; + +. \ No newline at end of file diff --git a/releases/v0.8/transfer/message/shape/transfer-suspension-message-shape.ttl b/releases/v0.8/transfer/message/shape/transfer-suspension-message-shape.ttl new file mode 100644 index 0000000..35615cd --- /dev/null +++ b/releases/v0.8/transfer/message/shape/transfer-suspension-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 dspace: . +@prefix dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferSuspensionMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferSuspensionMessage ; + rdfs:subClassOf dspace:MessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferSuspensionMessageShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferSuspensionMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + +. \ No newline at end of file diff --git a/releases/v0.8/transfer/message/shape/transfer-termination-message-shape.ttl b/releases/v0.8/transfer/message/shape/transfer-termination-message-shape.ttl new file mode 100644 index 0000000..432e07f --- /dev/null +++ b/releases/v0.8/transfer/message/shape/transfer-termination-message-shape.ttl @@ -0,0 +1,63 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/v0.8/"^^xsd:anyURI ; + ] ; +. + +shapes:TransferTerminationMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferTerminationMessage ; + rdfs:subClassOf dspace:MessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferTerminationMessageShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferTerminationMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (TransferTerminationMessageShape): An dspace:code property must point from an dspace:TransferTerminationMessage to exactly one entity."@en ; + ] ; + +. \ No newline at end of file diff --git a/releases/v0.8/transfer/message/transfer-completion-message.json b/releases/v0.8/transfer/message/transfer-completion-message.json new file mode 100644 index 0000000..6ee3ef7 --- /dev/null +++ b/releases/v0.8/transfer/message/transfer-completion-message.json @@ -0,0 +1,6 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:TransferCompletionMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833" +} diff --git a/releases/v0.8/transfer/message/transfer-error.json b/releases/v0.8/transfer/message/transfer-error.json new file mode 100644 index 0000000..9c42f0b --- /dev/null +++ b/releases/v0.8/transfer/message/transfer-error.json @@ -0,0 +1,11 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:TransferError", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + {}, + {} + ] +} diff --git a/releases/v0.8/transfer/message/transfer-process.json b/releases/v0.8/transfer/message/transfer-process.json new file mode 100644 index 0000000..b1a6fff --- /dev/null +++ b/releases/v0.8/transfer/message/transfer-process.json @@ -0,0 +1,7 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:TransferProcess", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:state": "dspace:REQUESTED" +} \ No newline at end of file diff --git a/releases/v0.8/transfer/message/transfer-request-message.json b/releases/v0.8/transfer/message/transfer-request-message.json new file mode 100644 index 0000000..cef1e1e --- /dev/null +++ b/releases/v0.8/transfer/message/transfer-request-message.json @@ -0,0 +1,20 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:TransferRequestMessage", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:agreementId": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44", + "dct:format": "dspace:S3_AWS_PUSH", + "dspace:dataAddress": { + "@type": "dspace:DataAddress", + "dspace:endpointType": "https://w3id.org/idsa/v4.1/HTTP", + "dspace:endpoint": "http://example.com", + "dspace:endpointProperties": [ + { + "@type": "dspace:EndpointProperty", + "dspace:name": "Authorization", + "dspace:value": "Bearer TOKEN-ABCDEFG" + } + ] + }, + "dspace:callbackAddress": "https://......" +} diff --git a/releases/v0.8/transfer/message/transfer-start-message.json b/releases/v0.8/transfer/message/transfer-start-message.json new file mode 100644 index 0000000..04a6874 --- /dev/null +++ b/releases/v0.8/transfer/message/transfer-start-message.json @@ -0,0 +1,7 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:TransferStartMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:dataAddress": "https://......" +} diff --git a/releases/v0.8/transfer/message/transfer-suspension-message.json b/releases/v0.8/transfer/message/transfer-suspension-message.json new file mode 100644 index 0000000..bb3fc94 --- /dev/null +++ b/releases/v0.8/transfer/message/transfer-suspension-message.json @@ -0,0 +1,11 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:TransferSuspensionMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + {}, + {} + ] +} diff --git a/releases/v0.8/transfer/message/transfer-termination-message.json b/releases/v0.8/transfer/message/transfer-termination-message.json new file mode 100644 index 0000000..967dfb1 --- /dev/null +++ b/releases/v0.8/transfer/message/transfer-termination-message.json @@ -0,0 +1,11 @@ +{ + "@context": "https://w3id.org/dspace/v0.8/context.json", + "@type": "dspace:TransferTerminationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + {}, + {} + ] +} diff --git a/resources/figures/ProtocolOverview.png b/resources/figures/ProtocolOverview.png new file mode 100644 index 0000000..fb75be5 Binary files /dev/null and b/resources/figures/ProtocolOverview.png differ diff --git a/resources/list_common.md b/resources/list_common.md new file mode 100644 index 0000000..e67aa24 --- /dev/null +++ b/resources/list_common.md @@ -0,0 +1,8 @@ +# Common + +* [Context (json)](./../common/schema/context.json) +* [Definitions schema (json)](./../common/schema/definitions.schema.json) +* [Version schema (json)](./../common/schema/version-schema.json) +* [ODRL shape (ttl)](./../common/shape/odrl-shapes.ttl) +* [Version shape (ttl)](./../common/shape/odrl-shapes.ttl) +* [Diagram styles (puml)](./../common/style/diagram.styles.puml) \ No newline at end of file diff --git a/resources/list_figures.md b/resources/list_figures.md new file mode 100644 index 0000000..3377f72 --- /dev/null +++ b/resources/list_figures.md @@ -0,0 +1,52 @@ +# Figures + +* [Protocol Overview (png)](./figures/ProtocolOverview.png) +* [Dataspace Relations (png)](./../model/m.dataspace.relationships.png) +* [Dataspace Relations (source)](./../model/m.dataspace.relationships.puml) +* [Participant Entities (png)](./../model/m.participant.entities.png) +* [Participant Entities (source)](./../model/m.participant.entities.drawio) + +## Catalog + +* [Catalog (png)](./../catalog/message/diagram/catalog.png) +* [Catalog (source)](./../catalog/message/diagram/catalog.puml) +* [Catalog error message (png)](./../catalog/message/diagram/catalog-error.png) +* [Catalog error message (source)](./../catalog/message/diagram/catalog-error.puml) +* [Catalog request message (png)](./../catalog/message/diagram/catalog-request-message.png) +* [Catalog request message (source)](./../catalog/message/diagram/catalog-request-message.puml) + +## Contract Negotiation + +* [Contract agreement message (png)](./../negotiation/message/diagram/contract-agreement-message.png) +* [Contract agreement message (source)](./../negotiation/message/diagram/contract-agreement-message.puml) +* [Contract agreement verification message (png)](./../negotiation/message/diagram/contract-agreement-verification-message.png) +* [Contract agreement verification message (source)](./../negotiation/message/diagram/contract-agreement-verification-message.puml) +* [Contract negotiation (png)](./../negotiation/message/diagram/contract-negotiation.png) +* [Contract negotiation (source)](./../negotiation/message/diagram/contract-negotiation.puml) +* [Contract negotiation error (png)](./../negotiation/message/diagram/contract-negotiation-error.png) +* [Contract negotiation error (source)](./../negotiation/message/diagram/contract-negotiation-error.puml) +* [Contract negotiation event message (png)](./../negotiation/message/diagram/contract-negotiation-event-message.png) +* [Contract negotiation event message (source)](./../negotiation/message/diagram/contract-negotiation-event-message.puml) +* [Contract negotiation termination message (png)](./../negotiation/message/diagram/contract-negotiation-termination-message.png) +* [Contract negotiation termination message (source)](./../negotiation/message/diagram/contract-negotiation-termination-message.puml) +* [Contract offer message (png)](./../negotiation/message/diagram/contract-offer-message.png) +* [Contract offer message (source)](./../negotiation/message/diagram/contract-offer-message.puml) +* [Contract request message (png)](./../negotiation/message/diagram/contract-request-message.png) +* [Contract request message (source)](./../negotiation/message/diagram/contract-request-message.puml) + +## Transfer Process + +* [Transfer completion message (png)](./../transfer/message/diagram/transfer-completion-message.png) +* [Transfer completion message (source)](./../transfer/message/diagram/transfer-completion-message.puml) +* [Transfer error (png)](./../transfer/message/diagram/transfer-error.png) +* [Transfer error (source)](./../transfer/message/diagram/transfer-error.puml) +* [Transfer prcess (png)](./../transfer/message/diagram/transfer-process.png) +* [Transfer prcess (source)](./../transfer/message/diagram/transfer-process.puml) +* [Transfer request message (png)](./../transfer/message/diagram/transfer-request-message.png) +* [Transfer request message (source)](./../transfer/message/diagram/transfer-request-message.puml) +* [Transfer start message (png)](./../transfer/message/diagram/transfer-start-message.png) +* [Transfer start message (source)](./../transfer/message/diagram/transfer-start-message.puml) +* [Transfer suspension message (png)](./../transfer/message/diagram/transfer-suspension-message.png) +* [Transfer suspension message (source)](./../transfer/message/diagram/transfer-suspension-message.puml) +* [Transfer termination message (png)](./../transfer/message/diagram/transfer-termination-message.png) +* [Transfer termination message (source)](./../transfer/message/diagram/transfer-termination-message.puml) \ No newline at end of file diff --git a/resources/list_messages.md b/resources/list_messages.md new file mode 100644 index 0000000..4f6e11f --- /dev/null +++ b/resources/list_messages.md @@ -0,0 +1,30 @@ +# Messages + +## Catalog + +* [Catalog (json)](./../catalog/message/example/catalog.json) +* [Catalog error message (json)](./../catalog/message/example/catalog-error.json) +* [Catalog request message (json)](./../catalog/message/example/catalog-request-message.json) +* [Dataset (json)](./../catalog/message/example/dataset.json) +* [Dataset request message (json)](./../catalog/message/example/dataset-request-message.json) + +## Contract Negotiation + +* [Contract agreement message (json)](./../negotiation/message/example/contract-agreement-message.json) +* [Contract agreement verification message (json)](./../negotiation/message/example/contract-agreement-verification-message.json) +* [Contract negotiation (json)](./../negotiation/message/example/contract-negotiation.json) +* [Contract negotiation error (json)](./../negotiation/message/example/contract-negotiation-error.json) +* [Contract negotiation event message (json)](./../negotiation/message/example/contract-negotiation-event-message.json) +* [Contract negotiation termination message (json)](./../negotiation/message/example/contract-negotiation-termination-message.json) +* [Contract offer message (json)](./../negotiation/message/example/contract-offer-message.json) +* [Contract request message (json)](./../negotiation/message/example/contract-request-message.json) + +## Transfer Process + +* [Transfer completion message (json)](./../transfer/message/example/transfer-completion-message.json) +* [Transfer error (json)](./../transfer/message/example/transfer-error.json) +* [Transfer process (json)](./../transfer/message/example/transfer-process.json) +* [Transfer request message (json)](./../transfer/message/example/transfer-request-message.json) +* [Transfer start message (json)](./../transfer/message/example/transfer-start-message.json) +* [Transfer suspension message (json)](./../transfer/message/example/transfer-suspension-message.json) +* [Transfer termination message (json)](./../transfer/message/example/transfer-termination-message.json) diff --git a/resources/list_schemes.md b/resources/list_schemes.md new file mode 100644 index 0000000..fa7510d --- /dev/null +++ b/resources/list_schemes.md @@ -0,0 +1,30 @@ +# Schemes + +## Catalog + +* [Catalog error schema (json)](./../catalog/message/schema/catalog-error-schema.json) +* [Catalog request message schema (json)](./../catalog/message/schema/catalog-request-message-schema.json) +* [Catalog schema (json)](./../catalog/message/schema/catalog-schema.json) +* [Dataset request message schema (json)](./../catalog/message/schema/dataset-request-message-schema.json) +* [Dataset schema (json)](./../catalog/message/schema/dataset-schema.json) + +## Contract Negotiation + +* [Contract agreement schema (json)](./../negotiation/message/schema/contract-agreement-message-schema.json) +* [Contract agreement verification schema (json)](./../negotiation/message/schema/contract-agreement-verification-message-schema.json) +* [Contract negotiation error schema (json)](./../negotiation/message/schema/contract-negotiation-error-schema.json) +* [Contract negotiation event schema (json)](./../negotiation/message/schema/contract-negotiation-event-message-schema.json) +* [Contract negotiation schema (json)](./../negotiation/message/schema/contract-negotiation-schema.json) +* [Contract negotiation termination schema (json)](./../negotiation/message/schema/contract-negotiation-termination-message-schema.json) +* [Contract offer message schema (json)](./../negotiation/message/schema/contract-offer-message-schema.json) +* [Contract request schema (json)](./../negotiation/message/schema/contract-request-message-schema.json) + +## Transfer Process + +* [Transfer completion schema (json)](./../transfer/message/schema/transfer-completion-message-schema.json) +* [Transfer error schema (json)](./../transfer/message/schema/transfer-error-schema.json) +* [Transfer prcess schema (json)](./../transfer/message/schema/transfer-process-schema.json) +* [Transfer request schema (json)](./../transfer/message/schema/transfer-request-message-schema.json) +* [Transfer start schema (json)](./../transfer/message/schema/transfer-start-message-schema.json) +* [Transfer suspension schema (json)](./../transfer/message/schema/transfer-suspension-message-schema.json) +* [Transfer termination schema (json)](./../transfer/message/schema/transfer-termination-message-schema.json) \ No newline at end of file diff --git a/resources/list_shapes.md b/resources/list_shapes.md new file mode 100644 index 0000000..fd7896e --- /dev/null +++ b/resources/list_shapes.md @@ -0,0 +1,30 @@ +# Shapes + +## Catalog + +* [Catalog error shape (ttl)](./../catalog/message/shape/catalog-error-shape.ttl) +* [Catalog request message shape (ttl)](./../catalog/message/shape/catalog-request-message-shape.ttl) +* [Dataset request message shape (ttl)](./../catalog/message/shape/dataset-request-message-shape.ttl) +* [DCAT shapes (ttl)](./../catalog/message/shape/dcat-shapes.ttl) + +## Contract Negotiation + +* [Contract agreement shape (ttl)](./../negotiation/message/shape/contract-agreement-message-shape.ttl) +* [Contract agreement verification shape (ttl)](./../negotiation/message/shape/contract-agreement-verification-message-shape.ttl) +* [Contract negotiation error shape (ttl)](./../negotiation/message/shape/contract-negotiation-error-shape.ttl) +* [Contract negotiation event shape (ttl)](./../negotiation/message/shape/contract-negotiation-event-message-shape.ttl) +* [Contract negotiation message shape (ttl)](./../negotiation/message/shape/contract-negotiation-message-shape.ttl) +* [Contract negotiation shape (ttl)](./../negotiation/message/shape/contract-negotiation-shape.ttl) +* [Contract negotiation termination shape (ttl)](./../negotiation/message/shape/contract-negotiation-termination-message-shape.ttl) +* [Contract offer message shape (ttl)](./../negotiation/message/shape/contract-offer-message-shape.ttl) +* [Contract request shape (ttl)](./../negotiation/message/shape/contract-request-message-shape.ttl) + +## Transfer Process + +* [Transfer completion shape (ttl)](./../transfer/message/shape/transfer-completion-message-shape.ttl) +* [Transfer error shape (ttl)](./../transfer/message/shape/transfer-error-shape.ttl) +* [Transfer prcess shape (ttl)](./../transfer/message/shape/transfer-process-shape.ttl) +* [Transfer request shape (ttl)](./../transfer/message/shape/transfer-request-message-shape.ttl) +* [Transfer start shape (ttl)](./../transfer/message/shape/transfer-start-message-shape.ttl) +* [Transfer suspension shape (ttl)](./../transfer/message/shape/transfer-suspension-message-shape.ttl) +* [Transfer termination shape (ttl)](./../transfer/message/shape/transfer-termination-message-shape.ttl) \ No newline at end of file diff --git a/transfer/figures/pull-transfer-process.png b/transfer/figures/pull-transfer-process.png new file mode 100644 index 0000000..ed925de Binary files /dev/null and b/transfer/figures/pull-transfer-process.png differ diff --git a/transfer/figures/pull-transfer-process.puml b/transfer/figures/pull-transfer-process.puml new file mode 100644 index 0000000..d207442 --- /dev/null +++ b/transfer/figures/pull-transfer-process.puml @@ -0,0 +1,42 @@ +@startuml "pull-transfer-process" +!pragma layout smetana + +!include ../../common/style/diagram.styles.puml + +hide empty description + +skinparam defaultTextAlignment center + +box Consumer +participant DataPlane_C +participant ControlPlane_C +end box + +box Provider +participant ControlPlane_P +participant DataPlane_P +end box + +activate ControlPlane_C +activate ControlPlane_P + +ControlPlane_C -> ControlPlane_P : TransferRequestMessage + +ControlPlane_P -> ControlPlane_C : TransferStartMessage(dataAddress) + +activate DataPlane_C +activate DataPlane_P +DataPlane_C -> DataPlane_P : pull data +deactivate DataPlane_P +deactivate DataPlane_C + +alt "Consumer ends TP" + ControlPlane_C -> ControlPlane_P : TransferCompletionMessage +else "Provider ends TP" + ControlPlane_P -> ControlPlane_C : TransferCompletionMessage +end + +deactivate ControlPlane_C +deactivate ControlPlane_P + +@enduml diff --git a/transfer/figures/push-transfer-process.png b/transfer/figures/push-transfer-process.png new file mode 100644 index 0000000..8b53c23 Binary files /dev/null and b/transfer/figures/push-transfer-process.png differ diff --git a/transfer/figures/push-transfer-process.puml b/transfer/figures/push-transfer-process.puml new file mode 100644 index 0000000..55ac336 --- /dev/null +++ b/transfer/figures/push-transfer-process.puml @@ -0,0 +1,38 @@ +@startuml "push-transfer-process" +!pragma layout smetana + +!include ../../common/style/diagram.styles.puml + +hide empty description + +skinparam defaultTextAlignment center + +box Consumer +participant DataPlane_C +participant ControlPlane_C +end box + +box Provider +participant ControlPlane_P +participant DataPlane_P +end box + +activate ControlPlane_C +activate ControlPlane_P + +ControlPlane_C -> ControlPlane_P : TransferRequestMessage(dataAddress) + +ControlPlane_P -> ControlPlane_C : TransferStartMessage + +activate DataPlane_C +activate DataPlane_P +DataPlane_P -> DataPlane_C : push data +deactivate DataPlane_P +deactivate DataPlane_C + +ControlPlane_P -> ControlPlane_C : TransferCompletionMessage + +deactivate ControlPlane_C +deactivate ControlPlane_P + +@enduml \ No newline at end of file diff --git a/transfer/figures/transfer-process-state-machine.png b/transfer/figures/transfer-process-state-machine.png new file mode 100644 index 0000000..363ec64 Binary files /dev/null and b/transfer/figures/transfer-process-state-machine.png differ diff --git a/transfer/figures/transfer-process-state-machine.puml b/transfer/figures/transfer-process-state-machine.puml new file mode 100644 index 0000000..0a7c5d5 --- /dev/null +++ b/transfer/figures/transfer-process-state-machine.puml @@ -0,0 +1,29 @@ +@startuml "transfer-process-state-machine" +!pragma layout smetana + +!include ../common/style/diagram.styles.puml + +hide empty description + +state REQUESTED: TransferRequestMessage +state STARTED: TransferStartMessage +state COMPLETED: TransferCompletionMessage +state SUSPENDED: TransferSuspensionMessage + +state TERMINATED $lightRed #$borderRed : TransferTerminationMessage + +[*] --> REQUESTED: C +REQUESTED --> STARTED: P +REQUESTED --> TERMINATED: C/P + +STARTED --> COMPLETED: P/C +STARTED --> SUSPENDED: P/C +STARTED --> TERMINATED: P/C + +SUSPENDED --> STARTED: P/C +SUSPENDED --> TERMINATED: P/C + +COMPLETED -->[*] +TERMINATED --> [*] + +@enduml diff --git a/transfer/message/diagram/transfer-completion-message.png b/transfer/message/diagram/transfer-completion-message.png new file mode 100644 index 0000000..08baf77 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 0000000..ceacc80 --- /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 "dspace:TransferCompletionMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:TransferCompletionMessage" + dspace:providerPid : String + dspace:consumerPid : 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 0000000..640f3d5 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 0000000..50355db --- /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 "dspace:TransferError" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:TransferError" + dspace:providerPid : String + dspace:consumerPid : String + dspace:code : String + dspace: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 0000000..19665b0 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 0000000..6e063bb --- /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 "dspace:TransferProcess" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:TransferProcess" + dspace:providerPid : String + dspace:consumerPid : String +} + + +enum dspace:TransferState { + "dspace:REQUESTED" + "dspace:STARTED" + "dspace:TERMINATED" + "dspace:COMPLETED" + "dspace:SUSPENDED" +} + +"dspace:TransferProcess" "1" *-- "1" "dspace:TransferState" : "dspace:state" + +@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 0000000..a3769dc 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 0000000..1a6d4fa --- /dev/null +++ b/transfer/message/diagram/transfer-request-message.puml @@ -0,0 +1,34 @@ +@startuml "transfer-request-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "dspace:TransferRequestMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:TransferRequestMessage" + dspace:consumerPid : String + dspace:agreementId : String + dct:format : String + dspace:callbackAddress : String +} + +class "dspace:DataAddress" { + @type : "dspace:DataAddress" + dspace:endpointType : String + dspace:endpoint : String +} + +class "dspace:EndpointProperty" { + @type : "dspace:EndpointProperty" + dspace:name : String + dspace:value : String +} + +"dspace:TransferRequestMessage" "1" *-- "0..1" "dspace:DataAddress" : "dspace:dataAddress" +"dspace:DataAddress" "1" *-- "0..*" "dspace:EndpointProperty" : "dspace:endpointProperties" + + +@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 0000000..3191c48 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 0000000..8a598e5 --- /dev/null +++ b/transfer/message/diagram/transfer-start-message.puml @@ -0,0 +1,32 @@ +@startuml "transfer-start-message" +!pragma layout smetana + +!include ../../../common/style/diagram.styles.puml + +hide empty description + + +class "dspace:TransferStartMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:TransferStartMessage" + dspace:providerPid : String + dspace:consumerPid : String +} + +class "dspace:DataAddress" { + @type : "dspace:DataAddress" + dspace:endpointType : String + dspace:endpoint : String +} + +class "dspace:EndpointProperty" { + @type : "dspace:EndpointProperty" + dspace:name : String + dspace:value : String +} + +"dspace:TransferStartMessage" "1" *-- "0..1" "dspace:DataAddress" : "dspace:dataAddress" +"dspace:DataAddress" "1" *-- "0..*" "dspace:EndpointProperty" : "dspace:endpointProperties" + + +@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 0000000..ec1d31b 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 0000000..faafa32 --- /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 "dspace:TransferSuspensionMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:TransferSuspensionMessage" + dspace:providerPid : String + dspace:consumerPid : String + dspace:code : String + dspace: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 0000000..6d0eac7 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 0000000..03e25a8 --- /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 "dspace:TransferTerminationMessage" { + @context : "https://w3id.org/dspace/2024/1/context.json" + @type : "dspace:TransferTerminationMessage" + dspace:providerPid : String + dspace:consumerPid : String + dspace:code : String + dspace:reason : Array +} + +@enduml \ No newline at end of file diff --git a/transfer/message/example/transfer-completion-message.json b/transfer/message/example/transfer-completion-message.json new file mode 100644 index 0000000..75fc9be --- /dev/null +++ b/transfer/message/example/transfer-completion-message.json @@ -0,0 +1,6 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferCompletionMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833" +} diff --git a/transfer/message/example/transfer-error.json b/transfer/message/example/transfer-error.json new file mode 100644 index 0000000..083c97c --- /dev/null +++ b/transfer/message/example/transfer-error.json @@ -0,0 +1,11 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferError", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + {}, + {} + ] +} diff --git a/transfer/message/example/transfer-process.json b/transfer/message/example/transfer-process.json new file mode 100644 index 0000000..474ad32 --- /dev/null +++ b/transfer/message/example/transfer-process.json @@ -0,0 +1,7 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferProcess", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:state": "dspace:REQUESTED" +} \ No newline at end of file diff --git a/transfer/message/example/transfer-request-message.json b/transfer/message/example/transfer-request-message.json new file mode 100644 index 0000000..2da79e3 --- /dev/null +++ b/transfer/message/example/transfer-request-message.json @@ -0,0 +1,25 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferRequestMessage", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:agreementId": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44", + "dct:format": "example:HTTP_PUSH", + "dspace:dataAddress": { + "@type": "dspace:DataAddress", + "dspace:endpointType": "https://w3id.org/idsa/v4.1/HTTP", + "dspace:endpoint": "http://example.com", + "dspace:endpointProperties": [ + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authorization", + "dspace:value": "TOKEN-ABCDEFG" + }, + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authType", + "dspace:value": "bearer" + } + ] + }, + "dspace:callbackAddress": "https://example.com/callback" +} diff --git a/transfer/message/example/transfer-start-message.json b/transfer/message/example/transfer-start-message.json new file mode 100644 index 0000000..50a6793 --- /dev/null +++ b/transfer/message/example/transfer-start-message.json @@ -0,0 +1,23 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferStartMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:dataAddress": { + "@type": "dspace:DataAddress", + "dspace:endpointType": "https://w3id.org/idsa/v4.1/HTTP", + "dspace:endpoint": "http://example.com", + "dspace:endpointProperties": [ + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authorization", + "dspace:value": "TOKEN-ABCDEFG" + }, + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authType", + "dspace:value": "bearer" + } + ] + } +} diff --git a/transfer/message/example/transfer-suspension-message.json b/transfer/message/example/transfer-suspension-message.json new file mode 100644 index 0000000..bb2026c --- /dev/null +++ b/transfer/message/example/transfer-suspension-message.json @@ -0,0 +1,11 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferSuspensionMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + {}, + {} + ] +} diff --git a/transfer/message/example/transfer-termination-message.json b/transfer/message/example/transfer-termination-message.json new file mode 100644 index 0000000..9c902be --- /dev/null +++ b/transfer/message/example/transfer-termination-message.json @@ -0,0 +1,11 @@ +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferTerminationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + {}, + {} + ] +} 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 0000000..d7d00ee --- /dev/null +++ b/transfer/message/schema/transfer-completion-message-schema.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferCompletionMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferCompletionMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-completion-message-schema.json", + "definitions": { + "TransferCompletionMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferCompletionMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ 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 0000000..9945896 --- /dev/null +++ b/transfer/message/schema/transfer-error-schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferErrorSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferError" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-error-schema.json", + "definitions": { + "TransferError": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferError" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "items": {} + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid"] + } + } +} \ 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 0000000..3fc6901 --- /dev/null +++ b/transfer/message/schema/transfer-process-schema.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferProcessSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferProcess" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-process-schema.json", + "definitions": { + "TransferProcess": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferProcess" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:state": { + "type": "string", + "enum": [ + "dspace:REQUESTED", + "dspace:STARTED", + "dspace:TERMINATED", + "dspace:COMPLETED", + "dspace:SUSPENDED" + ] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:state" ] + } + } +} \ 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 0000000..a357991 --- /dev/null +++ b/transfer/message/schema/transfer-request-message-schema.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferRequestMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferRequestMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-request-message-schema.json", + "definitions": { + "TransferRequestMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferRequestMessage" + }, + "dspace:agreementId": { + "type": "string" + }, + "dct:format": { + "type": "string" + }, + "dspace:dataAddress": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "dspace:DataAddress" + }, + "dspace:endpointType": { + "type": "string" + }, + "dspace:endpoint": { + "type": "string" + }, + "dspace:endpointProperties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "dspace:EndpointProperty" + }, + "dspace:name": { + "type": "string" + }, + "dspace:value": { + "type": "string" + } + }, + "required": ["@type", "dspace:name", "dspace:value"] + } + } + }, + "required": ["@type", "dspace:endpointType", "dspace:endpoint"] + }, + "dspace:callbackAddress": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + } + }, + "required": [ "@context", "@type", "dspace:agreementId", "dct:format", "dspace:callbackAddress", "dspace:consumerPid" ] + } + } +} \ 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 0000000..3db706c --- /dev/null +++ b/transfer/message/schema/transfer-start-message-schema.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferStartMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferStartMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-start-message-schema.json", + "definitions": { + "TransferStartMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferStartMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:dataAddress": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "dspace:DataAddress" + }, + "dspace:endpointType": { + "type": "string" + }, + "dspace:endpoint": { + "type": "string" + }, + "dspace:endpointProperties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "const": "dspace:EndpointProperty" + }, + "dspace:name": { + "type": "string" + }, + "dspace:value": { + "type": "string" + } + }, + "required": ["@type", "dspace:name", "dspace:value"] + } + } + }, + "required": ["@type", "dspace:endpointType", "dspace:endpoint"] + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ 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 0000000..4226590 --- /dev/null +++ b/transfer/message/schema/transfer-suspension-message-schema.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferSuspensionMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferSuspensionMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-suspension-message-schema.json", + "definitions": { + "TransferSuspensionMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferSuspensionMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "minItems": 1, + "items": {} + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ 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 0000000..85b65fe --- /dev/null +++ b/transfer/message/schema/transfer-termination-message-schema.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TransferTerminationMessageSchema", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TransferTerminationMessage" + } + ], + "$id": "https://w3id.org/dspace/2024/1/transfer/transfer-termination-message-schema.json", + "definitions": { + "TransferTerminationMessage": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "const": "https://w3id.org/dspace/2024/1/context.json" + }, + "@type": { + "type": "string", + "const": "dspace:TransferTerminationMessage" + }, + "dspace:providerPid": { + "type": "string" + }, + "dspace:consumerPid": { + "type": "string" + }, + "dspace:code": { + "type": "string" + }, + "dspace:reason": { + "type": "array", + "minItems": 1, + "items": { + + } + } + }, + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] + } + } +} \ 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 0000000..c39999b --- /dev/null +++ b/transfer/message/shape/transfer-completion-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 dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferCompletionMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferCompletionMessage ; + rdfs:subClassOf dspace_shapes:MessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferCompletionMessageShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferCompletionMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + +. \ No newline at end of file diff --git a/transfer/message/shape/transfer-data-address-shape.ttl b/transfer/message/shape/transfer-data-address-shape.ttl new file mode 100644 index 0000000..6223610 --- /dev/null +++ b/transfer/message/shape/transfer-data-address-shape.ttl @@ -0,0 +1,85 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +shapes:DataAddressShape + a sh:NodeShape ; + sh:targetClass dspace:DataAddress ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:endpointType ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (DataAddressShape): An dspace:endpointType property must point exactly one xsd:anyURI field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:endpoint ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (DataAddressShape): An dspace:endpoint property must point exactly one xsd:anyURI field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:endpointProperties ; + sh:class dspace:EndpointProperty ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (TransferErrorShape): An dspace:endpointProperties property must point to zero or more dspace:EndpointProperty."@en ; + ] ; + +. + +shapes:EndpointPropertyShape + sh:targetClass dspace:EndpointProperty ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:name ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (EndpointPropertyShape): An dspace:name property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:value ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (EndpointPropertyShape): An dspace:value 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 0000000..c0a11e1 --- /dev/null +++ b/transfer/message/shape/transfer-error-shape.ttl @@ -0,0 +1,66 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferErrorShape + a sh:NodeShape ; + sh:targetClass dspace:TransferError ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferErrorShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferErrorShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:severity sh:Violation ; + sh:message " (TransferErrorShape): An dspace:code property must point to exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:reason ; + ] ; + +. \ 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 0000000..ad9d941 --- /dev/null +++ b/transfer/message/shape/transfer-process-shape.ttl @@ -0,0 +1,69 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferProcessShape + a sh:NodeShape ; + sh:targetClass dspace:TransferProcess ; + rdfs:subClassOf dspace_shapes:MessageShape ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferProcessShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferProcessShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:state ; + sh:in ( + dspace:REQUESTED + dspace:STARTED + dspace:TERMINATED + dspace:COMPLETED + dspace:SUSPENDED + ) ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferProcessShape): An dspace:state property must point exactly one dspace: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 0000000..e712ca7 --- /dev/null +++ b/transfer/message/shape/transfer-request-message-shape.ttl @@ -0,0 +1,82 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferRequestMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferRequestMessage ; + + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:agreementId ; + sh:nodeKind sh:IRI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferRequestMessageShape): An dspace:agreementId property must point exactly one resource."@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 xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:dataAddress ; + sh:class dspace:DataAddress ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:message " (TransferRequestMessageShape): An dspace:dataAddress property must point zero or one dspace:DataAddress field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:callbackAddress ; + sh:datatype xsd:anyURI ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferRequestMessageShape): An dspace:callbackAddress property must point exactly one xsd:anyURI field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferRequestMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; +. 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 0000000..a636af4 --- /dev/null +++ b/transfer/message/shape/transfer-start-message-shape.ttl @@ -0,0 +1,62 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferStartMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferStartMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferStartMessageShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferStartMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:dataAddress ; + sh:class dspace:DataAddress ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (TransferStartMessageShape): An dspace:dataAddress property must point from an dspace:TransferStartMessage to a dspace:DataAddress object."@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 0000000..6402f94 --- /dev/null +++ b/transfer/message/shape/transfer-suspension-message-shape.ttl @@ -0,0 +1,60 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferSuspensionMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferSuspensionMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferSuspensionMessageShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferSuspensionMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:message " (TransferSuspensionMessageShape): An dspace:code property must point to an xsd:string value."@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 0000000..30d2778 --- /dev/null +++ b/transfer/message/shape/transfer-termination-message-shape.ttl @@ -0,0 +1,67 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dct: . +@prefix dcat: . +@prefix odrl: . +@prefix cred: . +@prefix sec: . + +@prefix dspace: . +@prefix dspace_shapes: . + +@prefix sh: . + +dspace_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 "dspace" ; + sh:namespace "https://w3id.org/dspace/2024/1/"^^xsd:anyURI ; + ] ; +. + +dspace_shapes:TransferTerminationMessageShape + a sh:NodeShape ; + sh:targetClass dspace:TransferTerminationMessage ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:providerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferTerminationMessageShape): An dspace:providerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:consumerPid ; + sh:datatype xsd:string ; + sh:severity sh:Violation ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:message " (TransferTerminationMessageShape): An dspace:consumerPid property must point exactly one xsd:string field."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:code ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:severity sh:Violation ; + sh:message " (TransferTerminationMessageShape): An dspace:code property must point from an dspace:TransferTerminationMessage to exactly one xsd:string value."@en ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:path dspace:reason ; + ] + +. \ No newline at end of file diff --git a/transfer/transfer.process.binding.https.md b/transfer/transfer.process.binding.https.md new file mode 100644 index 0000000..7553662 --- /dev/null +++ b/transfer/transfer.process.binding.https.md @@ -0,0 +1,409 @@ +# Transfer Process HTTPS Binding + +This specification defines a RESTful API over HTTPS for the [Transfer Process Protocol](./transfer.process.protocol.md). + +* [1 Introduction](#1-introduction) + * [1.1 Prerequisites](#11-prerequisites) + * [1.2 Transfer Error](#12-transfer-error) + * [1.2.1 State Transition Errors](#121-state-transition-errors) + * [1.2.2 Object Not Found](#122-object-not-found) + * [1.2.3 Unauthorized Access](#123-unauthorized-access) +* [2 Provider Path Bindings](#2-provider-path-bindings) + * [2.1 The `transfers` Endpoint _(Provider-side)_](#21-the-transfers-endpoint-provider-side) + * [2.2 The `transfers/request` Endpoint _(Provider-side)_](#22-the-transfersrequest-endpoint-provider-side) + * [2.3 The `transfers/:providerPid/start` Endpoint _(Provider-side)_](#23-the-transfersproviderpidstart-endpoint-provider-side) + * [2.4 The `transfers/:providerPid/completion` Endpoint _(Provider-side)_](#24-the-transfersproviderpidcompletion-endpoint-provider-side) + * [2.5 The `transfers/:providerPid/termination` Endpoint _(Provider-side)_](#25-the-transfersproviderpidtermination-endpoint-provider-side) + * [2.6 The `transfers/:providerPid/suspension` Endpoint _(Provider-side)_](#26-the-transfersproviderpidsuspension-endpoint-provider-side) +* [3 Consumer Callback Path Bindings](#3-consumer-callback-path-bindings) + * [3.1 Prerequisites](#31-prerequisites) + * [3.2 The `transfers/:consumerPid/start` Endpoint _(Consumer-side)_](#32-the-transfersconsumerpidstart-endpoint-consumer-side) + * [3.3 The `transfers/:consumerPid/completion` Endpoint _(Consumer-side)_](#33-the-transfersconsumerpidcompletion-endpoint-consumer-side) + * [3.4 The `transfers/:consumerPid/termination` Endpoint _(Consumer-side)_](#34-the-transfersconsumerpidtermination-endpoint-consumer-side) + * [3.5 The `transfers/:consumerPid/suspension` Endpoint _(Consumer-side)_](#35-the-transfersconsumerpidsuspension-endpoint-consumer-side) + +## 1 Introduction + +### 1.1 Prerequisites + +1. The `` notation indicates the base URL for a [Connector](../model/terminology.md#connector--data-service-) endpoint. For example, if the scheme is `https` and the full hostname is `connector.example.com`, the URL `/transfers/request` will map to `https://connector.example.com/transfers/request`. + +2. All request and response messages must use the `application/json` media type. Derived media types, e.g., `application/ld+json` may be exposed in addition. + +### 1.2 Transfer Error + +In the event of a client request error, the [Connector](../model/terminology.md#connector--data-service-) must return an appropriate HTTP 4xx client error code. If an error body is returned it must be a [Transfer Error](./transfer.process.protocol.md#32-error---transfer-error). + +#### 1.2.1 State Transition Errors + +If a client or [Provider](../model/terminology.md#provider) makes a request that results in an invalid [Transfer Process](../model/terminology.md#transfer-process) (TP) state transition as defined by the Transfer Process Protocol, it must return an HTTP code 400 (Bad Request) with a [Transfer Error](./transfer.process.protocol.md#32-error---transfer-error) in the response body. + +#### 1.2.2 Object Not Found + +If the TP does not exist, the [Consumer](../model/terminology.md#consumer) or [Provider](../model/terminology.md#provider) must return an HTTP 404 (Not Found) response. + +#### 1.2.3 Unauthorized Access + +If the client is not authorized, the [Consumer](../model/terminology.md#consumer) or [Provider](../model/terminology.md#provider) must return an HTTP 404 (Not Found) response. + +## 2 Provider Path Bindings + +| Endpoint | Method | Description | +|:--------------------------------------------------------|:-------|:---------------------------| +| https://provider.com/transfers/:providerPid | `GET` | Section [2.1.1](#211-get) | +| https://provider.com/transfers/request | `POST` | Section [2.2.1](#221-post) | +| https://provider.com/transfers/:providerPid/start | `POST` | Section [2.3.1](#231-post) | +| https://provider.com/transfers/:providerPid/completion | `POST` | Section [2.4.1](#241-post) | +| https://provider.com/transfers/:providerPid/termination | `POST` | Section [2.5.1](#251-post) | +| https://provider.com/transfers/:providerPid/suspension | `POST` | Section [2.6.1](#261-post) | + +### 2.1 The `transfers` Endpoint _(Provider-side)_ + +#### 2.1.1 GET + +##### Request + +A CN can be accessed by a [Consumer](../model/terminology.md#consumer) or [Provider](../model/terminology.md#provider) sending a GET request to `transfers/:providerPid`: + +```http request +GET https://provider.com/transfers/:providerPid + +Authorization: ... +``` + +##### Response + +If the TP is found and the client is authorized, the [Provider](../model/terminology.md#provider) must return an HTTP 200 (OK) response and a body containing the [Transfer Process](./transfer.process.protocol.md#31-ack---transfer-process): + +```json +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferProcess", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:state": "dspace:REQUESTED" +} +``` + +Predefined states are: `REQUESTED`, `STARTED`, `SUSPENDED`, `REQUESTED`, `COMPLETED`, and `TERMINATED`. + +### 2.2 The `transfers/request` Endpoint _(Provider-side)_ + +#### 2.2.1 POST + +##### Request + +A TP is started and placed in the `REQUESTED` state when a [Consumer](../model/terminology.md#consumer) POSTs a [Transfer Request Message](./transfer.process.protocol.md#21-transfer-request-message) to `transfers/request`: + + ```http request +POST https://provider.com/transfers/request + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferRequestMessage", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:agreementId": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44", + "dct:format": "example:HTTP_PUSH", + "dspace:dataAddress": { + "@type": "dspace:DataAddress", + "dspace:endpointType": "https://w3id.org/idsa/v4.1/HTTP", + "dspace:endpoint": "http://example.com", + "dspace:endpointProperties": [ + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authorization", + "dspace:value": "TOKEN-ABCDEFG" + }, + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authType", + "dspace:value": "bearer" + } + ] + }, + "dspace:callbackAddress": "https://......" +} + ``` + +- The `callbackAddress` property specifies the base endpoint `URL` where the client receives messages associated with the TP. Support for the `HTTPS` scheme is required. Implementations may optionally support other URL schemes. + +- Callback messages will be sent to paths under the base URL as described by this specification. Note that [Providers](../model/terminology.md#provider) should properly handle the cases where a trailing `/` is included with or absent from the `callbackAddress` when resolving full URL. + +##### Response + +The [Provider](../model/terminology.md#provider) must return an HTTP 201 (Created) response with a body containing the [Transfer Process](./transfer.process.protocol.md#31-ack---transfer-process): + +```json +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferProcess", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:state": "dspace:REQUESTED" +} +``` + +### 2.3 The `transfers/:providerPid/start` Endpoint _(Provider-side)_ + +#### 2.3.1 POST + +##### Request + +The [Consumer](../model/terminology.md#consumer) can POST a [Transfer Start Message](./transfer.process.protocol.md#22-transfer-start-message) to attempt to start a TP after it has been suspended: + + ```http request +POST https://provider.com/transfers/:providerPid/start + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferStartMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:dataAddress": { + "@type": "dspace:DataAddress", + "dspace:endpointType": "https://w3id.org/idsa/v4.1/HTTP", + "dspace:endpoint": "http://example.com", + "dspace:endpointProperties": [ + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authorization", + "dspace:value": "TOKEN-ABCDEFG" + }, + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authType", + "dspace:value": "bearer" + } + ] + } +} + ``` + +##### Response + +If the TP's state is successfully transitioned, the [Provider](../model/terminology.md#provider) must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. + +### 2.4 The `transfers/:providerPid/completion` Endpoint _(Provider-side)_ + +#### 2.4.1 POST + +##### Request + +The [Consumer](../model/terminology.md#consumer) can POST a [Transfer Completion Message](./transfer.process.protocol.md#24-transfer-completion-message) to complete a TP: + + ```http request +POST https://provider.com/transfers/:providerPid/completion + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferCompletionMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833" +} + ``` + +##### Response + +If the TP's state is successfully transitioned, the [Provider](../model/terminology.md#provider) must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. + +### 2.5 The `transfers/:providerPid/termination` Endpoint _(Provider-side)_ + +#### 2.5.1 POST + +##### Request + +The [Consumer](../model/terminology.md#consumer) can POST a [Transfer Termination Message](./transfer.process.protocol.md#25-transfer-termination-message) to terminate a TP: + + ```http request +POST https://provider.com/transfers/:providerPid/termination + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferTerminationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + ... + ] +} + ``` + +##### Response + +If the TP's state is successfully transitioned, the [Provider](../model/terminology.md#provider) must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. + +### 2.6 The `transfers/:providerPid/suspension` Endpoint _(Provider-side)_ + +#### 2.6.1 POST + +##### Request + +The [Consumer](../model/terminology.md#consumer) can POST a [Transfer Suspension Message](./transfer.process.protocol.md#23-transfer-suspension-message) to suspend a TP: + + ```http request +POST https://provider.com/transfers/:providerPid/suspension + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferSuspensionMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + ... + ] +} + ``` + +##### Response + +If the TP's state is successfully transitioned, the [Provider](../model/terminology.md#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 + +| Endpoint | Method | Description | +|:------------------------------------------------------------------|:-------|:---------------------------| +| https://consumer.com/:callback/transfers/:consumerPid/start | `POST` | Section [3.2.1](#321-post) | +| https://consumer.com/:callback/transfers/:consumerPid/completion | `POST` | Section [3.3.1](#331-post) | +| https://consumer.com/:callback/transfers/:consumerPid/termination | `POST` | Section [3.4.1](#341-post) | +| https://consumer.com/:callback/transfers/:consumerPid/suspension | `POST` | Section [3.5.1](#351-post) | + +### 3.1 Prerequisites + +All callback paths are relative to the `callbackAddress` base URL specified in the [Transfer Request Message](./transfer.process.protocol.md#21-transfer-request-message) that initiated a TP. For example, if the `callbackAddress` is specified as `https://consumer.com/callback` and a callback path binding is `transfers/:consumerPid/start`, the resolved URL will be `https://consumer.com/callback/transfers/:consumerPid/start`. + +### 3.2 The `transfers/:consumerPid/start` Endpoint _(Consumer-side)_ + +#### 3.2.1 POST + +##### Request + +The [Provider](../model/terminology.md#provider) can POST a [Transfer Start Message](./transfer.process.protocol.md#22-transfer-start-message) to indicate the start of a TP: + + ```http request +POST https://consumer.com/:callback/transfers/:consumerPid/start + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferStartMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:dataAddress": { + "@type": "dspace:DataAddress", + "dspace:endpointType": "https://w3id.org/idsa/v4.1/HTTP", + "dspace:endpoint": "http://example.com", + "dspace:endpointProperties": [ + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authorization", + "dspace:value": "TOKEN-ABCDEFG" + }, + { + "@type": "dspace:EndpointProperty", + "dspace:name": "authType", + "dspace:value": "bearer" + } + ] + } +} + ``` + +##### Response + +If the TP's state is successfully transitioned, the [Consumer](../model/terminology.md#consumer) must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. + +### 3.3 The `transfers/:consumerPid/completion` Endpoint _(Consumer-side)_ + +#### 3.3.1 POST + +##### Request + +The [Provider](../model/terminology.md#provider) can POST a [Transfer Completion Message](./transfer.process.protocol.md#24-transfer-completion-message) to complete a TP: + + ```http request +POST https://consumer.com/:callback/transfers/:consumerPid/completion + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferCompletionMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833" +} + ``` + +##### Response + +If the TP's state is successfully transitioned, the [Consumer](../model/terminology.md#consumer) must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. + +### 3.4 The `transfers/:consumerPid/termination` Endpoint _(Consumer-side)_ + +#### 3.4.1 POST + +##### Request + +The [Provider](../model/terminology.md#provider) can POST a [Transfer Termination Message](./transfer.process.protocol.md#25-transfer-termination-message) to terminate a TP: + + ```http request +POST https://consumer.com/:callback/transfers/:consumerPid/termination + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferTerminationMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + ... + ] +} + ``` + +##### Response + +If the TP's state is successfully transitioned, the [Consumer](../model/terminology.md#consumer) must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it. + +### 3.5 The `transfers/:consumerPid/suspension` Endpoint _(Consumer-side)_ + +#### 3.5.1 POST + +##### Request + +The [Provider](../model/terminology.md#provider) can POST a [Transfer Suspension Message](./transfer.process.protocol.md#23-transfer-suspension-message) to suspend a TP: + + ```http request +POST https://consumer.com/:callback/transfers/:consumerPid/suspension + +Authorization: ... + +{ + "@context": "https://w3id.org/dspace/2024/1/context.json", + "@type": "dspace:TransferSuspensionMessage", + "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", + "dspace:code": "...", + "dspace:reason": [ + ... + ] +} + ``` + +##### Response + +If the TP's state is successfully transitioned, the [Consumer](../model/terminology.md#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 new file mode 100644 index 0000000..6168344 --- /dev/null +++ b/transfer/transfer.process.protocol.md @@ -0,0 +1,203 @@ +# Transfer Process Protocol + +This document outlines the key elements of the [Transfer Process Protocol](../model/terminology.md#transfer-process-protocol). The used terms are described [here](../model/terminology.md). + +* [1 Introduction](#1-introduction) + * [1.1 Prerequisites](#11-prerequisites) + * [1.1.1 Control and Data Planes](#111-control-and-data-planes) + * [1.1.2 Data Transfer Types](#112-data-transfer-types) + * [Push Transfer](#push-transfer) + * [Pull Transfer](#pull-transfer) + * [Finite and Non-Finite Data](#finite-and-non-finite-data) + * [1.2 States](#12-states) + * [1.3 State Machine](#13-state-machine) +* [2 Message Types](#2-message-types) + * [2.1 Transfer Request Message](#21-transfer-request-message) + * [2.2 Transfer Start Message](#22-transfer-start-message) + * [2.3 Transfer Suspension Message](#23-transfer-suspension-message) + * [2.4 Transfer Completion Message](#24-transfer-completion-message) + * [2.5 Transfer Termination Message](#25-transfer-termination-message) +* [3 Response Types](#3-response-types) + * [3.1 ACK - Transfer Process](#31-ack---transfer-process) + * [3.2 ERROR - Transfer Error](#32-error---transfer-error) + +## 1 Introduction + +A [Transfer Process](../model/terminology.md#transfer-process) (TP) involves two parties, a [Provider](../model/terminology.md#provider) that offers one or more [Datasets](../model/terminology.md#dataset) under a [Usage Policy](../model/terminology.md#policy) and a [Consumer](../model/terminology.md#consumer) that requests [Datasets](../model/terminology.md#dataset). A TP progresses through a series of states, which are controlled by the [Provider](../model/terminology.md#provider) and [Consumer](../model/terminology.md#consumer) using messages. A TP transitions to another state as a result of an exchanged message. + +### 1.1 Prerequisites + +To put the document into the right context, some non-normative descriptions of the core concepts follow in this subsection. + +#### 1.1.1 Control and Data Planes + +A TP involves two logical constructs, a control plane and a data plane. Serving as a coordinating layer, services on the _control plane_ receive messages and manage the local state of the TP (same as for the [Catalog Protocol](../model/terminology.md#catalog-protocol) and the [Contract Negotiation Protocol](../model/terminology.md#contract-negotiation-protocol)). On the _data plane_, the actual transfer of data takes place using a wire protocol. Both participants in a data sharing scenario run services logically regarded as control and/or data plane services. + +The specification of data plane interfaces and interaction patterns are not in scope of this document. + +#### 1.1.2 Data Transfer Types + +[Dataset](../model/terminology.md#dataset) transfers are characterized as `push` or `pull` transfers and it's data is either `finite` or `non-finite`. This section describes the difference between these types. + +##### Push Transfer + +A push transfer is when the [Provider's](../model/terminology.md#provider) data plane initiates sending data to a [Consumer](../model/terminology.md#consumer) endpoint. For example, after the [Consumer](../model/terminology.md#consumer) has issued a [Transfer Request Message](#21-transfer-request-message), the [Provider](../model/terminology.md#provider) begins data transmission to an endpoint specified by the [Consumer](../model/terminology.md#consumer) using an agreed-upon wire protocol. + +![](./figures/push-transfer-process.png) + +_Note that the illustration of the sequence is only exemplary. The activation of actors is not determined, also, responses, parameters, possible recursions, and interactions between the components of one participant are not shown._ + +##### Pull Transfer + +A pull transfer is when the [Consumer's](../model/terminology.md#consumer) data plane initiates retrieval of data from a [Provider](../model/terminology.md#provider) endpoint. For example, after the [Provider](../model/terminology.md#provider) has issued a [Transfer Start Message](#22-transfer-start-message), the [Consumer](../model/terminology.md#consumer) can request the data from the [Provider](../model/terminology.md#provider)-specified endpoint. + +![](./figures/pull-transfer-process.png) + +_Note that the illustration of the sequence is only exemplary. The activation of actors is not determined, also, responses, parameters, possible recursions, and interactions between the components of one participant are not shown._ + +##### Finite and Non-Finite Data + +Data may be `finite` or `non-finite`. This applies to either push and pull transfers. Finite data is data that is defined by a finite set, for example, machine learning data or images. After finite data transmission has finished, the TP is completed. Non-finite data is data that is defined by an infinite set or has no specified end, for example, streams or an API endpoint. With non-finite data, a TP will continue indefinitely until either the [Consumer](../model/terminology.md#consumer) or [Provider](../model/terminology.md#provider) explicitly terminates the transmission. + +### 1.2 States + +The TP states are: + +- **REQUESTED**: A [Dataset](../model/terminology.md#dataset) has been requested under an [Agreement](../model/terminology.md#agreement) by the [Consumer](../model/terminology.md#consumer) and the [Provider](../model/terminology.md#provider) has sent an ACK response. +- **STARTED**: The [Dataset](../model/terminology.md#dataset) is available for access by the [Consumer](../model/terminology.md#consumer) or the [Provider](../model/terminology.md#provider) has begun pushing the data to the [Consumer](../model/terminology.md#consumer) endpoint. +- **COMPLETED**: The transfer has been completed by either the [Consumer](../model/terminology.md#consumer) or the [Provider](../model/terminology.md#provider). +- **SUSPENDED**: The transfer has been suspended by the [Consumer](../model/terminology.md#consumer) or the [Provider](../model/terminology.md#provider). +- **TERMINATED**: The [Transfer Process](../model/terminology.md#transfer-process) has been terminated by the [Consumer](../model/terminology.md#consumer) or the [Provider](../model/terminology.md#provider). + +### 1.3 State Machine + +The TP state machine is represented in the following diagram: + +![](./figures/transfer-process-state-machine.png) + +Transitions marked with `C` indicate a message sent by the [Consumer](../model/terminology.md#consumer), transitions marked with `P` indicate a [Provider](../model/terminology.md#provider) message. Terminal states are final; the state machine may not transition to another state. + +## 2 Message Types + +All messages must be serialized in JSON-LD compact form as specified in the [JSON-LD 1.1 Processing Algorithms and API](https://www.w3.org/TR/json-ld11-api/#compaction-algorithms). Further Dataspace specifications may define additional optional serialization formats. + +### 2.1 Transfer Request Message + +| | | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer) | +| **Resulting state** | `REQUESTED` | +| **Response** | [ACK](#31-ack---transfer-process) or [ERROR](#32-error---transfer-error) | +| **Schema** | [TTL Shape](./message/shape/transfer-request-message-shape.ttl), [JSON Schema](./message/schema/transfer-request-message-schema.json) | +| **Example** | [Message](./message/example/transfer-request-message.json) | +| **Diagram(s)** | ![](./message/diagram/transfer-request-message.png) | + +The Transfer Request Message is sent by a [Consumer](../model/terminology.md#consumer) to initiate a TP. + +- The `consumerPid` property refers to the transfer id of the [Consumer](../model/terminology.md#consumer) side. +- The `agreementId` property refers to an existing contract [Agreement](../model/terminology.md#agreement) between the [Consumer](../model/terminology.md#consumer) and [Provider](../model/terminology.md#provider). +- The `dct:format` property is a format specified by a `Distribution` for the [Dataset](../model/terminology.md#dataset) associated with the [Agreement](../model/terminology.md#agreement). This is generally obtained from the [Provider's](../model/terminology.md#provider) [Catalog](../model/terminology.md#catalog). +- The `dataAddress` property must only be provided if the `dct:format` requires a push transfer. +- The `dataAddress` contains a transport-specific endpoint address for pushing the data. It may include a temporary authorization via the `endpointProperties` property. +- `callbackAddress` is a URI indicating where messages to the [Consumer](../model/terminology.md#consumer) should be sent. If the address is not understood, the [Provider](../model/terminology.md#provider) MUST return an UNRECOVERABLE error. + +- The `endpointProperties` may contain the following optional values: + - `authorization` - An opaque authorization token that clients must present when accessing the transport-specific endpoint address. + - `authType` - The auth token type. For example, the value may be `bearer`. If present, this value may be used in conjunction with transport rules to define how the client must present an authorization token. + +Note that [Providers](../model/terminology.md#provider) should implement idempotent behavior for [Transfer Request Messages](#21-transfer-request-message) based on the value of `consumerPid`. [Providers](../model/terminology.md#provider) may choose to implement idempotent behavior for a certain period of time. For example, until a TP has completed and been archived after an implementation-specific expiration period, repeated sending of [Transfer Request Messages](#21-transfer-request-message) does not change the state of the TP. If a request for the given `consumerPid` has already been received *and* the same [Consumer](../model/terminology.md#consumer) sent the original message again, the [Provider](../model/terminology.md#provider) should respond with an appropriate [Transfer Start Message](#22-transfer-start-message). + +- Once a TP has been created, all associated callback messages must include a `consumerPid` and `providerPid`. +- [Providers](../model/terminology.md#provider) must include a `consumerPid` and a `providerPid` property in the object. +- Valid states of a TP are `REQUESTED`, `STARTED`, `TERMINATED`, `COMPLETED`, and `SUSPENDED`. + + +### 2.2 Transfer Start Message + +| | | +|---------------------|-----------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Provider](../model/terminology.md#provider) | +| **Resulting state** | `STARTED` | +| **Response** | [ACK](#31-ack---transfer-process) or [ERROR](#32-error---transfer-error) | +| **Schema** | [TTL Shape](./message/shape/transfer-start-message-shape.ttl), [JSON Schema](./message/schema/transfer-start-message-schema.json) | +| **Example** | [Message](./message/example/transfer-start-message.json) | +| **Diagram(s)** | ![](./message/diagram/transfer-start-message.png) | + +The Transfer Start Message is sent by the [Provider](../model/terminology.md#provider) to indicate the data transfer has been initiated. + +- The `dataAddress` is only provided if the current transfer is a pull transfer and contains a transport-specific endpoint address for obtaining the data. It may include a temporary authorization via the `endpointProperties` property. +- The `endpointProperties` may contain the following optional values: + - `authorization` - An opaque authorization token that clients must present when accessing the transport-specific endpoint address. + - `authType` - The auth token type. For example, the value may be `bearer`. If present, this value may be used in conjunction with transport rules to define how the client must present an authorization token. + +### 2.3 Transfer Suspension Message + +| | | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer), [Provider](../model/terminology.md#provider) | +| **Resulting state** | `SUSPENDED` | +| **Response** | [ACK](#31-ack---transfer-process) or [ERROR](#32-error---transfer-error) | +| **Schema** | [TTL Shape](./message/shape/transfer-suspension-message-shape.ttl), [JSON Schema](./message/schema/transfer-suspension-message-schema.json) | +| **Example** | [Message](./message/example/transfer-suspension-message.json) | +| **Diagram(s)** | ![](./message/diagram/transfer-suspension-message.png) | + +The Transfer Suspension Message is sent by the [Provider](../model/terminology.md#provider) or [Consumer](../model/terminology.md#consumer) when either of them needs to temporarily suspend the TP. + +### 2.4 Transfer Completion Message + +| | | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer), [Provider](../model/terminology.md#provider) | +| **Resulting state** | `COMPLETED` | +| **Response** | [ACK](#31-ack---transfer-process) or [ERROR](#32-error---transfer-error) | +| **Schema** | [TTL Shape](./message/shape/transfer-completion-message-shape.ttl), [JSON Schema](./message/schema/transfer-completion-message-schema.json) | +| **Example** | [Message](./message/example/transfer-completion-message.json) | +| **Diagram(s)** | ![](./message/diagram/transfer-completion-message.png) | + +The Transfer Completion Message is sent by the [Provider](../model/terminology.md#provider) or [Consumer](../model/terminology.md#consumer) when a data transfer has completed. Note that some [Connector](../model/terminology.md#connector--data-service-) implementations may optimize completion notification by performing it as part of their wire protocol. In those cases, a Transfer Completion Message does not need to be sent. + +### 2.5 Transfer Termination Message + +| | | +|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer), [Provider](../model/terminology.md#provider) | +| **Resulting state** | `TERMINATED` | +| **Response** | [ACK](#31-ack---transfer-process) or [ERROR](#32-error---transfer-error) | +| **Schema** | [TTL Shape](./message/shape/transfer-termination-message-shape.ttl), [JSON Schema](./message/schema/transfer-termination-message-schema.json) | +| **Example** | [Message](./message/example/transfer-termination-message.json) | +| **Diagram(s)** | ![](./message/diagram/transfer-termination-message.png) | + +The Transfer Termination Message is sent by the [Provider](../model/terminology.md#provider) or [Consumer](../model/terminology.md#consumer) at any point except a terminal state to indicate the TP should stop and be placed in a terminal state. If the termination was due to an error, the sender may include error information. + +## 3 Response Types + +The `ACK` and `ERROR` response types are mapped onto a protocol such as HTTPS. A description of an error might be provided in protocol-dependent forms, e.g., for an HTTPS binding in the request or response body. + +### 3.1 ACK - Transfer Process + +| | | +|-----------------|-----------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer), [Provider](../model/terminology.md#provider) | +| **Schema** | [TTL Shape](./message/shape/transfer-process-shape.ttl), [JSON Schema](./message/schema/transfer-process-schema.json) | +| **Example** | [Process](./message/example/transfer-process.json) | +| **Diagram(s)** | ![](./message/diagram/transfer-process.png) | + +The Transfer Process is an object returned by a [Consumer](../model/terminology.md#consumer) or [Provider](../model/terminology.md#provider) indicating a successful state change happened. + +### 3.2 ERROR - Transfer Error + +| | | +|-----------------|-------------------------------------------------------------------------------------------------------------------| +| **Sent by** | [Consumer](../model/terminology.md#consumer), [Provider](../model/terminology.md#provider) | +| **Schema** | [TTL Shape](./message/shape/transfer-error-shape.ttl), [JSON Schema](./message/schema/transfer-error-schema.json) | +| **Example** | [Process](./message/example/transfer-error.json) | +| **Diagram(s)** | ![](./message/diagram/transfer-error.png) | + +The Transfer Error is an object returned by a [Consumer](../model/terminology.md#consumer) or [Provider](../model/terminology.md#provider) indicating an error has occurred. It does not cause a state transition. + +| Field | Type | Description | +|---------------|---------------|------------------------------------------------------------------------| +| `consumerPid` | UUID | The TF unique id on [Consumer](../model/terminology.md#consumer) side. | +| `providerPid` | UUID | The TF unique id on [Provider](../model/terminology.md#provider) side. | +| `code` | string | An optional implementation-specific error code. | +| `reasons` | Array[object] | An optional array of implementation-specific error objects. |