On Fri, 2011-02-18 at 14:53 +0100, Burkert, Michael wrote: > Hello ! > > > > > > Following TBox: > > > > > > classInsect BaseClass > > classBeatle SubClass > > > > classPlant BaseClass > > classTree SubClass > > > > > > case 1: > > > > ObjectProperty between SUBCLASSES: OPBeatleEatTree: domain=classBeatle > range=classTree > > > > Now the different between Protege and jena (2.6.3): > > > > In Protege I can only select individuals from subclasses classBeatle and > classTree. > > In Jena (model SELECT 'ALL' ?sub ?praed ?obj) are > > - two domains (classBeatle and Baseclass classInsect) and > > - two ranges (classTree and Baseclass classPlant)
I assume you have inference enabled which is why you are seeing inferred statements. This is part of the extensional semantics for RDFS which is included in the OWL semantics: http://www.w3.org/TR/rdf-mt/#RDFSExtRules Intuitively you can see that if something is the object of an OPBeatleEatTree relationship then not only is it a Tree (the directly declared range) but is also a Plant (the inferred range), because all Trees are Plants. > case 2: > > > > ObjectProperty between BASECLASSES: OPInsectEatPlant: domain=classInsect > range=classPlant > > > > > > In Protege I can select individuals from all classes: classInsect, > classBeatle and classPlant, classTree. > > In jena the domain and range are also for Baseclasses classInsect and > classPlant. Sure but the domain/range aren't the same thing as "can select". You can query for all things which are of each type, for example: SELECT ?x WHERE {?x rdf:type eg:classBeatle. } > What is the problem ? I think the problem is that you are confusing the user interface of protege what's in the data. Protege is showing the most specific domain/range statements but the inferred more general ones are still true even if they are not helpful in user interface terms. > Can I solve it, or is that a bug in Framwork jena? I don't think there's anything to solve, certainly what you are seeing isn't a bug. Dave
