Skip to content

Commit

Permalink
shapes: replace sh:name and sh:description with RDFS
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVanAssche committed Aug 7, 2024
1 parent f730816 commit 3072e30
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 78 deletions.
60 changes: 30 additions & 30 deletions shapes/io.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://w3id.org/rml/shapes/RMLLogicalSourceShape> a sh:NodeShape ;
sh:description """
rdfs:comment """
A logical source is any source that is mapped to RDF triples.
""" ;
sh:message """
RML Logical Source requires one rml:source and depending on the source
type: one rml:referenceFormulation and/or one rml:iterator.
""" ;
sh:name "RML Logical Source" ;
sh:property [ sh:description """
rdfs:label "RML Logical Source" ;
sh:property [ rdfs:comment """
The source (rml:source) locates the input data source. It is a URI
that represents the data source where the data source is.
""" ;
Expand All @@ -48,12 +48,12 @@
rml:source must be provided exactly once as an URI.
""" ;
sh:minCount 1 ;
sh:name "rml:source" ;
rdfs:label "rml:source" ;
sh:node <http://w3id.org/rml/shapes/RMLSourceShape> ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:path rml:source ],
[ sh:datatype xsd:string ;
sh:description """
rdfs:comment """
The logical iterator (rml:iterator) defines the iteration loop used to
map the data of the input source. Depends on the reference formulation
if an iterator is necessary.
Expand All @@ -64,10 +64,10 @@
the data source.
""" ;
sh:minCount 0 ;
sh:name "rml:iterator" ;
rdfs:label "rml:iterator" ;
sh:nodeKind sh:Literal ;
sh:path rml:iterator ],
[ sh:description """
[ rdfs:comment """
The reference formulation (rml:referenceFormulation) defines how to
reference to elements of the data of the input source.
""" ;
Expand All @@ -77,22 +77,22 @@
reference formulation on how to reference elements of a data source.
""" ;
sh:minCount 0 ;
sh:name "rml:referenceFormulation" ;
rdfs:label "rml:referenceFormulation" ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:path rml:referenceFormulation ] ;
sh:targetClass rml:LogicalSource ;
sh:targetObjectsOf rml:logicalSource .

<http://w3id.org/rml/shapes/RMLLogicalTargetShape> a sh:NodeShape ;
sh:description """
rdfs:comment """
A logical target is any target to where generated RDF triples are exported
to.
""" ;
sh:message """
RML Logical Target requires one rml:target.
""" ;
sh:name "RML Logical Target" ;
sh:property [ sh:description """
rdfs:label "RML Logical Target" ;
sh:property [ rdfs:comment """
The target (rml:target) locates the output target. It is a URI
that represents the target where it must export generated RDF triples
to.
Expand All @@ -103,15 +103,15 @@
be provided exactly once as an URI.
""" ;
sh:minCount 1 ;
sh:name "rml:target" ;
rdfs:label "rml:target" ;
sh:node <http://w3id.org/rml/shapes/RMLTargetShape> ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:path rml:target ] ;
sh:targetClass rml:LogicalTarget ;
sh:targetObjectsOf rml:logicalTarget .

<http://w3id.org/rml/shapes/RMLSourceShape> a sh:NodeShape ;
sh:description """
rdfs:comment """
A source describes access to a data source. Any data access description
is allowed, but rml:Source provides additional properties to complete
such descriptions.
Expand All @@ -120,20 +120,20 @@
RML Source accepts one or multiple rml:null, one rml:compression,
and one rml:encoding. All of them are optional.
""" ;
sh:name "RML Source" ;
rdfs:label "RML Source" ;
sh:property [ sh:datatype xsd:string ;
sh:description """
rdfs:comment """
rml:null specifies how NULL or empty values are exposed by the data
source.
""" ;
sh:message """
rml:source must be provided as a string Literal.
""" ;
sh:minCount 0 ;
sh:name "rml:null" ;
rdfs:label "rml:null" ;
sh:nodeKind sh:Literal ;
sh:path rml:null ],
[ sh:description """
[ rdfs:comment """
rml:compression specifies the compression algorithm to use when
accessing the data source. By default, no compression is applied.
""" ;
Expand All @@ -142,10 +142,10 @@
rml:compression must be provided as an IRI.
""" ;
sh:minCount 0 ;
sh:name "rml:compression" ;
rdfs:label "rml:compression" ;
sh:nodeKind sh:IRI ;
sh:path rml:compression ],
[ sh:description """
[ rdfs:comment """
rml:encoding specifies the encoding to use when accessing the data
source. By default, UTF-8 is used.
""" ;
Expand All @@ -154,10 +154,10 @@
rml:encoding must be provided as an IRI.
""" ;
sh:minCount 0 ;
sh:name "rml:encoding" ;
rdfs:label "rml:encoding" ;
sh:nodeKind sh:IRI ;
sh:path rml:encoding ],
[ sh:description """
[ rdfs:comment """
rml:null specifies which data values inside the source should be
considered as NULL. Defaults to the default NULL character of a source,
if available.
Expand All @@ -166,14 +166,14 @@
rml:null must be provided as a Literal.
""" ;
sh:minCount 0 ;
sh:name "rml:null" ;
rdfs:label "rml:null" ;
sh:nodeKind sh:Literal ;
sh:path rml:null ] ;
sh:targetClass rml:Source ;
sh:targetObjectsOf rml:source .

<http://w3id.org/rml/shapes/RMLTargetShape> a sh:NodeShape ;
sh:description """
rdfs:comment """
A target describes access to a data target. Any data access description
is allowed, but rml:Target provides additional properties to complete
such descriptions.
Expand All @@ -182,8 +182,8 @@
RML Target accepts one rml:compression, and one rml:encoding.
All of them are optional.
""" ;
sh:name "RML Target" ;
sh:property [ sh:description """
rdfs:label "RML Target" ;
sh:property [ rdfs:comment """
rml:compression specifies the compression algorithm to use when
accessing the data target. By default, no compression is applied.
""" ;
Expand All @@ -192,10 +192,10 @@
rml:compression must be provided as an IRI.
""" ;
sh:minCount 0 ;
sh:name "rml:compression" ;
rdfs:label "rml:compression" ;
sh:nodeKind sh:IRI ;
sh:path rml:compression ],
[ sh:description """
[ rdfs:comment """
rml:encoding specifies the encoding to use when accessing the data
target. By default, UTF-8 is used.
""" ;
Expand All @@ -204,10 +204,10 @@
rml:encoding must be provided as an IRI.
""" ;
sh:minCount 0 ;
sh:name "rml:encoding" ;
rdfs:label "rml:encoding" ;
sh:nodeKind sh:IRI ;
sh:path rml:encoding ],
[ sh:description """
[ rdfs:comment """
rml:serialization specifies the serialization format to use when
exporting the generated RDF to a target. By default N-Quads is used.
""" ;
Expand All @@ -216,7 +216,7 @@
rml:serialization must be provided as an IRI.
""" ;
sh:minCount 0 ;
sh:name "rml:serialization" ;
rdfs:label "rml:serialization" ;
sh:nodeKind sh:IRI ;
sh:path rml:serialization ] ;
sh:targetClass rml:Target ;
Expand Down
19 changes: 10 additions & 9 deletions shapes/logical_source.ttl
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
###############################################################################
# RML Logical Source shape #
# Copyright Dylan Van Assche, IDLab - UGent - imec (2020 - 2023) #
# Copyright Dylan Van Assche, IDLab - UGent - imec (2020 - 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/> .
Expand All @@ -13,8 +14,8 @@
sh:targetObjectsOf rml:logicalSource ; # Object of rml:TriplesMap
sh:targetClass rml:LogicalSource ; # Used as a class
# Already targets 'rml:logicalSource'
sh:name "RML Logical Source" ;
sh:description """
rdfs:label "RML Logical Source" ;
rdfs:comment """
A logical source is any source that is mapped to RDF triples.
""" ;
sh:message """
Expand All @@ -25,8 +26,8 @@
# rml:source
sh:property [
sh:path rml:source ;
sh:name "rml:source" ;
sh:description """
rdfs:label "rml:source" ;
rdfs:comment """
The source (rml:source) locates the input data source. It is a URI
that represents the data source where the data source is.
""" ;
Expand All @@ -43,8 +44,8 @@
# rml:iterator
sh:property [
sh:path rml:iterator ;
sh:name "rml:iterator" ;
sh:description """
rdfs:label "rml:iterator" ;
rdfs:comment """
The logical iterator (rml:iterator) defines the iteration loop used to
map the data of the input source. Depends on the reference formulation
if an iterator is necessary.
Expand All @@ -62,8 +63,8 @@
# rml:referenceFormulation
sh:property [
sh:path rml:referenceFormulation ;
sh:name "rml:referenceFormulation" ;
sh:description """
rdfs:label "rml:referenceFormulation" ;
rdfs:comment """
The reference formulation (rml:referenceFormulation) defines how to
reference to elements of the data of the input source.
""" ;
Expand Down
11 changes: 6 additions & 5 deletions shapes/logical_target.ttl
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
###############################################################################
# RML Logical Target 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/> .
Expand All @@ -13,8 +14,8 @@
sh:targetObjectsOf rml:logicalTarget ; # Object of rml:TriplesMap
sh:targetClass rml:LogicalTarget ; # Used as a class
# Already targets 'rml:logicalTarget'
sh:name "RML Logical Target" ;
sh:description """
rdfs:label "RML Logical Target" ;
rdfs:comment """
A logical target is any target to where generated RDF triples are exported
to.
""" ;
Expand All @@ -25,8 +26,8 @@
# rml:target
sh:property [
sh:path rml:target ;
sh:name "rml:target" ;
sh:description """
rdfs:label "rml:target" ;
rdfs:comment """
The target (rml:target) locates the output target. It is a URI
that represents the target where it must export generated RDF triples
to.
Expand Down
13 changes: 7 additions & 6 deletions shapes/relative_path_source.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Copyright Dylan Van Assche, IDLab - UGent - imec (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/> .
Expand All @@ -11,8 +12,8 @@
:RMLRelativePathSourceShape
a sh:NodeShape ;
sh:targetClass rml:RelativePathSource ; # Used as a class
sh:name "RML Relative Path Source" ;
sh:description """
rdfs:label "RML Relative Path Source" ;
rdfs:comment """
A RML Relative Path Source provides a source with relative paths which is
not provided by existing vocabularies such as DCAT without a base IRI.
""" ;
Expand All @@ -24,8 +25,8 @@
# rml:root
sh:property [
sh:path rml:root ;
sh:name "rml:root" ;
sh:description """
rdfs:label "rml:root" ;
rdfs:comment """
rml:root defines the root directory against which relative paths are
resolved. If not provided, defaults to the current working directory.
""" ;
Expand All @@ -41,8 +42,8 @@
# rml:path
sh:property [
sh:path rml:path ;
sh:name "rml:path" ;
sh:description """
rdfs:label "rml:path" ;
rdfs:comment """
rml:path specifies the relative path to access for the source.
""" ;
sh:message """
Expand Down
13 changes: 7 additions & 6 deletions shapes/relative_path_target.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Copyright Dylan Van Assche, IDLab - UGent - imec (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/> .
Expand All @@ -11,8 +12,8 @@
:RMLRelativePathTargetShape
a sh:NodeShape ;
sh:targetClass rml:RelativePathTarget ; # Used as a class
sh:name "RML Relative Path Target" ;
sh:description """
rdfs:label "RML Relative Path Target" ;
rdfs:comment """
A RML Relative Path Target provides a target with relative paths which is
not provided by existing vocabularies such as DCAT without a base IRI.
""" ;
Expand All @@ -24,8 +25,8 @@
# rml:root
sh:property [
sh:path rml:root ;
sh:name "rml:root" ;
sh:description """
rdfs:label "rml:root" ;
rdfs:comment """
rml:root defines the root directory against which relative paths are
resolved. If not provided, defaults to the current working directory.
""" ;
Expand All @@ -41,8 +42,8 @@
# rml:path
sh:property [
sh:path rml:path ;
sh:name "rml:path" ;
sh:description """
rdfs:label "rml:path" ;
rdfs:comment """
rml:path specifies the relative path to access for the target.
""" ;
sh:message """
Expand Down
Loading

0 comments on commit 3072e30

Please sign in to comment.