Skip to content

Commit

Permalink
Editorial rework merge (#2) (#209)
Browse files Browse the repository at this point in the history
* adding DCAT into JSON schema

* catalog schema DCAT fix

* fix catalog schema - DCAT

* fix catalog schema type error - DCAT

* DCAT catalog-shape added for Catalog class

* fix typo in DCAT of catalog schema

* fix type of dct:modified in DCAT of catalog schema

* DCAT dcat:CatalogRecord class added to catalog shape

* fix DCAT referecen in Resource catalog

* DCAT wrong property of Resource removed

* Fix DCAT catalog property of Resource

* ResourceShape added to catalog-shape.ttl

* RelationshipShape added to catalog-shape.ttl

* DCAT fix issue in skos:Concept

* DCAT ConceptShape ConceptSchemeShape and AgentShape added

* DCAT fix of Dataset property

* DCAT DatasetShape added

* DCAT DataServiceShape added

* DCAT Distribution catalog issue in type

* DCAT typo in property

* DCAT DataServiceShape added

* add references for reused classes & datatypes

* clean up on schema

* properties changed

* refactoring

* refactoring

* change dct:issued from string to dateTime

* fix dct:language from xsd:string to referencing a resource

* correcting hasPolicy declarations

* reviewing the catalog json schema

* refactor catalog json schema

* add odrl policy json schema

* fix syntax bugs in catalog json schema and adding foaf to the context.json

* fix bugs in catalog and contract json schemas

* fix examples to match to the catalog and contract json schemas

* replace relative reference to the contract-schema.json with an absolute url

* fix findings from mkollenstart's review

* testing negotiation-subtask-1.1 branch

* removing the test change

* unwnated characters

* Task #1: fix schemas and examples in "negotiation"

* correct references to GitHub raw files

* making 'required' field compatible to json 2019-09

* changes suggested by Sebastian

* changes to processId, correcting ref, removing Sec

* chnages since last review

* left over change

* missing s in dspace

* removing RightOperand property

* chnage in Permission, Json validated

* catalog subtask changes

* reverting dspace:filter type to object

* re-introducing updates to the json schemas

* fix filter in contract-request-message-schema

* fixing schema in "Transfer"

* Trying Shapes validation with Json-LD

* debugging catalog shapes

* fixing shapes in Catalog

* Negotaitaion Shapes validation

* Remove the ContractAgreement shape

* add the AgreementShape

* Negotiation shapes correction

* conflict merge

* schema and shapes re-validating after merge

* change assigner and assignee to string

* introduve verifiable credential structure to agreement msg

* adjust agreement msg example to vc pattern

* comment error

* Catalog shapes changes

* Shapes and schema validation for Transfer

* Introduce sh:IRI pattern for agreementId

* correction for dspace:reason and others

* dataset schema and puml

* Update catalog-error-schema.json - remove "dspace:code" and "dspace:reason" as mandatory

* Update dataset-schema.json - remove "dct:title" and "dct:description" as mandatory

* agreement verification change

* Transfer Messages - shapes and schema validation

* removing "@id" from transfer messages

* correction for catalog schema

* error handling

* pull request #11 changes

* pull request changes

* new chnages to editorial-rework

* merge editorial-rework to shapes-and-schemas

* fix last findings

---------

Co-authored-by: Thomas Ryborz <[email protected]>
Co-authored-by: tr-sap <[email protected]>
Co-authored-by: SimantVerma-Bcone <[email protected]>
Co-authored-by: simantvermasap <[email protected]>
  • Loading branch information
5 people authored Feb 1, 2024
1 parent 815aedc commit 11cb69e
Show file tree
Hide file tree
Showing 35 changed files with 152 additions and 88 deletions.
2 changes: 1 addition & 1 deletion catalog/catalog.protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,4 @@ When a [Catalog](../model/terminology.md#catalog) contains protected [Datasets](

### 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.
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.
17 changes: 2 additions & 15 deletions catalog/message/schema/catalog-error-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,10 @@
"type": "string"
},
"dspace:reason": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@value": {
"type": "string"
},
"@language": {
"type": "string"
}
},
"required": ["@value", "@language"]
},
"minItems": 1
"type": "array"
}
},
"required": [ "@context", "@type" ]
}
}
}
}
5 changes: 1 addition & 4 deletions catalog/message/schema/catalog-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@
}
}
],
"required": [
"@context",
"@type"
],
"required": [ "@context", "@type" ],
"additionalProperties": false
}
}
Expand Down
9 changes: 2 additions & 7 deletions catalog/message/schema/dataset-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@
"type": "string"
}
},
"required": [
"@id"
]
"required": [ "@id" ]
},
"Multilanguage": {
"type": "object",
Expand All @@ -163,10 +161,7 @@
"type": "string"
}
},
"required": [
"@value",
"@language"
]
"required": [ "@value", "@language" ]
}
}
}
8 changes: 5 additions & 3 deletions catalog/message/shape/catalog-error-shape.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ dspace_shapes:CatalogErrorShape
sh:datatype xsd:string ;
] ;
sh:property [
sh:path dspace:reason ;
sh:datatype rdf:langString ;
] .
sh:path dspace:reason ;
sh:datatype rdf:langString ;
] ;

.
1 change: 1 addition & 0 deletions catalog/message/shape/catalog-request-message-shape.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ dspace_shapes:CatalogRequestMessageShape
a sh:PropertyShape ;
sh:path dspace:filter ;
] ;

.
78 changes: 78 additions & 0 deletions catalog/message/shape/dataset-shape.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix odrl: <http://www.w3.org/ns/odrl/2/> .
@prefix cred: <https://www.w3.org/2018/credentials#> .
@prefix sec: <https://w3id.org/security#> .
@prefix prov: <http://www.w3.org/ns/prov#> .

@prefix dspace: <https://w3id.org/dspace/v0.8/> .
@prefix dspace_shapes: <https://w3id.org/dspace/shapes/v0.8/> .

@prefix sh: <http://www.w3.org/ns/shacl#> .

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: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 "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/dataset-shape.ttl> (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 "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/dataset-shape.ttl> (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 "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/dataset-shape.ttl> (DatasetShape): A dct:description property must point to a rdf:langString field."@en ;
] ;

sh:property [
a sh:PropertyShape ;
sh:path dct:title ;
sh:datatype xsd:string ;
sh:minCount 0;
sh:severity sh:Violation ;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/dataset-shape.ttl> (DatasetShape): 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:minCount 0;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/dataset-shape.ttl> (DatasetShape): An odrl:hasPolicy property must point to an odrl:Policy."@en ;
] ;

.
1 change: 1 addition & 0 deletions common/schema/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"dspace:catalog": { "@container": "@set" },
"dspace:filter": { "@container": "@set" },
"dspace:timestamp": { "@type": "xsd:dateTime" },
"dspace:callbackAddress": { "@type": "xsd:anyURI" },

"foaf:homepage": { "@type": "xsd:anyURI" },

Expand Down
4 changes: 3 additions & 1 deletion negotiation/message/diagram/contract-agreement-message.puml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ class "dspace:ContractAgreementMessage" {
class odrl:Agreement {
@type : "odrl:Agreement"
@id: String
odrl:target : xsd:anyURI
dspace:timestamp : xsd:dateTime
...
dspace:consumerId : String
dspace:providerId : String
}

"dspace:ContractAgreementMessage" "1" *-- "1" "odrl:Agreement" : "odrl:agreement"
Expand Down
9 changes: 3 additions & 6 deletions negotiation/message/schema/contract-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@
]
}
],
"required": [
"@type",
"dspace:providerId"
]
"required": [ "@type", "dspace:providerId" ]
},
"Agreement": {
"type": "object",
Expand All @@ -114,8 +111,8 @@
"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))?"
"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))?"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion releases/v0.8/catalog/message/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@
}
}
]
}
}
2 changes: 1 addition & 1 deletion releases/v0.8/catalog/message/dataset-request-message.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@type": "dspace:DatasetRequestMessage",
"dspace:dataset": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88"
}
}
2 changes: 1 addition & 1 deletion releases/v0.8/catalog/message/dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
},
"dspace:signature": {},
"dspace:callbackAddress": "https://......"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,5 @@
"@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": {}
}
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:eventType": "dspace:ACCEPTED"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"@language": "en"
}
]
}
}
12 changes: 6 additions & 6 deletions releases/v0.8/negotiation/message/contract-negotiation.json
Original file line number Diff line number Diff line change
@@ -1,7 +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"
}
"@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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
}]
},
"dspace:callbackAddress": "https://......"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88"
},
"dspace:callbackAddress": "https://......"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"@type": "dspace:TransferCompletionMessage",
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833"
}
}
2 changes: 1 addition & 1 deletion releases/v0.8/transfer/message/transfer-error.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
{},
{}
]
}
}
13 changes: 12 additions & 1 deletion releases/v0.8/transfer/message/transfer-start-message.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@
"@type": "dspace:TransferStartMessage",
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:dataAddress": "https://......"
"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"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
{},
{}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
{},
{}
]
}
}
5 changes: 1 addition & 4 deletions transfer/message/schema/transfer-error-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@
},
"dspace:reason": {
"type": "array",
"minItems": 1,
"items": {

}
"items": {}
}
},
"required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid"]
Expand Down
2 changes: 1 addition & 1 deletion transfer/message/schema/transfer-process-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
]
}
},
"required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:consumerPid", "dspace:state" ]
"required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:state" ]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
"dspace:reason": {
"type": "array",
"minItems": 1,
"items": {

}
"items": {}
}
},
"required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ]
Expand Down
5 changes: 3 additions & 2 deletions transfer/message/shape/transfer-completion-message-shape.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

@prefix sh: <http://www.w3.org/ns/shacl#> .

shapes:
dspace_shapes:
a owl:Ontology ;
sh:declare [
sh:prefix "rdf" ;
Expand All @@ -25,9 +25,10 @@ shapes:
] ;
.

shapes:TransferCompletionMessageShape
dspace_shapes:TransferCompletionMessageShape
a sh:NodeShape ;
sh:targetClass dspace:TransferCompletionMessage ;
rdfs:subClassOf dspace_shapes:MessageShape ;

sh:property [
a sh:PropertyShape ;
Expand Down
Loading

0 comments on commit 11cb69e

Please sign in to comment.