GAIA-X4PLC-AAD / ontology-management-base

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
6 stars 3 forks source link

Add a Ontology-Class for every Shape into the ontology.ttl #57

Open robertschubert opened 5 months ago

robertschubert commented 5 months ago

Current situation: We have Shapes in our *_shape.ttl which have a targetClass set but this is not defined in the ontology file.

Example: hdmap_shacl.ttl has a DataSourceShape which points to a DataSource via targetClass:

hdmap:DataSourceShape a sh:NodeShape ;
    sh:property [ skos:example "3DMS system, Trimble xyz, Riegl xyz" ;
            sh:datatype xsd:string ;
            sh:description "Main acquisition device"@en ;
            sh:maxCount 1 ;
            sh:message "Validation of measurementSystem failed!"@en ;
            sh:name "measurementSystem"@en ;
            sh:order 1 ;
            sh:path hdmap:measurementSystem ],
        [ skos:example "scanner, camera, osm network, aerial images, ..." ;
            sh:datatype xsd:string ;
            sh:description "Basic data for the creation of the map"@en ;
            sh:message "Validation of usedDataSources failed!"@en ;
            sh:name "usedDataSources"@en ;
            sh:order 0 ;
            sh:path hdmap:usedDataSources ] ;
    sh:targetClass hdmap:DataSource .

But the class DataSource is not defined in the hdmap_ontology.ttl file. Only HdMap is defined as a class

Target situation For every shape defined in a *_shape.ttl file there should be an OWL class in the *_ontology.ttl file. Note that this nested class does not have to derive from 'DataResource' since it is not a class used at top level as HdMap for example.

Example for given DataSourceShape (please find good labels and comments): Add a DataSource OWL class to the ontology.

hdmap:DataSource a owl:Class ;
    rdfs:label "class definition for a DataSource" ;
    rdfs:comment "Attributes for DataSource of a HdMap"@en .

@all (CODEOWNERS): Please comment if you want to do in in one branch or one branch per directory.

jdsika commented 5 months ago

Sounds like a plan to do it in one

jtdemer commented 4 months ago

Isn't it more efficient if we do it in one branch? And then assign all CODEOWNERS in the pull request for review?

@robertschubert can you do it or delegate it to another expert?

lenasauermann commented 4 months ago

@jtdemer I'm on it / did it already. There currently is a pull request open for this

lenasauermann commented 4 months ago

https://github.com/GAIA-X4PLC-AAD/ontology-management-base/pull/73

robertschubert commented 3 months ago

merged https://github.com/GAIA-X4PLC-AAD/ontology-management-base/pull/73 , thanks @lenasauermann for preparing the PR.

But I found out after the change for environment-model is missing. @MircoNierenz Could you as a code owner please add the classes? Then we can close this Issue

lenasauermann commented 2 months ago

@MircoNierenz Is this done?

robertschubert commented 3 weeks ago

FYI (all) I added a CI check that checks if every targetClass in a SHACL shape exists in the ontology (as owl class). If not, the pipeline fails. PR is https://github.com/GAIA-X4PLC-AAD/ontology-management-base/pull/107 (already merged)