W3C home > Mailing lists > Public > public-owl-dev@w3.org > April to June 2010

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

From: mihir sanghavi <ms478@njit.edu>
Date: Mon, 21 Jun 2010 17:54:40 -0400
Message-ID: <AANLkTikdivqcOlPUgMf2EW2gUk0eKInHTyobFd0BHh5k@mail.gmail.com>
To: jena-dev@groups.yahoo.com
Cc: public-owl-dev@w3.org
---------- 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 GMT

This archive was generated by hypermail 2.3.1 : Wednesday, 27 March 2013 09:32:58 GMT