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 property assertions

Ishan ishandone at gmail.com
Tue Aug 31 03:58:03 PDT 2010


Hi all,

I am using a local copy of unit.owl
(http://www.qudt.org/qudt/owl/1.0.0/index.html) and I want retrieve the
symbol of individual "meter" of class "LengthUnit". When I opened the owl
file through protege I can see it listed down under the data property
assertions of "meter".
How can I retrieve this through a java application. I am using protegeAPI.

This is what I have tried up to now...

RDFSNamedClass cls =
owlModel.getRDFSNamedClass("http://data.nasa.gov/qudt/owl/qudt#LengthUnit");
        
        Collection col3 = cls.getInstances(true);
        System.out.println("INSTANCE COUNT : " + col3.size());
        RDFProperty pr = owlModel.getRDFProperty("rdf:symbol");
       
        for (Iterator it = col3.iterator(); it.hasNext();) {
            RDFIndividual object = (RDFIndividual) it.next();
            System.out.println("INS: " + object.getLocalName());
        }
-- 
View this message in context: http://protege-ontology-editor-knowledge-acquisition-system.136.n4.nabble.com/How-to-get-property-assertions-tp2401364p2401364.html
Sent from the Protege OWL mailing list archive at Nabble.com.



More information about the protege-owl mailing list