-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shapes: relative_path_{source,target}: add RelativePath{Source,Target…
…} shapes
- Loading branch information
1 parent
36bc4ef
commit c0c01c8
Showing
2 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ; | ||
] ; | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ; | ||
] ; | ||
. |