On Monday, March 18, 2013 02:48:37 PM Ed Swing 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>
Please, /complete/ ontologies, not snippets. We want to be able to cut the ontology out of the message and into a file and feed it to Jena, so we want the wrapping and the other classes and all. > 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 What I got from your code and wrapping the snippet you gave at the top and putting in a fake base URI was: TerAtt: eh:/attacks#TerrorAttack Super=http://www.w3.org/2000/01/rdf-schema#Resource Sub: eh:/attacks#AircraftHijacking CLass=eh:/attacks#AircraftHijacking Super=http://www.w3.org/2000/01/rdf-schema#Resource CLS=eh:/attacks#TerrorAttack > Note that the TerrorAttack's superclass is Thing, not Killing (or a reference > to an anonymous class?). /one of/ TerrorAttack's superclasses is Resource. You used getSuperClass(), which will give you a random superclass. Maybe TerrorAttack has four hundred and seventy-three other superclasses; getSuperClass() will get you just the one. > It has one child, which is incorrect - the TerrorAttack has multiple children > in the ontology, > including AircraftHijacking. Maybe they're not direct subclasses -- listSuperClasses(true) will only get you the subclasses that are not subclasses of other subclasses of TerrorAttack. > Then we get to AircraftHijacking. Its superclass is apparenty Resource (huh?). Again, /one/ of its superclasses. > 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: Might that be the documented restriction on unionOf: Partial support. If C=unionOf(A,B) then will infer that A,B are subclasses of C, and thus that instances of A or B are instances of C. Does not handle the reverse (that an instance of C must be either an instance of A or an instance of B). Chris (not really a reasoner expert) -- RIP Diana Wynne Jones, 1934 - 2011. Epimorphics Ltd, http://www.epimorphics.com Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT Epimorphics Ltd. is a limited company registered in England (number 7016688)
