Skip to content

Commit

Permalink
shapes: allow rml:URI, rml:UnsafeURI, and rml:UnsafeIRI as term types (
Browse files Browse the repository at this point in the history
…#134)

* shapes: allow rml:URI as term type

Contributes to #50

* shapes: allow rml:UnsafeIRI as term type

Contributes to #72

* shapes: allow rml:UnsafeURI as term type

Contributes to #72

* regenerate core shapes

---------

Co-authored-by: Pano Maria <[email protected]>
  • Loading branch information
DylanVanAssche and pmaria authored Jan 19, 2025
1 parent 78a4866 commit e314e71
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 19 deletions.
24 changes: 14 additions & 10 deletions shapes/core.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@
rdfs:comment """
Represents a Graph Map.
""" ;
sh:and ( <http://w3id.org/rml/shapes/RMLTermMapShape> <http://w3id.org/rml/shapes/RMLLogicalTargetPropertiesShape> [ sh:in ( rml:IRI rml:BlankNode ) ;
sh:and ( <http://w3id.org/rml/shapes/RMLTermMapShape> <http://w3id.org/rml/shapes/RMLLogicalTargetPropertiesShape> [ sh:in ( rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI rml:BlankNode ) ;
sh:message """
rml:termType must be an IRI or blank node for a Graph Map.
rml:termType must be an rml:IRI, rml:UnsafeIRI, rml:URI,
rml:UnsafeURI, or rml:BlankNode for a Graph Map.
""" ;
sh:path rml:termType ] ) ;
sh:message """
Expand Down Expand Up @@ -168,9 +169,10 @@
rdfs:comment """
Represents a Predicate Map.
""" ;
sh:and ( <http://w3id.org/rml/shapes/RMLTermMapShape> <http://w3id.org/rml/shapes/RMLLogicalTargetPropertiesShape> [ sh:in ( rml:IRI ) ;
sh:and ( <http://w3id.org/rml/shapes/RMLTermMapShape> <http://w3id.org/rml/shapes/RMLLogicalTargetPropertiesShape> [ sh:in ( rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI ) ;
sh:message """
rml:termType for Predicate Map can only be a rml:IRI;
rml:termType for Predicate Map can only be a rml:IRI, rml:UnsafeIRI,
rml:URI, or rml:UnsafeURI;
""" ;
sh:path rml:termType ] ) ;
sh:message """
Expand Down Expand Up @@ -373,7 +375,7 @@
A sub-class of iterable that can be associated with a triples map such that a data source can be mapped to RDF triples.
""" ;
sh:message """
Abstract Logical Source must specify how to generate logical iterations on a data source for a triples map.
rml:AbstractLogicalSource must specify how to generate logical iterations on a data source for a triples map.
""" ;
sh:node <http://w3id.org/rml/shapes/RMLIterableShape> ;
sh:targetClass rml:AbstractLogicalSource .
Expand Down Expand Up @@ -521,9 +523,10 @@
""" ;
sh:nodeKind sh:IRI ;
sh:path rml:class ;
sh:targetSubjectsOf rml:class ] [ sh:in ( rml:IRI rml:BlankNode ) ;
sh:targetSubjectsOf rml:class ] [ sh:in ( rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI rml:BlankNode ) ;
sh:message """
rml:termType must be a rml:IRI or rml:BlankNode for Subject Map.
rml:termType must be a rml:IRI, rml:UnsafeIRI, rml:URI,
rml:UnsafeURI, or rml:BlankNode for a Subject Map.
""" ;
sh:path rml:termType ] ) ;
sh:message """
Expand Down Expand Up @@ -644,11 +647,12 @@
An IRI indicating whether a generated term should be an IRI,
Blank Node, or a Literal.
""" ;
sh:in ( rml:IRI rml:Literal rml:BlankNode ) ;
sh:in ( rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI rml:Literal rml:BlankNode ) ;
sh:maxCount 1 ;
sh:message """
rml:termType must be either rml:IRI, rml:Literal, or rml:BlankNode
for a Term Map. May only be provided once.
rml:termType must be either rml:IRI, rml:UnsafeIRI,
rml:URI, rml:UnsafeURI, rml:Literal, or rml:BlankNode for a Term Map.
May only be provided once.
""" ;
sh:nodeKind sh:IRI ;
sh:path rml:termType ;
Expand Down
5 changes: 3 additions & 2 deletions shapes/graph_map.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
[
sh:path rml:termType;
sh:message """
rml:termType must be an IRI or blank node for a Graph Map.
rml:termType must be an rml:IRI, rml:UnsafeIRI, rml:URI,
rml:UnsafeURI, or rml:BlankNode for a Graph Map.
""";
sh:in (rml:IRI rml:BlankNode);
sh:in (rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI rml:BlankNode);
]
) ;
.
Expand Down
5 changes: 3 additions & 2 deletions shapes/predicate_map.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@
[
sh:path rml:termType;
sh:message """
rml:termType for Predicate Map can only be a rml:IRI;
rml:termType for Predicate Map can only be a rml:IRI, rml:UnsafeIRI,
rml:URI, or rml:UnsafeURI;
""";
sh:in (rml:IRI);
sh:in (rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI);
]
) ;
.
Expand Down
5 changes: 3 additions & 2 deletions shapes/subject_map.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@
[
sh:path rml:termType ;
sh:message """
rml:termType must be a rml:IRI or rml:BlankNode for Subject Map.
rml:termType must be a rml:IRI, rml:UnsafeIRI, rml:URI,
rml:UnsafeURI, or rml:BlankNode for a Subject Map.
""" ;
sh:in (rml:IRI rml:BlankNode);
sh:in (rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI rml:BlankNode);
]
) ;
.
Expand Down
7 changes: 4 additions & 3 deletions shapes/term_map.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@
Blank Node, or a Literal.
""" ;
sh:message """
rml:termType must be either rml:IRI, rml:Literal, or rml:BlankNode
for a Term Map. May only be provided once.
rml:termType must be either rml:IRI, rml:UnsafeIRI,
rml:URI, rml:UnsafeURI, rml:Literal, or rml:BlankNode for a Term Map.
May only be provided once.
""" ;
sh:maxCount 1 ;
sh:in (rml:IRI rml:Literal rml:BlankNode) ;
sh:in (rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI rml:Literal rml:BlankNode) ;
sh:nodeKind sh:IRI ;
]
) ;
Expand Down

0 comments on commit e314e71

Please sign in to comment.