Skip to content

Commit

Permalink
Add subject shape property
Browse files Browse the repository at this point in the history
This is for subject graph streams. Added this along with new rules in SHACL to validate the annotation. Added shacl.ttl to the imports because SHACL will be used in the docs.
  • Loading branch information
Ostrzyciel committed Oct 30, 2023
1 parent e2d52c2 commit 6c08431
Show file tree
Hide file tree
Showing 4 changed files with 1,718 additions and 7 deletions.
37 changes: 31 additions & 6 deletions src/dataset-shacl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
[ sh:oneOrMorePath skos:broader ]
) ;
sh:minCount 1 ;
sh:hasValue stax:flatRdfStream ;
sh:hasValue stax:flatStream ;
]
.

Expand All @@ -221,7 +221,7 @@
[ sh:oneOrMorePath skos:broader ]
) ;
sh:minCount 1 ;
sh:hasValue stax:groupedRdfStream ;
sh:hasValue stax:groupedStream ;
] , [
sh:path (
stax:hasStreamType
Expand All @@ -238,7 +238,7 @@
# We must have exactly one flat stream type annotation
:FlatStreamTypeShape
a sh:NodeShape ;
sh:targetNode stax:flatRdfStream ;
sh:targetNode stax:flatStream ;
sh:property [
sh:path (
[ sh:oneOrMorePath skos:narrower ]
Expand All @@ -253,9 +253,34 @@

:StreamElementSplitShape
a sh:NodeShape ;
sh:property
[
sh:property [
sh:path rdf:type ;
sh:in (rb:TimeStreamElementSplit rb:StatementCountStreamElementSplit rb:TopicStreamElementSplit) ;
sh:in (
rb:TimeStreamElementSplit
rb:StatementCountStreamElementSplit
rb:TopicStreamElementSplit
) ;
]
.

:SubjectShapeShape
a sh:NodeShape ;
sh:targetSubjectsOf rb:hasSubjectShape ;
sh:property [
sh:path rdf:type ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:hasValue rb:TopicStreamElementSplit ;
] , [
sh:path (
rb:hasSubjectShape
[ sh:alternativePath (
sh:targetClass
sh:targetSubjectsOf
sh:targetObjectsOf
) ]
) ;
sh:minCount 1 ;
sh:nodeKind sh:IRI ;
]
.
6 changes: 5 additions & 1 deletion src/documentation.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
dc:description "Ontology with metadata needed to generate documentation of datasets, distributions, profiles, etc. in RiverBench"@en ;
dc:title "RiverBench documentation ontology"@en ;
dcterms:created "2023-04-30T00:00:00"^^xsd:dateTime ;
dcterms:creator _:genid1, "Piotr Sowiński"@en ;
dcterms:creator _:genid1 ;
dcterms:issued "2023-05-05T00:00:00"^^xsd:dateTime ;
dcterms:license <https://spdx.org/licenses/CC-BY-4.0> ;
vann:preferredNamespacePrefix "rbdoc" ;
Expand Down Expand Up @@ -312,6 +312,10 @@ rb:hasStreamElementSplit rbdoc:hasDocWeight "1002"^^xsd:int ;
rbdoc:hasDocGroup rbdoc:groupTechnicalMetadata .


rb:hasSubjectShape rbdoc:hasDocGroup rbdoc:groupTechnicalMetadata ;
rbdoc:hasDocWeight "1021"^^xsd:int .


rb:hasTemporalProperty rbdoc:hasDocGroup rbdoc:groupTechnicalMetadata ;
rbdoc:hasDocWeight "1020"^^xsd:int .

Expand Down
Loading

0 comments on commit 6c08431

Please sign in to comment.