Using Annotations for Object Property Assertions

Posted by Marie on
URL: http://owlready.306.s1.nabble.com/Using-Annotations-for-Object-Property-Assertions-tp980.html

Dear all,

we recently discovered annotations for object property assertions as a powerful tool. Is there a way to insert and read annotations of this type via Owlready2?

The following is a toy example of what we plan to do. We would like to insert the "Axiom" part (individuals section).

<?xml version="1.0"?>


<!DOCTYPE rdf:RDF [
    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
    <!ENTITY test_annotation "http://www.semanticweb.org/maris/ontologies/2019/3/test_annotation.owl#" >
]>


<rdf:RDF xmlns="http://www.semanticweb.org/maris/ontologies/2019/3/test_annotation.owl#"
     xml:base="http://www.semanticweb.org/maris/ontologies/2019/3/test_annotation.owl"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:test_annotation="http://www.semanticweb.org/maris/ontologies/2019/3/test_annotation.owl#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
    <owl:Ontology rdf:about="http://www.semanticweb.org/maris/ontologies/2019/3/test_annotation.owl"/>
   


   

   


   

   


   

   


   

    <owl:ObjectProperty rdf:about="&test_annotation;isRelated"/>
   


   

   


   

    <owl:Class rdf:about="&test_annotation;A"/>
   


   

   


   

    <owl:NamedIndividual rdf:about="&test_annotation;a1">
        <rdf:type rdf:resource="&test_annotation;A"/>
        <isRelated rdf:resource="&test_annotation;a2"/>
    </owl:NamedIndividual>
    <owl:Axiom>
        <rdfs:comment>test</rdfs:comment>
        <owl:annotatedSource rdf:resource="&test_annotation;a1"/>
        <owl:annotatedTarget rdf:resource="&test_annotation;a2"/>
        <owl:annotatedProperty rdf:resource="&test_annotation;isRelated"/>
    </owl:Axiom>
   


   

    <owl:NamedIndividual rdf:about="&test_annotation;a2">
        <rdf:type rdf:resource="&test_annotation;A"/>
    </owl:NamedIndividual>
</rdf:RDF>


Best regards,
Marie