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
2 stars 0 forks source link

Ontologies & SHACL-shapes for OpenLABEL #38

Open rcrswld opened 1 month ago

rcrswld commented 1 month ago

We need to create both ontology and SHACL in order to use OpenLABEL for our extended metadata.

Right now, I already created an ontology-draft for OpenLABEL in separate branch, s.: https://github.com/GAIA-X4PLC-AAD/ontology-management-base/blob/openlabel-ref/openlabel/openlabel_ref_ontology_extended.ttl

The SHACL-shape is yet missing.

@heuerfin, I saw your comments and suggestion in scenario pull request https://github.com/GAIA-X4PLC-AAD/ontology-management-base/pull/6

As this pull request is dedicated to our custom extensions from PLC-AAD or SRMD/SetLevel I would like to keep OpenLABEL out there for a moment. Can we further elaborate OpenLABEL specific issues here and the openlabel_ref branch from above?

Generally speaking, my suggestion would be to nest OpenLABEL under scenario-metadata but separate to SRMD-extension and our PLC-AAD specific content. Therefore, it seems easier to me reusing OpenLABEL-parts also for other domains like maps and sensor-data.

What would you think?

heuerfin commented 3 weeks ago

Yes, I agree that we should keep them seperate. Currently, the main branch contains a mix of 4 PLC specific and SET Level attributes. We should clean that one up.

One question: can leave out the duplicate file like you added in https://github.com/GAIA-X4PLC-AAD/ontology-management-base/blob/openlabel-ref/openlabel/openlabel_ref_ontology_extended.ttl and just import it like

@prefix openlabel: <https://openlabel.asam.net/V1-0-0/ontologies/> .
@prefix gx: <https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#> .

scenario: a owl:Ontology ;
    rdfs:label "Ontology definition for scenario"@en ;
    dcterms:contributor "Fin Heuer (DLR), Rico Auerswald (FhG IVI)" ;
    dcterms:creator "The GAIA-X 4 PLC AAD Project Team" ;
    dcterms:identifier "https://github.com/GAIA-X4PLC-AAD/ontology-management-base/tree/main/scenario/" ;
    owl:versionIRI <https://github.com/GAIA-X4PLC-AAD/ontology-management-base/blob/Ontology_Scenario/scenario/scenario_ontology.ttl> ;
    owl:versionInfo "0.1 ;
    owl:imports <https://openlabel.asam.net/V1-0-0/ontologies/openlabel_ontology_scenario_tags.ttl> .

scenario:Scenario a owl:Class ;
    rdfs:label "GXScenario"@en ;
    rdfs:comment "Class definition for a scenario"@en ;
    rdfs:subClassOf gx:DataResource ,
                    openlabel:Scenario .

The owl:imports <https://openlabel.asam.net/V1-0-0/ontologies/openlabel_ontology_scenario_tags.ttl> . part is currently not merged. In Protege it looks quiet fine to also include the OpenLABEL ontology.

heuerfin commented 2 weeks ago

As we discussed on wednesday I'd also prever to use the owl:imports version in contrast rewrite the whole ontology. However, as we found out the catalogue does not support it currently. I think the implementation in the catalogue would be also possible somewhere here: https://gitlab.eclipse.org/eclipse/xfsc/cat/fc-service/-/blob/main/fc-service-core/src/main/java/eu/xfsc/fc/core/service/schemastore/SchemaStoreImpl.java#L132 with something like https://www.javadoc.io/doc/org.apache.jena/jena-core/3.3.0/org/apache/jena/rdf/model/Model.html#read-java.lang.String-.

However, I think this would take some time in order to be merged. As a quick solution I would propose a simple python sckripts that resolves the owl:imports and includes them into a mergend file. Thus, we can keep the ontologies small and use the script to automatically generate a combined ontology for the catalogue and also sd creation wizard.

@rcrswld do you think that is a good idea?

rcrswld commented 1 week ago

In alignment with @robertschubert in AP 1.4 -> OpenLABEL-ontology will be stored in ontology-mngt.-base repo