Thanks Joshua for looking into this. From the results you generated, it looks
like the Pellet reasoner gets the (more) correct results, while the default
Jena reasoner has some issues (Unfortunately, I may not be able to use Pellet
due to licensing issues - checking with legal). Anyhow, there are some
incorrect results - specifically (A) AircraftHijacking does not include
TerrorAttack as a parent at all, (B) it includes Agent as a parent, which is
mutually exclusive with AircraftHijacking.
Though an ontology class can have multiple parents, it should be possible to
get the original definition of the class - e.g., AircraftHijacking is a
subclass of TerrorAttack.
I am passing true to the listSuperClasses (and subclasses) and I am still
getting the anonymous classes.
I've attached the original ontology to this message - I'm tweaking it to try to
get it to work properly, and modifying it for use with Jena (as opposed to a
different ontology tool).
Many thanks.
-----Original Message-----
From: Joshua TAYLOR [mailto:[email protected]]
Sent: Monday, March 18, 2013 12:03 PM
To: [email protected]
Subject: Re: Super/Subclass relationships in OntModel?
On Mon, Mar 18, 2013 at 10:48 AM, Ed Swing <[email protected]> wrote:
> I noticed that the OntClass super/sub relationships do not seem to work
> properly. Here is a definition of two classes that clearly establish a
> parent-child relationship:
>
> <owl:Class rdf:ID="TerrorAttack">
> <rdfs:subClassOf rdf:resource="#Killing" />
> <rdfs:subClassOf>
> <owl:Restriction>
> <owl:onProperty rdf:resource="#actor" />
> <owl:allValuesFrom rdf:resource="#TerrorAgent" />
> </owl:Restriction>
> </rdfs:subClassOf>
> </owl:Class>
> <owl:Class rdf:ID="AircraftHijacking">
> <rdfs:subClassOf rdf:resource="#TerrorAttack" />
> </owl:Class>
>
> So when I get a reference to the AircraftHijacking as an OntClass, and invoke
> getSuperClass(), I would expect to get a reference to the TerrorAttack class.
> But this does not happen. Here is the snippet of code:
>
> OntModel model =
>
> ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RULE_INF);
> FileInputStream inStream =
> new FileInputStream("ontology/terrorism.xml");
> model.read(inStream, null);
> inStream.close();
> String uriBase = model.getNsPrefixURI("");
> OntClass cls = model.getOntClass(uriBase + "TerrorAttack");
> System.out
> .println("TerAtt: " + cls + " Super=" + cls.getSuperClass());
> for (Iterator<OntClass> iter = cls.listSubClasses(true); iter
> .hasNext();) {
> System.out.println("Sub: " + iter.next());
> }
> cls = model.getOntClass(uriBase + "AircraftHijacking");
> System.out.println("CLass=" + cls + " Super=" + cls.getSuperClass());
> System.out.flush();
> for (Iterator<OntClass> iter = cls.listSuperClasses(true); iter
> .hasNext();) {
> System.out.println(" CLS=" + iter.next());
> }
>
> And here is what is printed:
>
> TerAtt: http://blsdev1.vsticorp.com/terrorism#TerrorAttack
> Super=http://www.w3.org/2002/07/owl#Thing
> Sub: -60c2c7fc:13d7deb0ee3:-7fee
> CLass=http://blsdev1.vsticorp.com/terrorism#AircraftHijacking
> Super=http://www.w3.org/2000/01/rdf-schema#Resource
> CLS=-60c2c7fc:13d7deb0ee3:-7ff7
> CLS=-60c2c7fc:13d7deb0ee3:-7ff4
> CLS=-60c2c7fc:13d7deb0ee3:-7ffa
> CLS=-60c2c7fc:13d7deb0ee3:-7fec
> CLS=-60c2c7fc:13d7deb0ee3:-7ff6
> CLS=-60c2c7fc:13d7deb0ee3:-7ff8
> CLS=-60c2c7fc:13d7deb0ee3:-7ff9
> CLS=-60c2c7fc:13d7deb0ee3:-7fe4
> CLS=-60c2c7fc:13d7deb0ee3:-7fe5
> CLS=-60c2c7fc:13d7deb0ee3:-7fed
> CLS=-60c2c7fc:13d7deb0ee3:-7fef
> CLS=http://blsdev1.vsticorp.com/terrorism#NonCountry
> CLS=http://blsdev1.vsticorp.com/terrorism#TerrorAgent
> CLS=http://blsdev1.vsticorp.com/terrorism#Agent
>
> Note that the TerrorAttack's superclass is Thing, not Killing (or a reference
> to an anonymous class?). It has one child, which is incorrect - the
> TerrorAttack has multiple children in the ontology, including
> AircraftHijacking.
First, do note that superclass is not exactly the same as parent-class. A
class S is a superclass of T if every individual that has type T also has type
S. This could be a result of subclass/superclass axioms on T and S, or through
some intermediaries (e.g., if S is a superclass of R and R is a superclass of
T), or through inference (e.g., if a reasoner can determine that every instance
of T must also be an instance of S). Since a given class can have many
superclasses and subclasses, there is no clearly defined notion of parent-class
in OWL. For instance, if I define C as the intersection of A and B, then both
A and B are superclasses of C, but neither would really be called the parent.
Without seeing your whole ontology, we can't know whether there are any
incorrect results here, but there are some (trivially) correct results there.
owl:Thing is will be a superclass of any OWL class, so it's a correct, if not
particularly useful superclass. I'm a bit surprised by rdf:Resource showing
up, since I'm not sure whether it's an owl:Class or not, but I suppose it is
true that anything that is a TerrorAttack is also an rdf:Resource. The blank
nodes are probably showing up as a result of various restrictions that have
been declared as superclasses (either direct or indirect). Similarly, every
class is both a superclass and a subclass of itself, so those are trivially
correct answers, though not particularly useful. Passing "true" to true to
listSubClasses and listSuperClasses will help to prune down your results
though, so that's good there.
> Then we get to AircraftHijacking. Its superclass is apparenty Resource
> (huh?). When I list all superclasses, I get a bunch of anonymous classes and
> then three classes in my ontology that are not only not the parent class(es),
> but are in fact disjoint with it. Those three classes are defined as unions
> of classes which are disjoint with TerrorAttack's (actual) parent:
>
> <owl:Class rdf:ID="Agent">
> <owl:unionOf rdf:parseType="Collection">
> <owl:Class rdf:about="#Person" />
> <owl:Class rdf:about="#Organization" />
> </owl:unionOf>
> </owl:Class>
>
> <owl:Class rdf:ID="Killing">
> <rdfs:subClassOf rdf:resource="#Event" />
> ...
> </owl:Class>
> <owl:Class rdf:ID="Event">
> ...
> <owl:disjointWith rdf:resource="#Person" />
> <owl:disjointWith rdf:resource="#Organization" />
> <owl:disjointWith rdf:resource="#Location" />
> </owl:Class>
>
> I need to be able to get the reference to the TerrorAttack OntClass from the
> AircraftHijacking OntClass. This seems like it should be trivial.
Again, without seeing your whole ontology, it's tough to diagnose particular
problems. I reproduced your ontology (to the extent that you gave in your
email) and ran some similar queries on it. The following code prints the model
and the results of the queries. I've run the queries using the same
OntModelSpec that you've been using, as well as one for a Pellet-backed model.
You might like the results from the Pellet better than the ones from Jena, but
it doesn't look like either is going to give you the parent-child relationship
that you want. I hope this helps. If it doesn't provide what you need, you'll
probably need to write a particular query for get a (not "the", because there
might not be a unique one) closest declared superclass, i.e., a superclass of C
that is not C, but which does not have a subclass (other than C) that is also a
superclass of C. (That might be easier to write using SPARQL than with the
Jena OntModel API.) //JT
public class SASTerror {
public static void main(String[] args) throws IOException {
for ( OntModelSpec spec : new OntModelSpec[] {
OntModelSpec.OWL_DL_MEM_RULE_INF, PelletReasonerFactory.THE_SPEC } ) {
System.out.println( "Using spec " + spec );
OntModel model = ModelFactory.createOntologyModel( spec
);
InputStream is = SASTerror.class.getResourceAsStream(
"sas-terror.owl" );
model.read( is, null );
is.close();
model.write( System.out, "N3" );
String ns = model.getNsPrefixURI( "" );
OntClass terrorAttack = model.getOntClass(
ns+"TerrorAttack" );
OntClass aircraftHijacking = model.getOntClass(
ns+"AircraftHijacking" );
for ( boolean direct : new boolean[] { true, false } ) {
System.err.println( "*
aircraftHijacking.getSuperClass() =
"+aircraftHijacking.getSuperClass() );
ExtendedIterator<OntClass> classes =
aircraftHijacking.listSuperClasses( direct );
while ( classes.hasNext() ) {
System.err.println( "\t* other
superclass: "+classes.next() );
}
System.err.println( "*
terrorAttack.getSubClass() =
"+terrorAttack.getSubClass() );
classes = terrorAttack.listSubClasses( direct );
while ( classes.hasNext() ) {
System.err.println( "\t* other
subclass: "+ classes.next() );
}
}
}
}
}
output (trimmed) a bit:
Using spec com.hp.hpl.jena.ontology.OntModelSpec@dda4f7b
@prefix : <http://example.com/sas-terror#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
:Agent
a owl:Class ;
owl:equivalentClass
[ a owl:Class ;
owl:unionOf (:Organization :Person)
] .
:AircraftHijacking
a owl:Class ;
rdfs:subClassOf :TerrorAttack .
:TerrorAgent
a owl:Class .
:Location
a owl:Class .
:TerrorAttack
a owl:Class ;
rdfs:subClassOf :Killing ;
rdfs:subClassOf
[ a owl:Restriction ;
owl:allValuesFrom :TerrorAgent ;
owl:onProperty :actor
] .
:Event
a owl:Class ;
owl:disjointWith :Location , :Person , :Organization .
:actor
a owl:ObjectProperty .
<http://example.com/sas-terror>
a owl:Ontology .
:Person
a owl:Class .
:Killing
a owl:Class ;
rdfs:subClassOf :Event .
:Organization
a owl:Class .
Queries using the Jena's reasoner:
* aircraftHijacking.getSuperClass() =
http://www.w3.org/2000/01/rdf-schema#Resource
* other superclass: http://example.com/sas-terror#TerrorAttack
* terrorAttack.getSubClass() = http://example.com/sas-terror#TerrorAttack
* other subclass: http://example.com/sas-terror#AircraftHijacking
* aircraftHijacking.getSuperClass() =
http://www.w3.org/2000/01/rdf-schema#Resource
* other superclass: http://www.w3.org/2000/01/rdf-schema#Resource
* other superclass: http://www.w3.org/2002/07/owl#Thing
* other superclass: http://example.com/sas-terror#TerrorAttack
* other superclass: http://example.com/sas-terror#Killing
* other superclass: -4b39b73b:13d7e35a059:-7ff8
* other superclass: http://example.com/sas-terror#Event
* terrorAttack.getSubClass() = http://example.com/sas-terror#TerrorAttack
* other subclass: http://example.com/sas-terror#AircraftHijacking
Queries using Pellet:
* aircraftHijacking.getSuperClass() = http://example.com/sas-terror#Killing
* other superclass: http://example.com/sas-terror#TerrorAttack
* terrorAttack.getSubClass() = http://www.w3.org/2002/07/owl#Nothing
* other subclass: http://example.com/sas-terror#AircraftHijacking
* aircraftHijacking.getSuperClass() = http://example.com/sas-terror#Killing
* other superclass: http://example.com/sas-terror#Killing
* other superclass: http://www.w3.org/2002/07/owl#Thing
* other superclass: http://example.com/sas-terror#Event
* other superclass: http://example.com/sas-terror#TerrorAttack
* terrorAttack.getSubClass() = http://www.w3.org/2002/07/owl#Nothing
* other subclass: http://www.w3.org/2002/07/owl#Nothing
* other subclass: http://example.com/sas-terror#AircraftHijacking
--
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/
<!DOCTYPE rdf:RDF [
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
<!ENTITY owl "http://www.w3.org/2002/07/owl#" >
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>
<rdf:RDF xmlns="http://blsdev1.vsticorp.com/terrorism#"
xmlns:terror="http://blsdev1.vsticorp.com/terrorism#" xml:base="http://blsdev1.vsticorp.com/terrorism#"
xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<owl:Ontology rdf:about="Terrorism">
<rdfs:comment>Terrorism Ontology for Battlespace Luminary
System</rdfs:comment>
<rdfs:label>Terrorism Ontology</rdfs:label>
</owl:Ontology>
<owl:Class rdf:ID="Person">
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#locatedIn" />
<owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">1
</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:ID="AnonPeople">
<rdfs:subClassOf rdf:resource="#Person" />
</owl:Class>
<owl:Class rdf:ID="Terrorist">
<rdfs:subClassOf rdf:resource="#Person" />
</owl:Class>
<owl:Class rdf:ID="Politician">
<rdfs:subClassOf rdf:resource="#Person" />
</owl:Class>
<owl:Class rdf:ID="Organization">
<owl:disjointWith rdf:resource="#Person" />
</owl:Class>
<owl:Class rdf:ID="Location">
<owl:disjointWith rdf:resource="#Person" />
<owl:disjointWith rdf:resource="#Organization" />
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#latitude" />
<owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">1
</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#longitude" />
<owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">1
</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:ID="Date_Time">
<owl:disjointWith rdf:resource="#Person" />
<owl:disjointWith rdf:resource="#Organization" />
<owl:disjointWith rdf:resource="#Location" />
</owl:Class>
<owl:Class rdf:ID="Event">
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#eventDate" />
<owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">1
</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasLocation" />
<owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">1
</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<owl:disjointWith rdf:resource="#Person" />
<owl:disjointWith rdf:resource="#Organization" />
<owl:disjointWith rdf:resource="#Location" />
<owl:disjointWith rdf:resource="#Date_Time" />
</owl:Class>
<owl:Class rdf:ID="Rejected">
<!-- note: class for terms that are not entities -->
<owl:disjointWith rdf:resource="#Person" />
<owl:disjointWith rdf:resource="#Organization" />
<owl:disjointWith rdf:resource="#Location" />
<owl:disjointWith rdf:resource="#Date_Time" />
<owl:disjointWith rdf:resource="#Event" />
</owl:Class>
<owl:Class rdf:ID="Company">
<rdfs:subClassOf rdf:resource="#Organization" />
</owl:Class>
<owl:Class rdf:ID="NewsOrganization">
<rdfs:subClassOf rdf:resource="#Organization" />
<owl:disjointWith rdf:resource="#Company" />
<owl:disjointWith rdf:resource="#IdeologicalGroup" />
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasReference" />
<owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">0
</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#associatedWith" />
<owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">0
</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:ID="GovernmentAgency">
<rdfs:subClassOf rdf:resource="Organization" />
<owl:disjointWith rdf:resource="#Company" />
<owl:disjointWith rdf:resource="#NewsOrganization" />
</owl:Class>
<owl:Class rdf:ID="TerroristGroup">
<rdfs:subClassOf rdf:resource="#Organization" />
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasMember" />
<owl:allValuesFrom rdf:resource="#TerrorAgent" />
</owl:Restriction>
</rdfs:subClassOf>
<owl:disjointWith rdf:resource="#Company" />
<owl:disjointWith rdf:resource="#NewsOrganization" />
<owl:disjointWith rdf:resource="#GovernmentOrganization" />
</owl:Class>
<owl:Class rdf:ID="Agent">
<owl:unionOf rdf:parseType="Collection">
<owl:Class rdf:about="#Person" />
<owl:Class rdf:about="#Organization" />
</owl:unionOf>
</owl:Class>
<owl:Class rdf:ID="TerrorAgent">
<owl:unionOf rdf:parseType="Collection">
<owl:Class rdf:about="#Terrorist" />
<owl:Class rdf:about="#TerroristGroup" />
</owl:unionOf>
</owl:Class>
<owl:Class rdf:ID="Killing">
<rdfs:subClassOf rdf:resource="#Event" />
<rdfs:subClassOf>
<owl:equivalentClass>
<owl:complementOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#actor" />
<owl:hasValue rdf:resource="#NewsOrganization" />
</owl:Restriction>
</owl:complementOf>
</owl:equivalentClass>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:ID="Riot">
<rdfs:subClassOf rdf:resource="#Killing" />
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#actor" />
<owl:allValuesFrom rdf:resource="#AnonPeople" />
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:ID="TerrorAttack">
<rdfs:subClassOf rdf:resource="#Killing" />
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#actor" />
<owl:allValuesFrom rdf:resource="#TerrorAgent" />
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:ID="SuicideBombing">
<rdfs:subClassOf rdf:resource="#PlantedExplosive" />
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#isSuicide"/>
<owl:hasValue rdf:datatype="&xsd;boolean">true</owl:hasValue>
</owl:Restriction>
</owl:equivalentClass>
</owl:Class>
<owl:Class rdf:ID="CarBombing">
<rdfs:subClassOf rdf:resource="#TerrorAttack" />
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#weaponType"/>
<owl:hasValue rdf:datatype="&xsd;token">Vehicular Bomb</owl:hasValue>
</owl:Restriction>
</owl:equivalentClass>
</owl:Class>
<owl:Class rdf:ID="SuicideCarBombing">
<owl:intersectionOf rdf:parseType="Collection">
<owl:Class rdf:about="#CarBombing" />
<owl:Class rdf:about="#SuicideBombing" />
</owl:intersectionOf>
</owl:Class>
<owl:Class rdf:ID="AircraftHijacking">
<rdfs:subClassOf rdf:resource="#TerrorAttack" />
</owl:Class>
<owl:Class rdf:ID="PlantedExplosive">
<rdfs:subClassOf rdf:resource="#TerrorAttack" />
</owl:Class>
<owl:Class rdf:ID="MilitaryEvent">
<rdfs:subClassOf rdf:resource="#Event" />
<owl:disjointWith rdf:resource="#Riot" />
</owl:Class>
<owl:Class rdf:ID="MilitaryAttack">
<owl:intersectionOf rdf:parseType="Collection">
<owl:Class rdf:about="#MilitaryEvent" />
<owl:Class rdf:about="#Killing" />
</owl:intersectionOf>
<owl:disjointWith rdf:resource="#TerrorAttack" />
</owl:Class>
<owl:Class rdf:ID="TravelEvent">
<rdfs:subClassOf rdf:resource="#Event" />
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#actor" />
<owl:allValuesFrom rdf:resource="#Person" />
</owl:Restriction>
</rdfs:subClassOf>
<owl:disjointWith rdf:resource="#Killing" />
<owl:disjointWith rdf:resource="#MilitaryAttack" />
</owl:Class>
<owl:Class rdf:ID="Firefight">
<rdfs:subClassOf rdf:resource="#Event" />
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#actor" />
<owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">2
</owl:minCardinality>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:ID="PoliticalEvent">
<rdfs:subClassOf rdf:resource="#Event" />
<owl:disjointWith rdf:resource="#Killing" />
<owl:disjointWith rdf:resource="#MilitaryEvent" />
<owl:disjointWith rdf:resource="#TravelEvent" />
</owl:Class>
<owl:Class rdf:ID="Election">
<rdfs:subClassOf rdf:resource="#PoliticalEvent" />
</owl:Class>
<owl:Class rdf:ID="NewsArticle">
<rdfs:subClassOf rdf:resource="#Event" />
<owl:disjointWith rdf:resource="#Killing" />
<owl:disjointWith rdf:resource="#PoliticalEvent" />
<owl:disjointWith rdf:resource="#MilitaryEvent" />
<owl:disjointWith rdf:resource="#TravelEvent" />
</owl:Class>
<owl:Class rdf:ID="NewsTopic">
<owl:disjointWith rdf:resource="#Person" />
<owl:disjointWith rdf:resource="#Organization" />
<owl:disjointWith rdf:resource="#Location" />
<owl:disjointWith rdf:resource="#Date_Time" />
<owl:disjointWith rdf:resource="#Event" />
<owl:disjointWith rdf:resource="#Rejected" />
</owl:Class>
<owl:Class rdf:ID="City">
<rdfs:subClassOf rdf:resource="#Location" />
</owl:Class>
<owl:Class rdf:ID="Province">
<rdfs:subClassOf rdf:resource="#Location" />
<owl:disjointWith rdf:resource="#City" />
</owl:Class>
<owl:Class rdf:ID="Country">
<rdfs:subClassOf rdf:resource="#Location" />
<owl:disjointWith rdf:resource="#City" />
<owl:disjointWith rdf:resource="#Province" />
</owl:Class>
<owl:Class rdf:ID="NonCountry">
<owl:unionOf rdf:parseType="Collection">
<owl:Class rdf:about="#City" />
<owl:Class rdf:about="#Province" />
</owl:unionOf>
</owl:Class>
<owl:Class rdf:ID="Disambiguation_pages" />
<owl:TransitiveProperty rdf:ID="containedIn">
<rdfs:domain rdf:resource="#NonCountry"/>
<rdfs:range rdf:resource="#Location"/>
</owl:TransitiveProperty>
<owl:DatatypeProperty rdf:ID="population">
<rdfs:domain rdf:resource="#Location"/>
<rdfs:range rdf:resource="&xsd;nonNegativeInteger" />
</owl:DatatypeProperty>
<owl:ObjectProperty rdf:ID="inCountry">
<rdfs:subPropertyOf rdf:resource="#containedIn"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty" />
<rdfs:range rdf:resource="#Country"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="hasMember">
<rdfs:domain rdf:resource="#Organization" />
<rdfs:range rdf:resource="#Agent" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="isMemberOf">
<rdfs:domain rdf:resource="#Person" />
<rdfs:range rdf:resource="#Organization" />
<rdfs:subPropertyOf rdf:resource="#associatedWith" />
<owl:inverseOf rdf:resource="#hasMember" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="isPartOf">
<rdfs:domain rdf:resource="#Organization" />
<rdfs:range rdf:resource="#Organization" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="actor">
<rdfs:domain rdf:resource="#Event" />
<rdfs:range rdf:resource="#Agent" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="victim">
<rdfs:domain rdf:resource="#Killing" />
<rdfs:range rdf:resource="#Person" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="responsibleFor">
<rdfs:domain rdf:resource="#Agent" />
<rdfs:range rdf:resource="#Event" />
<owl:inverseOf rdf:resource="#actor" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="relatedEvent">
<rdfs:domain rdf:resource="#Event" />
<rdfs:range rdf:resource="#Event" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="hasLocation">
<rdfs:domain rdf:resource="#Event" />
<rdfs:range rdf:resource="#Location" />
</owl:ObjectProperty>
<!-- owl:ObjectProperty rdf:ID="dwellsIn">
<rdfs:domain rdf:resource="#Person" />
<rdfs:range rdf:resource="#Location" />
</owl:ObjectProperty -->
<owl:ObjectProperty rdf:ID="destination">
<rdf:type rdf:resource="&owl;FunctionalProperty" />
<rdfs:subPropertyOf rdf:resource="#hasLocation"/>
<rdfs:domain rdf:resource="#TravelEvent" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="locatedIn">
<rdfs:domain rdf:resource="#Agent" />
<rdfs:range rdf:resource="#Location" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="isNearTo">
<rdfs:domain rdf:resource="#Location" />
<rdfs:range rdf:resource="#Location" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="associatedWith">
<rdfs:domain rdf:resource="#Person" />
<rdfs:range rdf:resource="#Agent" />
</owl:ObjectProperty>
<owl:SymmetricProperty rdf:ID="alliedWith">
<rdfs:domain rdf:resource="#Organization" />
<rdfs:range rdf:resource="#Organization" />
</owl:SymmetricProperty>
<owl:ObjectProperty rdf:ID="reportedBy">
<rdfs:domain rdf:resource="#Event" />
<rdfs:range rdf:resource="#NewsOrganization" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="regionOfInfluence">
<rdfs:domain rdf:resource="#IdeologicalGroup" />
<rdfs:range rdf:resource="#Location" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="forCountry">
<rdfs:domain rdf:resource="#Politician" />
<rdfs:range rdf:resource="#Country" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="eventDate">
<rdfs:domain rdf:resource="#Event" />
<rdfs:range rdf:resource="#Date_Time" />
</owl:ObjectProperty>
<owl:DatatypeProperty rdf:ID="numberKilled">
<rdfs:domain rdf:resource="#Killing" />
<rdfs:range rdf:resource="&xsd;nonNegativeInteger" />
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="numberInjured">
<rdfs:domain rdf:resource="#Killing" />
<rdfs:range rdf:resource="&xsd;nonNegativeInteger" />
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="dateValue">
<rdfs:domain rdf:resource="#Date_Time" />
<rdf:range rdf:resource="&xsd;dateTime" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="hasReference">
<rdfs:range rdf:resource="&xsd;anyURI" />
<!-- rdfs:domain rdf:resource="#Event" / -->
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="hasDescription">
<rdf:range rdf:resource="&xsd;string" />
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="personCount">
<rdfs:domain rdf:resource="#AnonPeople" />
<rdfs:range rdf:resource="&xsd;nonNegativeInteger" />
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="latitude">
<rdfs:domain rdf:resource="#Location" />
<rdfs:range rdf:resource="&xsd;double" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="longitude">
<rdfs:domain rdf:resource="#Location" />
<rdfs:range rdf:resource="&xsd;double" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="groupIdeology">
<rdfs:domain rdf:resource="#IdeologicalGroup" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="hasStatus">
<rdfs:domain rdf:resource="#Agent" />
<rdfs:range rdf:resource="&xsd;token" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="hasTitle">
<rdfs:domain rdf:resource="#Politician" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="identifierProperty">
<rdfs:domain rdf:resource="#Person" />
<rdfs:range rdf:resource="&xsd;token" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="phoneNum">
<rdfs:subPropertyOf rdf:resource="#identifierProperty"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="email">
<rdfs:subPropertyOf rdf:resource="#identifierProperty"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="twitterId">
<rdfs:subPropertyOf rdf:resource="#identifierProperty"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="eventType">
<rdfs:domain rdf:resource="#Event" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="weaponType">
<rdfs:domain rdf:resource="#Killing" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="isSuicide">
<rdfs:domain rdf:resource="#TerrorAttack" />
<rdfs:range rdf:resource="&xsd;boolean" />
</owl:DatatypeProperty>
<owl:ObjectProperty rdf:ID="personsInBody">
<rdfs:domain rdf:resource="#NewsArticle" />
<rdfs:range rdf:resource="#Person" />
</owl:ObjectProperty>
<owl:DatatypeProperty rdf:ID="articleKey">
<rdfs:domain rdf:resource="#NewsArticle" />
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#InverseFunctionalProperty" />
<rdfs:range rdf:resource="&xsd;token" />
</owl:DatatypeProperty>
<owl:ObjectProperty rdf:ID="organizationsInBody">
<rdfs:domain rdf:resource="#NewsArticle" />
<rdfs:range rdf:resource="#Organization" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="locationsInBody">
<rdfs:domain rdf:resource="#NewsArticle" />
<rdfs:range rdf:resource="#Location" />
</owl:ObjectProperty>
<owl:DatatypeProperty rdf:ID="originalFile">
<rdfs:domain rdf:resource="#NewsArticle" />
</owl:DatatypeProperty>
<owl:ObjectProperty rdf:ID="hasTopic">
<rdfs:domain rdf:resource="#NewsArticle" />
<rdfs:range rdf:resource="#NewsTopic" />
</owl:ObjectProperty>
<!-- Terms that should not be recognized as entities -->
<Rejected rdf:ID="North" />
<Rejected rdf:ID="East" />
<Rejected rdf:ID="West" />
<Rejected rdf:ID="South" />
<Rejected rdf:ID="House" />
<Rejected rdf:ID="Lower" />
<Rejected rdf:ID="Upper" />
<Rejected rdf:ID="University" />
<Rejected rdf:ID="Now" />
</rdf:RDF>