Question

I want to build an ontology to deal with persons infected or not infected by diseases:

<?xml version="1.0"?>
</rdf:RDF>
    <owl:Class rdf:about="&person;Disease"/>

    <owl:Class rdf:about="&person;HealthyPerson">
        <rdfs:subClassOf rdf:resource="&person;Person"/>
        <owl:disjointWith rdf:resource="&person;SickPerson"/>
    </owl:Class>

    <owl:Class rdf:about="&person;Person"/>

    <owl:Class rdf:about="&person;SickPerson">
        <rdfs:subClassOf rdf:resource="&person;Person"/>
    </owl:Class>
</rdf:RDF>

Graphically:

class hierarchy as tree

How can I define the property has_disease(Person, Disease) in such a way that an individual of type Person related to some Disease by has_disease will be inferred have type SickPerson, too?

Was it helpful?

Solution

How about this?

<owl:ObjectProperty rdf:ID="hasDisease">
  <rdfs:domain rdf:resource="#SickPerson"/>
  <rdfs:range rdf:resource="#Disease"/>
</owl:ObjectProperty>

OTHER TIPS

You can use an existential restriction for this. In the example below, the individual joe will be inferred to be a SickPerson

<owl:ObjectProperty rdf:about="has_disease"/>
<owl:Class rdf:about="Disease"/>
<owl:Class rdf:about="Person"/>
<owl:Class rdf:about="SickPerson">
    <owl:equivalentClass>
        <owl:Restriction>
            <owl:onProperty rdf:resource="has_disease"/>
            <owl:someValuesFrom rdf:resource="Disease"/>
        </owl:Restriction>
    </owl:equivalentClass>
    <rdfs:subClassOf rdf:resource="Person"/>
</owl:Class>

<owl:NamedIndividual rdf:about="flu">
    <rdf:type rdf:resource="Disease"/>
</owl:NamedIndividual>
<owl:NamedIndividual rdf:about="joe">
    <rdf:type rdf:resource="Person"/>
    <has_disease rdf:resource="flu"/>
</owl:NamedIndividual>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top