[Pellet-users] Getting Properties with a given domain (corrected: sorry)
Ibach, Brandon L
brandon.l.ibach at lmco.com
Wed Mar 14 15:04:05 UTC 2007
I don't know much about the various APIs to Pellet, so I can't readily answer your "how" question, but I would like to point out one thing regarding the "why". The semantics of a property domain in OWL are not about restricting what classes of individuals can have values for the property. Rather, they are about inferring the class of an individual based on a property assertion. So, if you assert that "individual_1 datatypeProperty_2 10" and "datatypeProperty_2 has domain Class_1", then the reasoner would infer that "individual_1 is a Class_1". Perhaps this might affect what you're trying to do with the information about property domains.
-Brandon :)
________________________________
From: pellet-users-bounces at lists.owldl.com [mailto:pellet-users-bounces at lists.owldl.com] On Behalf Of Álvaro Ramos
Sent: Wednesday, March 14, 2007 7:01 AM
To: pellet-users at lists.owldl.com
Subject: Re: [Pellet-users] Getting Properties with a given domain (corrected: sorry)
Hi again,
Now I am trying a slightly more complex ontology with a Datatype property that has as domain UnionOf(Class_1, Class_2) (datatypeProperty_1) and another with domain Class_1 (datatypeProperty_2). The swoop's code returns only the simple:objectProp property both for the ParentClass and Class_1 arguments. I have developed a method based on the kb.hasDomain() method but then the answers are
ParentClass (inherited=true): all the properties in the ontology
Class_1 (inherited=true): all the properties in the ontology
ParentClass (inherited=false): datatypeProperty_1,datatypeProperty_2, objectProp
Class_1 (inherited=false): datatypeProperty_2
>From here I deduce that the hasdomain method acts the opposite as I thought it to work, in the sense that
if domain(p) = c1 and c1 isSubClassOf c2 => hasdomain(p,c2) = true
Is this true?
I want to retrieve all the properties that could be associated to an individual of a given class (as subject and without leading to inferring that this individual is of another class or leaving the ontology in an inconsistent state). Specifically, I want all the properties (p) such that for a given class(c):
domain(p)contains(c)
That is, what Protegè shows in the properties view of a class... For Class_1:
datatypeProperty_1
datatypeProperty_2
objectProp
Is it possible to get this information from Pellet? I haven't got much experience with semantics and reasoners, so maybe this is a huge misconception and I should not be using Pellet (or a reasoner) for this.
Best regards,
Álvaro
Álvaro Ramos escribió:
Hi Evren,
It helped a lot!
Since in my example I am just using explicit declarations and no inference, the KnowledgeBase.ensureConcistency call did it.
Also (for the people that are interested) I have detected that the method I used has an obvious bug (if I understood the meaning of the argument 'inherited' correctly):
line
Set allSubCSet = reasoner.descendantClassesOf(c);
should be
Set allSubCSet = reasoner.ancestorClassesOf(c);
Thanks again!
Álvaro
________________________________
_______________________________________________
Pellet-users mailing list
Pellet-users at lists.owldl.com
http://lists.owldl.com/mailman/listinfo/pellet-users
_______________________________________________
Sponsored by Clark & Parsia, LLC http://clarkparsia.com/
--
Álvaro Ramos
Telefonica I+D
Via Augusta, 177
08021 Barcelona
Tel: (+34) 93 295 63 83
Fax: (+34) 93 365 30 43
"The future belongs to those who prepare for it today."
Malcom X
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.owldl.com/pipermail/pellet-users/attachments/20070314/273bd9d1/attachment.htm
More information about the Pellet-users
mailing list