opencaesar / owl-adapter

The OML adapter for OWL
Apache License 2.0
0 stars 2 forks source link

[BUG] - The IRIs for the OML backbone constructs may clash with the vocabulary IRIs #21

Closed NicolasRouquette closed 4 years ago

NicolasRouquette commented 4 years ago

Description

A clear and concise description of what the bug is.

Steps to Reproduce

Steps to reproduce the behavior:

vocabulary <http://example.org/iris> with # as iris {

    concept Aspect
    concept Concept
    concept ReifiedRelationship
    concept StructuredDatatype

}

The vocabulary IRIs clash with the backbone IRIs for OML constructs as shown below:

<?xml version="1.0"?>
<rdf:RDF xmlns="http://example.org/iris#"
     xml:base="http://example.org/iris"
     xmlns:oml="http://opencaesar.io/oml#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:xml="http://www.w3.org/XML/1998/namespace"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
    <owl:Ontology rdf:about="http://example.org/iris">
        <owl:imports rdf:resource="http://opencaesar.io/oml#"/>
        <oml:ontologyType>http://opencaesar.io/oml#Vocabulary</oml:ontologyType>
    </owl:Ontology>

    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // Annotation properties
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->

    <!-- http://opencaesar.io/oml#ontologyType -->

    <owl:AnnotationProperty rdf:about="http://opencaesar.io/oml#ontologyType"/>

    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // Classes
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->

    <!-- http://example.org/iris#Aspect -->

    <owl:Class rdf:about="http://example.org/iris#Aspect">
        <rdfs:subClassOf rdf:resource="http://opencaesar.io/oml#Concept"/>
    </owl:Class>

    <!-- http://example.org/iris#Concept -->

    <owl:Class rdf:about="http://example.org/iris#Concept">
        <rdfs:subClassOf rdf:resource="http://opencaesar.io/oml#Concept"/>
    </owl:Class>

    <!-- http://example.org/iris#ReifiedRelationship -->

    <owl:Class rdf:about="http://example.org/iris#ReifiedRelationship">
        <rdfs:subClassOf rdf:resource="http://opencaesar.io/oml#Concept"/>
    </owl:Class>

    <!-- http://example.org/iris#StructuredDatatype -->

    <owl:Class rdf:about="http://example.org/iris#StructuredDatatype">
        <rdfs:subClassOf rdf:resource="http://opencaesar.io/oml#Concept"/>
    </owl:Class>

    <!-- http://opencaesar.io/oml#Concept -->

    <owl:Class rdf:about="http://opencaesar.io/oml#Concept"/>
</rdf:RDF>

<!-- Generated by the OWL API (version 5.1.12.2019-10-20T12:26:29Z) https://github.com/owlcs/owlapi/ -->

Expected Behavior

A clear and concise description of what should be the expected behavior.

All OML backbone entities should have IRIs that, by convention, are clearly differentiated from the vocabulary IRIs; e.g., by prefixing http://opencaesar.io/backbone/ to the vocabulary IRI.

For example, if the vocabulary IRI is http://example.org/iris, the backbone IRI would be http://opencaesar.io/backbone/example.org/iris

Additional Context

Enter any other details such as dependencies, environment, examples, etc.

Relevant screenshots

If applicable, add screenshots to help illustrate the issue.

melaasar commented 4 years ago

The OML IRIs that get emitted in the OWL ontologies to annotate the different terms are intentionally kept the same across all ontologies to facilitate queries (e.g., find all aspects in a dataset). The IRI 'http://opencaesar.io/oml' is reserved and no OML ontology should itself have that same IRI.