From f4e73e2de47e194640cb73b436656f86b4f2ea36 Mon Sep 17 00:00:00 2001 From: Dylan Van Assche Date: Thu, 1 Aug 2024 09:26:18 +0200 Subject: [PATCH] shapes: replace sh:name and sh:description with RDFS Fixes https://github.com/kg-construct/rml-core/issues/139 --- shapes/fnml.ttl | 60 +++++++++++++++++------------------ shapes/function_execution.ttl | 25 ++++++++------- shapes/function_map.ttl | 9 +++--- shapes/input.ttl | 33 +++++++++---------- shapes/parameter_map.ttl | 9 +++--- shapes/return_map.ttl | 9 +++--- 6 files changed, 75 insertions(+), 70 deletions(-) diff --git a/shapes/fnml.ttl b/shapes/fnml.ttl index 8970d40..9bf5b20 100644 --- a/shapes/fnml.ttl +++ b/shapes/fnml.ttl @@ -30,11 +30,11 @@ @prefix xsd: . a sh:NodeShape ; - sh:description """ + rdfs:comment """ Represents a Function Execution. """ ; - sh:name "rml:FunctionExecution" ; - sh:property [ sh:description """ + rdfs:label "rml:FunctionExecution" ; + sh:property [ rdfs:comment """ Exactly one rml:function or rml:functionMap is required. """ ; sh:maxCount 1 ; @@ -42,52 +42,52 @@ Exactly one rml:function or rml:functionMap is required. """ ; sh:minCount 1 ; - sh:name "rml:function/rml:functionMap" ; + rdfs:label "rml:function/rml:functionMap" ; sh:path [ sh:alternativePath ( rml:function rml:functionMap ) ] ], - [ sh:description """ + [ rdfs:comment """ FnO function to execute. """ ; sh:message """ rml:functionMap must be an IRI or Blank node. """ ; - sh:name "rml:functionMap" ; + rdfs:label "rml:functionMap" ; sh:node ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:functionMap ], - [ sh:description """ + [ rdfs:comment """ FnO function to execute. """ ; sh:message """ rml:function must be an IRI. """ ; - sh:name "rml:function" ; + rdfs:label "rml:function" ; sh:nodeKind sh:IRI ; sh:path rml:function ], - [ sh:description """ + [ rdfs:comment """ Input parameters for the function. """ ; sh:message """ rml:input must be an IRI or Blank node. """ ; - sh:name "rml:input" ; + rdfs:label "rml:input" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:input ] ; sh:targetObjectsOf rml:functionExecution . a sh:NodeShape ; sh:and ( [ ] ) ; - sh:description """ + rdfs:comment """ Represents a Function Map. """ ; - sh:name "FunctionMap" ; + rdfs:label "FunctionMap" ; sh:targetObjectsOf rml:functionMap . a sh:NodeShape ; - sh:description """ + rdfs:comment """ Represents an Input for a function. """ ; - sh:name "rml:Input" ; - sh:property [ sh:description """ + rdfs:label "rml:Input" ; + sh:property [ rdfs:comment """ Exactly one rml:parameter or rml:parameterMap is required. """ ; sh:maxCount 1 ; @@ -95,51 +95,51 @@ Exactly one rml:parameter or rml:parameterMap is required. """ ; sh:minCount 1 ; - sh:name "rml:parameter/rml:parameterMap" ; + rdfs:label "rml:parameter/rml:parameterMap" ; sh:path [ sh:alternativePath ( rml:parameter rml:parameterMap ) ] ], - [ sh:description """ + [ rdfs:comment """ Values of the parameters. """ ; sh:maxCount 1 ; sh:message """ rml:inputValueMap must be an IRI or Blank node, provided once. """ ; - sh:name "rml:inputValueMap" ; + rdfs:label "rml:inputValueMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:inputValueMap ], [ sh:datatype xsd:string ; - sh:description """ + rdfs:comment """ Parameters to supply to FnO function. """ ; sh:maxCount 1 ; sh:message """ rml:inputValue must be a string Literal. """ ; - sh:name "rml:inputValue" ; + rdfs:label "rml:inputValue" ; sh:nodeKind sh:Literal ; sh:path rml:inputValue ], - [ sh:description """ + [ rdfs:comment """ Parameters to supply to FnO function. """ ; sh:maxCount 1 ; sh:message """ rml:parameterMap must be an IRI or Blank node. """ ; - sh:name "rml:parameterMap" ; + rdfs:label "rml:parameterMap" ; sh:node ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:parameterMap ], - [ sh:description """ + [ rdfs:comment """ Parameters to supply to FnO function. """ ; sh:maxCount 1 ; sh:message """ rml:parameter must be an IRI. """ ; - sh:name "rml:parameter" ; + rdfs:label "rml:parameter" ; sh:nodeKind sh:IRI ; sh:path rml:parameter ], - [ sh:description """ + [ rdfs:comment """ Exactly one rml:inputValue or rml:inputValueMap is required. """ ; sh:maxCount 1 ; @@ -147,24 +147,24 @@ Exactly one rml:inputValue or rml:inputValueMap is required. """ ; sh:minCount 1 ; - sh:name "rml:inputValue/rml:inputValueMap" ; + rdfs:label "rml:inputValue/rml:inputValueMap" ; sh:path [ sh:alternativePath ( rml:inputValue rml:inputValueMap ) ] ] ; sh:targetObjectsOf rml:input . a sh:NodeShape ; sh:and ( [ ] ) ; - sh:description """ + rdfs:comment """ Represents a Parameter Map of a function. """ ; - sh:name "ParameterMap" ; + rdfs:label "ParameterMap" ; sh:targetObjectsOf rml:parameterMap . a sh:NodeShape ; sh:and ( [ ] ) ; - sh:description """ + rdfs:comment """ Represents a Return Map. """ ; - sh:name "ReturnMap" ; + rdfs:label "ReturnMap" ; sh:targetObjectsOf rml:returnMap . a sh:NodeShape . diff --git a/shapes/function_execution.ttl b/shapes/function_execution.ttl index 5c2d3b2..275e767 100644 --- a/shapes/function_execution.ttl +++ b/shapes/function_execution.ttl @@ -1,8 +1,9 @@ ############################################################################### -# RML FunctionExecution shape # -# Copyright Dylan Van Assche, IDLab - UGent - imec (2023) # +# RML FunctionExecution shape # +# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024) # ############################################################################### @prefix sh: . +@prefix rdfs: . @prefix : . @prefix rdf: . @prefix rml: . @@ -10,8 +11,8 @@ :RMLFunctionExecutionShape a sh:NodeShape ; - sh:name "rml:FunctionExecution" ; - sh:description """ + rdfs:label "rml:FunctionExecution" ; + rdfs:comment """ Represents a Function Execution. """ ; sh:targetObjectsOf rml:functionExecution ; @@ -20,8 +21,8 @@ sh:property [ sh:path [sh:alternativePath (rml:function rml:functionMap)] ; - sh:name "rml:function/rml:functionMap" ; - sh:description """ + rdfs:label "rml:function/rml:functionMap" ; + rdfs:comment """ Exactly one rml:function or rml:functionMap is required. """ ; sh:message """ @@ -34,8 +35,8 @@ # rml:functionMap non-shortcut sh:property [ sh:path rml:functionMap ; - sh:name "rml:functionMap" ; - sh:description """ + rdfs:label "rml:functionMap" ; + rdfs:comment """ FnO function to execute. """ ; sh:message """ @@ -48,8 +49,8 @@ # rml:function shortcut sh:property [ sh:path rml:function ; - sh:name "rml:function" ; - sh:description """ + rdfs:label "rml:function" ; + rdfs:comment """ FnO function to execute. """ ; sh:message """ @@ -61,8 +62,8 @@ # rml:input sh:property [ sh:path rml:input ; - sh:name "rml:input" ; - sh:description """ + rdfs:label "rml:input" ; + rdfs:comment """ Input parameters for the function. """ ; sh:message """ diff --git a/shapes/function_map.ttl b/shapes/function_map.ttl index 2d020e1..0c37a50 100644 --- a/shapes/function_map.ttl +++ b/shapes/function_map.ttl @@ -1,8 +1,9 @@ ############################################################################### -# RML Function Map shape # -# Copyright Dylan Van Assche, IDLab - UGent - imec (2023) # +# RML Function Map shape # +# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024) # ############################################################################### @prefix sh: . +@prefix rdfs: . @prefix : . @prefix rdf: . @prefix rml: . @@ -10,8 +11,8 @@ :RMLFunctionMapShape a sh:NodeShape ; - sh:name "FunctionMap" ; - sh:description """ + rdfs:label "FunctionMap" ; + rdfs:comment """ Represents a Function Map. """ ; sh:targetObjectsOf rml:functionMap ; diff --git a/shapes/input.ttl b/shapes/input.ttl index 2e4ad5e..bb791ee 100644 --- a/shapes/input.ttl +++ b/shapes/input.ttl @@ -1,8 +1,9 @@ ############################################################################### -# RML Input shape # -# Copyright Dylan Van Assche, IDLab - UGent - imec (2023) # +# RML Input shape # +# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024) # ############################################################################### @prefix sh: . +@prefix rdfs: . @prefix : . @prefix rdf: . @prefix rml: . @@ -10,8 +11,8 @@ :RMLInputShape a sh:NodeShape ; - sh:name "rml:Input" ; - sh:description """ + rdfs:label "rml:Input" ; + rdfs:comment """ Represents an Input for a function. """ ; sh:targetObjectsOf rml:input ; @@ -20,8 +21,8 @@ sh:property [ sh:path [sh:alternativePath (rml:parameter rml:parameterMap)] ; - sh:name "rml:parameter/rml:parameterMap" ; - sh:description """ + rdfs:label "rml:parameter/rml:parameterMap" ; + rdfs:comment """ Exactly one rml:parameter or rml:parameterMap is required. """ ; sh:message """ @@ -34,8 +35,8 @@ # rml:parameterMap non-shortcut sh:property [ sh:path rml:parameterMap ; - sh:name "rml:parameterMap" ; - sh:description """ + rdfs:label "rml:parameterMap" ; + rdfs:comment """ Parameters to supply to FnO function. """ ; sh:message """ @@ -49,8 +50,8 @@ # rml:parameter shortcut sh:property [ sh:path rml:parameter ; - sh:name "rml:parameter" ; - sh:description """ + rdfs:label "rml:parameter" ; + rdfs:comment """ Parameters to supply to FnO function. """ ; sh:message """ @@ -64,8 +65,8 @@ sh:property [ sh:path [sh:alternativePath (rml:inputValue rml:inputValueMap)] ; - sh:name "rml:inputValue/rml:inputValueMap" ; - sh:description """ + rdfs:label "rml:inputValue/rml:inputValueMap" ; + rdfs:comment """ Exactly one rml:inputValue or rml:inputValueMap is required. """ ; sh:message """ @@ -78,8 +79,8 @@ # rml:inputValueMap sh:property [ sh:path rml:inputValueMap ; - sh:name "rml:inputValueMap" ; - sh:description """ + rdfs:label "rml:inputValueMap" ; + rdfs:comment """ Values of the parameters. """ ; sh:message """ @@ -92,8 +93,8 @@ # rml:inputValue shortcut sh:property [ sh:path rml:inputValue ; - sh:name "rml:inputValue" ; - sh:description """ + rdfs:label "rml:inputValue" ; + rdfs:comment """ Parameters to supply to FnO function. """ ; sh:message """ diff --git a/shapes/parameter_map.ttl b/shapes/parameter_map.ttl index 3ae9b69..25bc52c 100644 --- a/shapes/parameter_map.ttl +++ b/shapes/parameter_map.ttl @@ -1,8 +1,9 @@ ############################################################################### -# RML Parameter Map shape # -# Copyright Dylan Van Assche, IDLab - UGent - imec (2023) # +# RML Parameter Map shape # +# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024) # ############################################################################### @prefix sh: . +@prefix rdfs: . @prefix : . @prefix rdf: . @prefix rml: . @@ -10,8 +11,8 @@ :RMLParameterMapShape a sh:NodeShape ; - sh:name "ParameterMap" ; - sh:description """ + rdfs:label "ParameterMap" ; + rdfs:comment """ Represents a Parameter Map of a function. """ ; sh:targetObjectsOf rml:parameterMap ; diff --git a/shapes/return_map.ttl b/shapes/return_map.ttl index b06802a..2e5b044 100644 --- a/shapes/return_map.ttl +++ b/shapes/return_map.ttl @@ -1,8 +1,9 @@ ############################################################################### -# RML Return Map shape # -# Copyright Dylan Van Assche, IDLab - UGent - imec (2023) # +# RML Return Map shape # +# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024) # ############################################################################### @prefix sh: . +@prefix rdfs: . @prefix : . @prefix rdf: . @prefix rml: . @@ -10,8 +11,8 @@ :RMLReturnMapShape a sh:NodeShape ; - sh:name "ReturnMap" ; - sh:description """ + rdfs:label "ReturnMap" ; + rdfs:comment """ Represents a Return Map. """ ; sh:targetObjectsOf rml:returnMap ;