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] How to get values of a dataproperty or objectproperty using Java API over OWL files?

Peng Yang pey204 at gmail.com
Wed Oct 1 12:52:03 PDT 2008


Hi,

Does anybody know how to get value of a dataproperty or objectproperty using
Java API over OWL files? Can I use getPropertyValueLiterals( )?

The following are the codes how I get values of data property with
getPropertyValueLiterals( ). But it fails, no values of data properties are
print out. It seems that getPropertyValueLiterals( ) returns a  NULL
container.

Collection
values=((DefaultOWLObjectProperty)property).getPropertyValueLiterals
((DefaultOWLObjectProperty)property);

                        for(Iterator vi=values.iterator();vi.hasNext();)
                        {
                                ProtegeSlot s=(ProtegeSlot) vi.next();

System.out.println("----"+s.getBrowserText());
                         }

Thanks
Pey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20081001/161c5551/attachment.html>


More information about the protege-owl mailing list