Our implementation for an open automated ontology management process for GAIA-X interoperable ecosystems. Please use a community agreed domain specific class or if not yet available please create a new class and submit it for review.
Other
5
stars
3
forks
source link
Define which information has to be provided per class, node or simple data types #83
Our SHACL shapes define the attributes of the shapes they represent.
Most of our attributes with simple data types (here: unsignedInt in hdmap.QualityShape) are defined like this:
[ skos:example "100" ;
sh:datatype xsd:unsignedInt ;
sh:description "Sum of all objects outlines in the map, see ODR spec section 11.2"@en ;
sh:maxCount 1 ;
sh:message "Validation of numberOutlines failed!"@en ;
sh:name "numberOutlines"@en ;
sh:order 6 ;
sh:path hdmap:numberOutlines ],
In Range2DShape we have for a float:
sh:property [ sh:datatype xsd:float ;
sh:message "Validation of max failed!"@en ;
sh:name "max"@en ;
sh:order 0 ;
sh:path general:max ],
This is quite heterogen since attributes are defined differently.
Target situation
There should be a definition in the Readme file as well as in the examples folder (example as well as template) which attributes have to be / should be used. With this we can achieve more homogeneity, comparability and it looks as if it comes from one single cast.
Proposal
Definition for simple data types like int, float, string, uri, ...
skos:example (optional, depends on if there is a good example)
sh:datatype
sh:description
sh:minCount (optional, default is 0)
sh:maxCount (optional, but highly recommended to set it explicitely since default is unlimited)
sh:message
sh:name
sh:order (optional if only one attribute exists)
sh:path
rdfs:label (make sure there is a prefix defined).
rdfs:comment
Definition for embedded nodes with sh:node:
sh:description
sh:minCount (default is 0)
sh:maxCount (default is unlimited)
sh:message
sh:name
sh:order (optional if only one attribute exists)
sh:path
rdfs:label (make sure there is a prefix defined).
rdfs:comment
note that example is removed here. The description field is also very important for embedded Shapes as well as for linked nodes.
Definition for links with sh:nodeKind sh:IRI
sh:datatype
sh:description
sh:minCount (default is 0)
sh:maxCount (default is unlimited)
sh:message
sh:name
sh:order (optional if only one attribute exists)
sh:path
rdfs:label (make sure there is a prefix defined).
rdfs:comment
note that example is removed here. The description field is also very important for embedded Shapes as well as for linked nodes.
Current situation
Our SHACL shapes define the attributes of the shapes they represent.
Most of our attributes with simple data types (here:
unsignedInt
inhdmap.QualityShape
) are defined like this:In
Range2DShape
we have for afloat
:This is quite heterogen since attributes are defined differently.
Target situation There should be a definition in the Readme file as well as in the
examples
folder (example as well as template) which attributes have to be / should be used. With this we can achieve more homogeneity, comparability and it looks as if it comes from one single cast.Proposal
Definition for simple data types like
int
,float
,string
,uri
, ...Definition for embedded nodes with
sh:node
:sh:nodeKind sh:IRI