Skip to content

Commit

Permalink
feat: add v2 shape for distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
Kees Burger committed Jan 7, 2025
1 parent 4129b00 commit 21395b4
Show file tree
Hide file tree
Showing 2 changed files with 220 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
dct:title "Example Distribution" ;
dct:description "This is an example distribution to test the shapes" ;
dcat:accessURL <http://example.com/> ;
dcat:mediaType <http://example.com/> .
dcat:mediaType <http://example.com/> ;
dct:license <https://creativecommons.org/public-domain/cc0/> .
267 changes: 218 additions & 49 deletions Formalisation(shacl)/Core/PiecesShape/Distribution.ttl
Original file line number Diff line number Diff line change
@@ -1,49 +1,218 @@
@prefix : <http://fairdatapoint.org/> .
@prefix dash: <http://datashapes.org/dash#> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

:DistributionShape a sh:NodeShape ;
sh:targetClass dcat:Distribution ;
sh:property [
sh:path dcat:accessURL ;
sh:nodeKind sh:IRI ;
sh:minCount 1 ;
dash:viewer dash:URIViewer ;
dash:editor dash:URIEditor ;
],
[
sh:path dcat:mediaType ;
sh:nodeKind sh:IRI ;
sh:minCount 1 ;
dash:editor dash:TextFieldEditor ;
dash:viewer dash:LiteralViewer ;
] ,
[
sh:path dct:title ;
sh:datatype xsd:string ;
sh:minCount 1 ;
sh:uniqueLang true ;
dash:viewer dash:LiteralViewer ;
dash:editor dash:TextFieldEditor ;
] ,
[
sh:path dct:description ;
sh:datatype xsd:string ;
sh:minCount 1 ;
sh:uniqueLang true ;
dash:viewer dash:LiteralViewer ;
dash:editor dash:TextFieldEditor ;
] ,
[
sh:path dcat:accessService ;
sh:class dcat:DataService ;
] ,
[
sh:path dcat:downloadURL ;
sh:nodeKind sh:IRI ;
dash:viewer dash:URIViewer ;
dash:editor dash:URIEditor ;
] .
@prefix adms: <http://www.w3.org/ns/adms#> .
@prefix dash: <http://datashapes.org/dash#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dcatap: <http://data.europa.eu/r5r/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix euvoc: <http://publications.europa.eu/ontology/euvoc#> .
@prefix example: <https://data.sparna.fr/shapes-example/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix healthdcatap: <http://example.com/ns/healthdcatap#> .
@prefix hri: <http://data.health-ri.nl/core/p2/> .
@prefix org: <http://www.w3.org/ns/org#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix qb: <http://purl.org/linked-data/cube#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix shacl-play: <https://shacl-play.sparna.fr/ontology#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix skosthes: <http://purl.org/iso25964/skos-thes#> .
@prefix skosxl: <http://www.w3.org/2008/05/skos-xl#> .
@prefix spdx: <http://spdx.org/rdf/terms#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<https://data.sparna.fr/shapes-example#> a owl:Ontology;
dct:description "This Excel file shows how to edit simple SHACL shapes in an Excel file"@en;
dct:modified "2025-01-07T09:39:03.010Z"^^xsd:dateTime;
rdfs:comment "An example SHACL file in Excel"@en;
rdfs:label "Distribution"@en;
owl:versionInfo "0.1" .

hri:DistributionShape a sh:NodeShape;
rdfs:label "Distribution"@en;
sh:nodeKind sh:IRI;
sh:order 1;
sh:property <http://data.health-ri.nl/core/p2/DistributionShape#dcat:accessService>,
<http://data.health-ri.nl/core/p2/DistributionShape#dcat:accessURL>, <http://data.health-ri.nl/core/p2/DistributionShape#dcat:byteSize>,
<http://data.health-ri.nl/core/p2/DistributionShape#dcat:compressFormat>, <http://data.health-ri.nl/core/p2/DistributionShape#dcat:downloadURL>,
<http://data.health-ri.nl/core/p2/DistributionShape#dcat:mediaType>, <http://data.health-ri.nl/core/p2/DistributionShape#dcatap:applicableLegislation>,
<http://data.health-ri.nl/core/p2/DistributionShape#dct:conformsTo>, <http://data.health-ri.nl/core/p2/DistributionShape#dcat:packageFormat>,
<http://data.health-ri.nl/core/p2/DistributionShape#dct:description>, <http://data.health-ri.nl/core/p2/DistributionShape#dct:format>,
<http://data.health-ri.nl/core/p2/DistributionShape#dct:language>, <http://data.health-ri.nl/core/p2/DistributionShape#dct:license>,
<http://data.health-ri.nl/core/p2/DistributionShape#dct:modified>, <http://data.health-ri.nl/core/p2/DistributionShape#foaf:page>,
<http://data.health-ri.nl/core/p2/DistributionShape#spdx:checksum>, <http://data.health-ri.nl/core/p2/DistributionShape#dct:issued>;
sh:targetClass dcat:Distribution;
shacl-play:background-color "Green" .

<http://data.health-ri.nl/core/p2/DistributionShape#dcat:accessService> sh:class dcat:DataService;
sh:maxCount 1;
sh:name "access service"@en;
sh:path dcat:accessService .

<http://data.health-ri.nl/core/p2/DistributionShape#dcat:accessURL> dash:editor dash:URIEditor;
dash:viewer dash:URIViewer;
sh:description "The resource at the access URL may contain information about how to get the Dataset."@en;
sh:maxCount 1;
sh:minCount 1;
sh:name "access url"@en;
sh:nodeKind sh:IRI;
sh:path dcat:accessURL .

<http://data.health-ri.nl/core/p2/DistributionShape#dcatap:applicableLegislation>
dash:editor dash:URIEditor;
dash:viewer dash:URIViewer;
sh:name "Applicable Legislation"@en;
sh:nodeKind sh:IRI;
sh:path dcatap:applicableLegislation .

<http://data.health-ri.nl/core/p2/DistributionShape#dcat:byteSize> dash:editor dash:TextFieldEditor;
dash:viewer dash:LiteralViewer;
sh:datatype xsd:nonNegativeInteger;
sh:maxCount 1;
sh:name "byte size"@en;
sh:nodeKind sh:Literal;
sh:path dcat:byteSize .

<http://data.health-ri.nl/core/p2/DistributionShape#spdx:checksum> dash:editor dash:BlankNodeEditor;
dash:viewer dash:DetailsViewer;
sh:description "The checksum is related to the downloadURL."@en;
sh:maxCount 1;
sh:name "checksum"@en;
sh:node spdx:Checksum;
sh:path spdx:checksum .

<http://data.health-ri.nl/core/p2/DistributionShape#dcat:compressFormat> dash:editor
dash:URIEditor;
dash:viewer dash:URIViewer;
sh:description "It SHOULD be expressed using a media type as defined in the official register of media types managed by IANA."@en;
sh:maxCount 1;
sh:name "compression format"@en;
sh:nodeKind sh:IRI;
sh:path dcat:compressFormat .

<http://data.health-ri.nl/core/p2/DistributionShape#dct:description> dash:editor dash:TextFieldEditor;
dash:viewer dash:LiteralViewer;
sh:description "This property can be repeated for parallel language versions of the description."@en;
sh:name "description"@en;
sh:nodeKind sh:Literal;
sh:path dct:description .

<http://data.health-ri.nl/core/p2/DistributionShape#foaf:page> dash:editor dash:URIEditor;
dash:viewer dash:URIViewer;
sh:name "documentation"@en;
sh:nodeKind sh:IRI;
sh:path foaf:page .

<http://data.health-ri.nl/core/p2/DistributionShape#dcat:downloadURL> dash:editor
dash:URIEditor;
dash:viewer dash:URIViewer;
sh:maxCount 1;
sh:name "download URL"@en;
sh:nodeKind sh:IRI;
sh:path dcat:downloadURL .

<http://data.health-ri.nl/core/p2/DistributionShape#dct:format> dash:editor dash:URIEditor;
dash:viewer dash:URIViewer;
sh:maxCount 1;
sh:name "format"@en;
sh:nodeKind sh:IRI;
sh:path dct:format .

<http://data.health-ri.nl/core/p2/DistributionShape#dct:language> dash:editor dash:URIEditor;
dash:viewer dash:URIViewer;
sh:description "This property can be repeated if the metadata is provided in multiple languages."@en;
sh:name "language"@en;
sh:nodeKind sh:IRI;
sh:path dct:language .

<http://data.health-ri.nl/core/p2/DistributionShape#dct:license> dash:editor dash:URIEditor;
dash:viewer dash:URIViewer;
sh:maxCount 1;
sh:minCount 1;
sh:name "license"@en;
sh:nodeKind sh:IRI;
sh:path dct:license .

<http://data.health-ri.nl/core/p2/DistributionShape#dct:conformsTo> dash:editor dash:URIEditor;
dash:viewer dash:URIViewer;
sh:name "linked schemas"@en;
sh:nodeKind sh:IRI;
sh:path dct:conformsTo .

<http://data.health-ri.nl/core/p2/DistributionShape#dcat:mediaType> dash:editor dash:URIEditor;
dash:viewer dash:URIViewer;
sh:maxCount 1;
sh:name "media type"@en;
sh:nodeKind sh:IRI;
sh:path dcat:mediaType .

<http://data.health-ri.nl/core/p2/DistributionShape#dct:modified> dash:editor dash:TextFieldEditor;
dash:viewer dash:LiteralViewer;
sh:datatype xsd:dateTime;
sh:maxCount 1;
sh:name "modification date"@en;
sh:path dct:modified .

<http://data.health-ri.nl/core/p2/DistributionShape#dcat:packageFormat> dash:editor
dash:URIEditor;
dash:viewer dash:URIViewer;
sh:description "It SHOULD be expressed using a media type as defined in the official register of media types managed by IANA."@en;
sh:maxCount 1;
sh:name "packaging format"@en;
sh:nodeKind sh:IRI;
sh:path dcat:packageFormat .

<http://data.health-ri.nl/core/p2/DistributionShape#dct:issued> dash:editor dash:TextFieldEditor;
dash:viewer dash:LiteralViewer;
sh:datatype xsd:dateTime;
sh:description "The date the dataset distribution was issued."@en;
sh:maxCount 1;
sh:name "release date"@en;
sh:path dct:issued .

hri:DistributionShape sh:property <http://data.health-ri.nl/core/p2/DistributionShape#adms:status>,
<http://data.health-ri.nl/core/p2/DistributionShape#dcat:temporalResolution>, <http://data.health-ri.nl/core/p2/DistributionShape#dct:rights>,
<http://data.health-ri.nl/core/p2/DistributionShape#dct:title>, <http://data.health-ri.nl/core/p2/DistributionShape#healthdcatap:retentionperiod> .

<http://data.health-ri.nl/core/p2/DistributionShape#healthdcatap:retentionperiod>
dash:editor dash:BlankNodeEditor;
dash:viewer dash:DetailsViewer;
sh:name "retention period"@en;
sh:node dct:PeriodOfTime;
sh:path healthdcatap:retentionperiod .

<http://data.health-ri.nl/core/p2/DistributionShape#dct:rights> dash:editor dash:URIEditor;
dash:viewer dash:URIViewer;
sh:description "A statement that concerns all rights not addressed in fields License or Rights, such as copyright statements. Everything that is not covered with licece"@en;
sh:maxCount 1;
sh:name "rights"@en;
sh:nodeKind sh:IRI;
sh:path dct:rights .

<http://data.health-ri.nl/core/p2/DistributionShape#adms:status> dash:editor dash:URIEditor;
dash:viewer dash:URIViewer;
sh:class <http://www.w3.org/2004/02/skos/core#Concept\u0020(IRI)>;
sh:description "It MUST take one of the values Completed, Deprecated, Under Development, Withdrawn."@en;
sh:maxCount 1;
sh:name "status"@en;
sh:nodeKind sh:IRI;
sh:path adms:status .

<http://data.health-ri.nl/core/p2/DistributionShape#dcat:temporalResolution> dash:editor
dash:TextFieldEditor;
dash:viewer dash:LiteralViewer;
sh:datatype xsd:duration;
sh:maxCount 1;
sh:name "temporal resolution"@en;
sh:path dcat:temporalResolution .

<http://data.health-ri.nl/core/p2/DistributionShape#dct:title> dash:editor dash:TextFieldEditor;
dash:viewer dash:LiteralViewer;
sh:description "This property can be repeated for parallel language versions of the description."@en;
sh:name "title"@en;
sh:nodeKind sh:Literal;
sh:path dct:title .

0 comments on commit 21395b4

Please sign in to comment.