Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define which information has to be provided per class, node or simple data types #83

Open
robertschubert opened this issue Jul 29, 2024 · 1 comment
Assignees

Comments

@robertschubert
Copy link
Collaborator

robertschubert commented Jul 29, 2024

Current situation

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.

@robertschubert
Copy link
Collaborator Author

Dear @lenasauermann and @pmai ,
as discussed on Friday here my proposal. Please feel free to comment / update it. Thanks!
Best
Robert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants