Skip to content

Commit

Permalink
Add SHACL shape for DCAT-AP Feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
smessie committed Mar 22, 2024
1 parent d90bbec commit 331e4d6
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
54 changes: 54 additions & 0 deletions shape.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
@prefix dcatapfeeds: <https://semiceu.github.io/LDES-DCAT-AP-Feeds/shape.ttl#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix tree: <https://w3id.org/tree#> .
@prefix as: <https://www.w3.org/ns/activitystreams#> .
@prefix : <http://data.europa.eu/r5r/shacl_shapes#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .

dcatapfeeds: owl:imports <https://semiceu.github.io/DCAT-AP/releases/3.0.0/html/shacl/shapes.ttl> .

dcatapfeeds:ActivityShape a sh:NodeShape ;
sh:xone ( dcatapfeeds:UpsertShape dcatapfeeds:DeleteShape ) .

dcatapfeeds:UpsertShape a sh:NodeShape ;
sh:closed true ;
sh:ignoredProperties (rdf:type) ;
sh:targetClass as:Create, as:Update ;
sh:property [
sh:path as:object ;
sh:node dcatapfeeds:EntityShape ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property dcatapfeeds:PublishedPropertyShape .

dcatapfeeds:DeleteShape a sh:NodeShape ;
sh:closed true ;
sh:ignoredProperties (rdf:type) ;
sh:targetClass as:Delete ;
sh:property [
sh:path as:object ;
sh:nodeKind sh:IRI ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property dcatapfeeds:PublishedPropertyShape .

dcatapfeeds:PublishedPropertyShape a sh:PropertyShape ;
sh:path as:published ;
sh:datatype xsd:dateTime ;
sh:minCount 0 ;
sh:maxCount 1 .


dcatapfeeds:EntityShape a sh:NodeShape ;
sh:xone ( :Catalog_Shape :Dataset_Shape :Distribution_Shape :DataService_Shape :Agent_Shape :Kind_Shape :LicenseDocument_Shape ) .

:Kind_Shape a sh:NodeShape ;
rdfs:label "Kind"@en ;
rdfs:comment “Placeholder shape for vcard:Kind, currently not present in DCAT-AP v3 shapes” ;
sh:targetClass vcard:Kind .
2 changes: 1 addition & 1 deletion spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Abstract:

# Publishing changes about DCAT-AP entities # {#feed}

A DCAT-AP Feed is a Linked Data Event Stream with ActivityStream entities Create, Update and Deletes in it about the DCAT-AP entities in a catalog.
A DCAT-AP Feed is a Linked Data Event Stream with ActivityStream entities Create, Update and Delete in it about the DCAT-AP entities in a catalog.
DCAT-AP Feeds uses the [[!activitystreams-vocabulary]] to indicate the type of change.
Three type of activities can be described:
* a Create (i) or an Update (ii), both upserting a set of quads, packaged in a named graph, in the harvester, and
Expand Down

0 comments on commit 331e4d6

Please sign in to comment.