Fwd: How to handle predicates and anonymous inferred classes created in protege via JENA?

---------- Forwarded message ----------
From: <fa2260@columbia.edu>
Date: Mon, Jun 21, 2010 at 5:38 PM
Subject: Re: How to handle predicates and anonymous inferred classes created
in protege via JENA?
To: mihir sanghavi <ms478@njit.edu>


Hey Folks,

I am developing a semantic web application that helps navigate biological
hierarchies. The ontology is modelled in protege. I am having problems
parsing the Protege generated .owl file.

As an example. I modeled the relationship, "AdventititiousRoot isPartOf only
Root" (isPartOf is a user-defined porperty). I modeled/described this
relationship under the 'SuperClass' field for the Class 'AdeventitiousRoot'.
The 'Class Usage' generated was "AdventitiousRoot subClassOf isParOf only
Root". The associated rdf/xml code is given below.

<!--
http://www.semanticweb.org/ontologies/2010/1/3/PlantEntities.owl#AdventitousRoot-->

   <owl:Class rdf:about="#AdventitousRoot">
       <rdfs:subClassOf rdf:resource="&owl;Thing"/>
       <rdfs:subClassOf>
           <owl:Restriction>
               <owl:onProperty rdf:resource="#isPartOf"/>
               <owl:allValuesFrom rdf:resource="#Root"/>
           </owl:Restriction>
       </rdfs:subClassOf>
   </owl:Class>

I parsed this code using JENA's object "statement iterator" and I got
triples such as "AdventitiiousRoot subClassOf Thing" and "AdventitiousRoot
subclassOf 6b8720b3:128d06ed301:-7fc6".

I am able to capture the Subject, Predicate and Object in the first
statement.

My problem is how do I capture the predicate "isPartOf" and the owl
restriction "only" and avoid generating the hexadecimal reference in the
second statement?

Thanks.


Cheers,
Mihir Sanghavi
(ms478@njit.edu)

Received on Tuesday, 22 June 2010 13:01:06 UTC