General axiom access

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

General axiom access

liam
Dear Jean-Baptiste,

I realise that this has been addressed a couple of times and that it's apparently not possible, but I'm posting this here in case I'm wrong.
Using the attached ontologytmp.owl, is it possible to programatically access the general axioms defined at the end using owlready2?

Cheers,
Liam

<?xml version="1.0"?>
<rdf:RDF xmlns="http://www.semanticweb.org/liamchilds/ontologies/2018/10/tmp#"
     xml:base="http://www.semanticweb.org/liamchilds/ontologies/2018/10/tmp"
     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#"
     xmlns:untitled-ontology-19="http://www.semanticweb.org/liamchilds/ontologies/2018/10/untitled-ontology-19#">
    <owl:Ontology rdf:about="http://www.semanticweb.org/liamchilds/ontologies/2018/10/tmp"/>

    <owl:ObjectProperty rdf:about="http://www.semanticweb.org/liamchilds/ontologies/2018/10/untitled-ontology-19#hasThing">
        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
    </owl:ObjectProperty>

    <owl:Class rdf:about="http://www.semanticweb.org/liamchilds/ontologies/2018/10/untitled-ontology-19#A"/>

    <owl:Class rdf:about="http://www.semanticweb.org/liamchilds/ontologies/2018/10/untitled-ontology-19#B"/>

    <owl:Restriction>
        <owl:onProperty rdf:resource="http://www.semanticweb.org/liamchilds/ontologies/2018/10/untitled-ontology-19#hasThing"/>
        <owl:someValuesFrom rdf:resource="http://www.semanticweb.org/liamchilds/ontologies/2018/10/untitled-ontology-19#A"/>
        <rdfs:subClassOf rdf:resource="http://www.semanticweb.org/liamchilds/ontologies/2018/10/untitled-ontology-19#B"/>
    </owl:Restriction>
</rdf:RDF>
Reply | Threaded
Open this post in threaded view
|

Re: General axiom access

Jiba
Administrator
Hello,

There is currently no "World.general_axioms()", but I can add one if you think it worth it. I just need to figure their types (owl:Restriction, but there are other types of axioms I believe) and whether we should limit it to axioms not used by a class, or to all axioms.

Best regards,
Jiba
Reply | Threaded
Open this post in threaded view
|

Re: General axiom access

liam
Dear Jean-Baptiste,

Thanks for your quick reply. It turns out that get_triples and _parse_bnode are sufficient for my needs. The only issue I have is that the leading underscore in _parse_bnode indicates that it is intended to be a private method and it feels wrong to use it explicitly. Otherwise, I was able to solve my problem.

Cheers,
Liam
Reply | Threaded
Open this post in threaded view
|

Re: General axiom access

Jiba
Administrator
Hello,

I realize that get_triples() has no underscore but is not really expected to be used... Actually, the new quadstore does no longer have get_triples()!

I renamed all these get_... method with underscore. For your information, I think with the new quadstore, you should replace get_triple() by _get_obj_triples_spo_spo().

By the way, I have also added a general_axioms() methods in the development version.

Best regards,
Jean-Baptiste LAMY