Skip to content

Commit

Permalink
Merge pull request #50 from kg-construct/rml-core-github-139
Browse files Browse the repository at this point in the history
shapes: replace sh:name and sh:description with RDFS
  • Loading branch information
chrdebru authored Oct 13, 2024
2 parents 90ab040 + 03333ba commit 99d568e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
20 changes: 10 additions & 10 deletions shapes/cc.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://w3id.org/rml/shapes/RMLGatherMapShape> a sh:NodeShape ;
sh:and ( <http://w3id.org/rml/shapes/RMLTermMapShape> <http://w3id.org/rml/shapes/RMLLogicalTargetPropertiesShape> [ sh:description """
sh:and ( <http://w3id.org/rml/shapes/RMLTermMapShape> <http://w3id.org/rml/shapes/RMLLogicalTargetPropertiesShape> [ rdfs:comment """
rml:strategy specifies the collection strategy to use: rml:append
or rml:cartesianProduct. rml:append is the default strategy.
""" ;
Expand All @@ -39,10 +39,10 @@
Zero or one rml:strategy is required.
""" ;
sh:minCount 0 ;
sh:name "strategy" ;
rdfs:label "strategy" ;
sh:node <http://w3id.org/rml/shapes/RMLStrategyAppendShape> ;
sh:nodeKind sh:IRI ;
sh:path rml:strategy ] [ sh:description """
sh:path rml:strategy ] [ rdfs:comment """
rml:gatherAs specifies how to gather the collection e.g. a rdf:Alt,
rdf:List, rdf:Bag, or rdf:Seq.
""" ;
Expand All @@ -52,10 +52,10 @@
One rml:gatherAs is required.
""" ;
sh:minCount 1 ;
sh:name "gatherAs" ;
rdfs:label "gatherAs" ;
sh:nodeKind sh:IRI ;
sh:path rml:gatherAs ] [ sh:datatype xsd:boolean ;
sh:description """
rdfs:comment """
Defines the behavior when the collection is empty. True will generate
a rdf:nil for a RDF collection or a resource with no members for an RDF
container. False will not generate any collection or container.
Expand All @@ -67,27 +67,27 @@
xsd:boolean.
""" ;
sh:minCount 0 ;
sh:name "allowEmptyListAndContainer" ;
rdfs:label "allowEmptyListAndContainer" ;
sh:nodeKind sh:Literal ;
sh:path rml:allowEmptyListAndContainer ] [ sh:description """
sh:path rml:allowEmptyListAndContainer ] [ rdfs:comment """
RML Term Maps to gather in the collection or container.
""" ;
sh:message """
one or more rml:gather properties are needed, each pointing to a
RML Term Map.
""" ;
sh:minCount 1 ;
sh:name "gather" ;
rdfs:label "gather" ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:path rml:gather ] ) ;
sh:description """
rdfs:comment """
Represents a Gather Map.
""" ;
sh:message """
Gather Map requires one rml:strategy, one rml:gatherAs, and a list of
Term Map with rml:gather.
""" ;
sh:name "GatherMap" .
rdfs:label "GatherMap" .

<http://w3id.org/rml/shapes/RMLLogicalTargetPropertiesShape> a sh:NodeShape .

Expand Down
23 changes: 12 additions & 11 deletions shapes/gather_map.ttl
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
###############################################################################
# RMLCC Gather Map shape #
# Copyright Dylan Van Assche, IDLab - UGent - imec (2023) #
# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024) #
###############################################################################
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix : <http://w3id.org/rml/shapes/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

:RMLGatherMapShape
a sh:NodeShape ;
sh:name "GatherMap" ;
sh:description """
rdfs:label "GatherMap" ;
rdfs:comment """
Represents a Gather Map.
""" ;
sh:message """
Expand All @@ -26,8 +27,8 @@
# Gather Map specific shapes
[
sh:path rml:strategy ;
sh:name "strategy" ;
sh:description """
rdfs:label "strategy" ;
rdfs:comment """
rml:strategy specifies the collection strategy to use: rml:append
or rml:cartesianProduct. rml:append is the default strategy.
""" ;
Expand All @@ -41,8 +42,8 @@
]
[
sh:path rml:gatherAs ;
sh:name "gatherAs" ;
sh:description """
rdfs:label "gatherAs" ;
rdfs:comment """
rml:gatherAs specifies how to gather the collection e.g. a rdf:Alt,
rdf:List, rdf:Bag, or rdf:Seq.
""" ;
Expand All @@ -56,8 +57,8 @@
]
[
sh:path rml:allowEmptyListAndContainer ;
sh:name "allowEmptyListAndContainer" ;
sh:description """
rdfs:label "allowEmptyListAndContainer" ;
rdfs:comment """
Defines the behavior when the collection is empty. True will generate
a rdf:nil for a RDF collection or a resource with no members for an RDF
container. False will not generate any collection or container.
Expand All @@ -74,8 +75,8 @@
]
[
sh:path rml:gather ;
sh:name "gather" ;
sh:description """
rdfs:label "gather" ;
rdfs:comment """
RML Term Maps to gather in the collection or container.
""" ;
sh:message """
Expand Down

0 comments on commit 99d568e

Please sign in to comment.