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

Ontology scenario #6

Closed jtdemer closed 4 weeks ago

jtdemer commented 4 months ago

The ontology was created on 02/27/2014 with the latest version of the Ontology Creator and uses the current Excel file as input: Metadata, which was created in collaboration with all data providers from the GAIA-X4PLCC-AAD project and can now be merged into the main branch.

Signed-off-by: jtdemer johannes.demer@asc-s.de

jdsika commented 2 months ago

@heuerfin what about this? https://github.com/GAIA-X4PLC-AAD/map-and-scenario-data/blob/main/meta-data/ontologies/gaiax4plc/gaiax4plc_meta_auto_Scenario.ttl

heuerfin commented 2 months ago

Yeah the ontology you linked, is the ontology we derived from the excel. So the linked ontology would probably fit better. However, I think this ontology and shacle where intended to include the setlevel meta data attributes according to https://gitlab.setlevel.de/open/processes_and_traceability/traceability_data/-/blob/main/SETLevel_SRMD_and_classifications_for_metadata.pdf?ref_type=heads. I assumed, that @jtdemer wanted to first include that one?

lenasauermann commented 1 month ago

General Ontology should be linked

jdsika commented 1 month ago

@rcrswld please take this pull request as your personal responsibility. @robertschubert offers his help to understand how a general ontology from GaiaX is to be understood. Especially make sure to consolidate the existing different proposals for a scenario ontology which arwe found in the different repos and excel lists. A target for a merge should be the end of next week.

rcrswld commented 1 month ago

Alignment from AP 1.4, 17.05.2024: Delete parts from the existing shape which are overlapping with OpenLABEL. The remaining parts can be published.

robertschubert commented 1 month ago

@rcrswld i unresolved ("unresolve:" in comment) two items since I cannot see the change in the repository. Or is only a commit & push missing?

heuerfin commented 1 month ago

@robertschubert I have a question regarding the subclassing of scenarios. Our concept is to describe a scenario in the following order:

  1. Official Standard: OpenLABEL -> Provides an ontology for scenarios. E.g. has the class "Scenario" https://openlabel.asam.net/V1-0-0/ontologies/openlabel_ontology_scenario_tags.ttl
  2. Established "standards": e.g. of the SETLevel project : https://gitlab.setlevel.de/open/processes_and_traceability/traceability_data/-/blob/main/SETLevel_SRMD_and_classifications_for_metadata.pdf?ref_type=heads -> currently no formal ontology available in ttl, I've created a very basic example in https://github.com/GAIA-X4PLC-AAD/map-and-scenario-data/blob/main/meta-data/ontologies/setlevel/setlevel.ttl (requires a lot of refactoring but there is at least something).
  3. Project specific metadata

So my basic idea was to use the existing OpenLABEL ontology as a basis and inherit it in our customization. However, the Scenario class needs to be a sub-type of gaia-x:Resource. In https://www.scitepress.org/Papers/2021/106842/106842.pdf I found that the rdfs standard allows multiple inheritance. So I've tried it with the following example:

@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix gax-core: <https://w3id.org/gaia-x/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix scenario: <https://github.com/GAIA-X4PLC-AAD/ontology-management-base/tree/main/scenario/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

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"^^xsd:float ;
    owl:imports <https://openlabel.asam.net/V1-0-0/ontologies/openlabel_ontology_scenario_tags.ttl> .

scenario:Scenario a owl:Class ;
    rdfs:label "Scenario" ;
    rdfs:comment "Class definition for a scenario"@en ;
    rdfs:subClassOf gax-core:Resource ;
    rdfs:subClassOf <https://openlabel.asam.net/V1-0-0/ontologies/Scenario> .

This seems to work in protege and looks also good. However, I'm not sure if this is the correct way and it will be understood by the catalogue or whatever component will use it. I've also created another sample, that looks like this:

@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix gax-core: <https://w3id.org/gaia-x/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix scenario: <https://github.com/GAIA-X4PLC-AAD/ontology-management-base/tree/main/scenario/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix openlabel: <https://openlabel.asam.net/V1-0-0/ontologies/> .

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"^^xsd:float .

scenario:Scenario a owl:Class ;
    rdfs:label "GXScenario" ;
    rdfs:comment "Class definition for a scenario"@en ;
    rdfs:subClassOf gax-core:Resource ;
    rdfs:subClassOf openlabel:Scenario .

It doesn't use the owl:imports and directly references the prefixes. And I think regarding the linking it would probably be the correct one.

I didn't wan't to push anything since it will probably break the current changes/discussions. Is something in that direction an option? And @rcrswld would it be also fine for you?

robertschubert commented 1 month ago

Hi @heuerfin yes, you are right, RDF supports multi inheritance. I corrected the lower ontology slightly and I can load it successfully into the federated catalogue.

@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix gax-core: <https://w3id.org/gaia-x/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix scenario: <https://github.com/GAIA-X4PLC-AAD/ontology-management-base/tree/main/scenario/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@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"^^xsd:float .

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

@lenasauermann FYI

heuerfin commented 1 month ago

That looks great @robertschubert! Also worked in Protege for me.

@rcrswld I think this would be the correct approach right? I'm currently not quiet sure regarding the rdfs:label "GXScenario"@en ;. I used a different label from OpenLABEL since at least in protege somehow the correct linking got lost, when I used the same label. However, if it's semantically still correct with the rdfs:label "Scenario"@en ; we can use that one. What do you think?

rcrswld commented 1 month ago

AP 1.4 alignment from 24.05.: georef:

general-shape:

example-claim:

rcrswld commented 1 month ago

@jtdemer as Robert and Justin cannot approve this pull request next week, could you do it instead, please?

heuerfin commented 1 month ago

AP 1.4 alignment from 24.05.: georef:

  • georeference-properties should be deleted out of the scenario shacl - just a reference via 'sh:node'
  • SD-wizard is not able to resolve links to other shapes -> therefore, for generation of the example claim, it should be included temporary for the example-claim-creation
  • georef-shape in the scenario-folder should now be deleted as a separate shape in geo-ref folder is existing

general-shape:

  • reference to general-namespace should be included

example-claim:

  • still open, @heuerfin would you please try a first draft?

I've added an example claim in https://github.com/GAIA-X4PLC-AAD/scenario-asset-example/blob/main/Metadata/ALKS_Scenario_4.4_1_CutInNoCollision_TEMPLATE_jsonld_claim.json. Since i did not know where to place it in this repository.

As you suggested I added temporarily the general and georeference shape in a combined file. However, the referenced scenario does not have some georeference, so I did not use it.

jtdemer commented 1 month ago

AP 1.4 alignment from 24.05.: georef:

  • georeference-properties should be deleted out of the scenario shacl - just a reference via 'sh:node'
  • SD-wizard is not able to resolve links to other shapes -> therefore, for generation of the example claim, it should be included temporary for the example-claim-creation
  • georef-shape in the scenario-folder should now be deleted as a separate shape in geo-ref folder is existing

general-shape:

  • reference to general-namespace should be included

example-claim:

  • still open, @heuerfin would you please try a first draft?

I've added an example claim in https://github.com/GAIA-X4PLC-AAD/scenario-asset-example/blob/main/Metadata/ALKS_Scenario_4.4_1_CutInNoCollision_TEMPLATE_jsonld_claim.json. Since i did not know where to place it in this repository.

As you suggested I added temporarily the general and georeference shape in a combined file. However, the referenced scenario does not have some georeference, so I did not use it.

Hi @heuerfin, You can place a correctly typed sample directly into the scenario folder, as I have done it here for the environmental model: https://github.com/GAIA-X4PLC-AAD/ontology-management-base/blob/environment-model/environment-model/EnvironmentModel_instance.json The content should be logical but it doesn’t need to refer to a specific scenario.

heuerfin commented 1 month ago

Ok

AP 1.4 alignment from 24.05.: georef:

  • georeference-properties should be deleted out of the scenario shacl - just a reference via 'sh:node'
  • SD-wizard is not able to resolve links to other shapes -> therefore, for generation of the example claim, it should be included temporary for the example-claim-creation
  • georef-shape in the scenario-folder should now be deleted as a separate shape in geo-ref folder is existing

general-shape:

  • reference to general-namespace should be included

example-claim:

  • still open, @heuerfin would you please try a first draft?

I've added an example claim in https://github.com/GAIA-X4PLC-AAD/scenario-asset-example/blob/main/Metadata/ALKS_Scenario_4.4_1_CutInNoCollision_TEMPLATE_jsonld_claim.json. Since i did not know where to place it in this repository. As you suggested I added temporarily the general and georeference shape in a combined file. However, the referenced scenario does not have some georeference, so I did not use it.

Hi @heuerfin, You can place a correctly typed sample directly into the scenario folder, as I have done it here for the environmental model: https://github.com/GAIA-X4PLC-AAD/ontology-management-base/blob/environment-model/environment-model/EnvironmentModel_instance.json The content should be logical but it doesn’t need to refer to a specific scenario.

Ok then it would be better if its a "full" sample with all attributes instead of matching ones, right? I've added one using all attributes in https://github.com/GAIA-X4PLC-AAD/ontology-management-base/blob/Ontology_Scenario/scenario/Scenario_instance.json. However, wouldn't it make sense that we use lower case names in the file since it would match now the directory and file names of the ontology and shacl?

jdsika commented 1 month ago

Lower case please :)

heuerfin commented 1 month ago

Done.

jdsika commented 1 month ago

@heuerfin you should in general compare with the guidelines and also give feedback if those need changes additions as well, please

heuerfin commented 1 month ago

Thanks for the remark! I think it complies now with these guidelines. And I have seen that Johannes has also just changed this in accordance with these guidelines.

jdsika commented 1 month ago

@heuerfin good!

What is still needed for a merge here? Who feels confident enough to give it a technical approval regarding the content?

heuerfin commented 1 month ago

I think there are two more comments from @robertschubert open where im not entirly sure whats the correct approach. @rcrswld can you handle these? And I'm not sure if #38 needs an adoption on the ontology. However, we can probably do it afterwards.

jtdemer commented 1 month ago

@lenasauermann as discussed in the dataprovider meeting today, please approve the pull request on behalf of @robertschubert

robertschubert commented 4 weeks ago

@heuerfin @MircoNierenz after rebase this PR can be merged.

robertschubert commented 4 weeks ago

merge from main done, VARIABLE.md existent. Merge to main.