Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] (Protege API Help) How to make inverse properties work

Mark Shaftoe markshaftoe at yahoo.com
Fri Sep 15 04:56:30 PDT 2006


Hello. I have been seraching some forum or mailing list to have this question answered and I'll appreciate your help very much.

I have the following simple ontology:

Class Person,

Functional property hasParent and it's inverse property hasChildren,

Individuals: Peter, John, Mary, Alice (Person)  (Peter hasParent John) (Mary hasChildren Alice -Alice belongs to Mary's children-).

Using the Jave code generator I get this interface:

interface Person ... {
     Person getHasParent();
     Collection getHasChild();
     ...
}

How can I make the following code work?

Person peter,  john,  mary,  alice;
... // load from OWLModel
peter.getHasParent() == john; // OK
john.getHasChildren() // WRONG: john.getHasChildren() is empty.
mary.getHasChildren() // OK, alice belongs to Collection
alice.getHasParent() == mary // WRONG: it's null.

Thank you very much.



 		
---------------------------------
 All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20060915/50452244/attachment.html>


More information about the protege-owl mailing list