Skip to content

Commit

Permalink
shapes: relative_path_{source,target}: add RelativePath{Source,Target…
Browse files Browse the repository at this point in the history
…} shapes
  • Loading branch information
DylanVanAssche committed Jul 3, 2024
1 parent 36bc4ef commit c0c01c8
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 0 deletions.
55 changes: 55 additions & 0 deletions shapes/relative_path_source.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
###############################################################################
# RML Relative Path Source shape #
# Copyright Dylan Van Assche, IDLab - UGent - imec (2024) #
###############################################################################
@prefix sh: <http://www.w3.org/ns/shacl#> .
@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#> .

:RMLRelativePathSourceShape
a sh:NodeShape ;
sh:targetClass rml:RelativePathSource ; # Used as a class
sh:name "RML Relative Path Source" ;
sh:description """
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.
""" ;
sh:message """
RML Relative Path Source accepts one rml:root, and one rml:path.
rml:root is optional and defaults to rml:CurrentWorkingDirectory.
""" ;

# rml:root
sh:property [
sh:path rml:root ;
sh:name "rml:root" ;
sh:description """
rml:root defines the root directory against which relative paths are
resolved. If not provided, defaults to the current working directory.
""" ;
sh:message """
rml:root must be either rml:CurrentWorkingDirectory or
rml:MappingDirectory.
""" ;
sh:minCount 0 ;
sh:maxCount 1 ;
sh:in (rml:CurrentWorkingDirectory rml:MappingDirectory) ;
] ;

# rml:path
sh:property [
sh:path rml:path ;
sh:name "rml:path" ;
sh:description """
rml:path specifies the relative path to access for the source.
""" ;
sh:message """
rml:path must be a string Literal.
""" ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:nodeKind sh:Literal ;
] ;
.
55 changes: 55 additions & 0 deletions shapes/relative_path_target.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
###############################################################################
# RML Relative Path Target shape #
# Copyright Dylan Van Assche, IDLab - UGent - imec (2024) #
###############################################################################
@prefix sh: <http://www.w3.org/ns/shacl#> .
@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#> .

:RMLRelativePathTargetShape
a sh:NodeShape ;
sh:targetClass rml:RelativePathTarget ; # Used as a class
sh:name "RML Relative Path Target" ;
sh:description """
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.
""" ;
sh:message """
RML Relative Path Target accepts one rml:root, and one rml:path.
rml:root is optional and defaults to rml:CurrentWorkingDirectory.
""" ;

# rml:root
sh:property [
sh:path rml:root ;
sh:name "rml:root" ;
sh:description """
rml:root defines the root directory against which relative paths are
resolved. If not provided, defaults to the current working directory.
""" ;
sh:message """
rml:root must be either rml:CurrentWorkingDirectory or
rml:MappingDirectory.
""" ;
sh:minCount 0 ;
sh:maxCount 1 ;
sh:in (rml:CurrentWorkingDirectory rml:MappingDirectory) ;
] ;

# rml:path
sh:property [
sh:path rml:path ;
sh:name "rml:path" ;
sh:description """
rml:path specifies the relative path to access for the target.
""" ;
sh:message """
rml:path must be a string Literal.
""" ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:nodeKind sh:Literal ;
] ;
.

0 comments on commit c0c01c8

Please sign in to comment.