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] Transforming an OWL file

Timothy Redmond tredmond at stanford.edu
Mon Jan 28 09:46:28 PST 2008


> I am thinking of using java and XSLT(are there better options?) for  
> the transformation but my problem is with the <rdf:SubClassOf> node  
> that reports another class name of the format ‘PRO_XXXX’ which has  
> its details(I mean <rdfs:label> further down in the .owl file). Any  
> idea of how to implement this transformation will be greatly  
> appreciated.

I would recommend avoiding things like XSLT to work with OWL.  It may  
work with your particular problem but the solution will be fragile and  
hacky.  (Of course fragile and hacky might be fine for a single use.)   
There are several distinct XML ways to say the identical thing in RDF  
and OWL and there have been other discussions of this issue on this  
mailing list (not sure how easy they would be to find though).  So for  
example your XSLT would work with a declaration like

	<owl:Class rdf:ID="PRO_00019440">

but would it be equally happy with the equivalent (modulo rdf syntax  
errors) line:

        <rdf:Description rdf:ID="PRO_00019440">
	   <rdf:type="owl:Class">

	?
There are also several subtleties in the OWL specifications and a  
couple of issues that are unspecified.

A much better approach would be to use some OWL api to read and write  
the owl file.  At the top of my recommendations would be the OWL api  
(owlapi.sourceforge.net) and Jena (jena.sourceforge.net).

> I have an owl file that needs to be modified to properly reflect the  
> class names. The existing class names in <owl:Class> tags are in the  
> format ‘PRO_XXXXX” where XXXX is a sequence of numbers and I would  
> like the class names to be changed to the textual content of the  
> first child node <rdfs:label> .

So my other question is whether you are sure this is what you want.   
There is a common recommendation that the uri for class be a  
unchanging meaningless identifier and that the real name of the class  
live in the rdf:label (there is an Alan Rector paper about this  
somewhere).  Part of the point is that this insulates you against  
change.  The class can be referred to in a consistent manner (by uri)  
even when the name of the class changes.  Also, many tools (e.g.  
Protege) allow you to view ontologies by displaying the rdf:label.

-Timothy


On Jan 28, 2008, at 8:20 AM, Ghajar, Anoosh wrote:

> Hi,
> I have an owl file that needs to be modified to properly reflect the  
> class names. The existing class names in <owl:Class> tags are in the  
> format ‘PRO_XXXXX” where XXXX is a sequence of numbers and I would  
> like the class names to be changed to the textual content of the  
> first child node <rdfs:label> .
> I am thinking of using java and XSLT(are there better options?) for  
> the transformation but my problem is with the <rdf:SubClassOf> node  
> that reports another class name of the format ‘PRO_XXXX’ which has  
> its details(I mean <rdfs:label> further down in the .owl file). Any  
> idea of how to implement this transformation will be greatly  
> appreciated.
> Thank You.
> Here is a section of my .owl file:
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
> ++++++
> <owl:Class rdf:ID="PRO_00019440">
>     <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>     >Smad2 sequence 1 phosphorylated and ubiquitinated form</ 
> rdfs:label>
>     <oboInOwl:hasDbXref>
>       <oboInOwl:DbXref rdf:nodeID="A0">
>         <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string 
> "
>         >MOD:00696 has_modification - phosphorylated residue</ 
> rdfs:label>
>       </oboInOwl:DbXref>
>     </oboInOwl:hasDbXref>
>     <oboInOwl:hasDbXref>
>       <oboInOwl:DbXref rdf:nodeID="A1">
>         <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string 
> "
>         >MOD:00688 has_modification - isopeptide crosslinked  
> residues</rdfs:label>
>       </oboInOwl:DbXref>
>     </oboInOwl:hasDbXref>
>     <rdfs:subClassOf>
>       <owl:Restriction>
>         <owl:someValuesFrom>
>           <owl:Class rdf:ID="PRO_00000011"/>
>         </owl:someValuesFrom>
>         <owl:onProperty>
>           <owl:TransitiveProperty rdf:ID="UNDEFINED_derives_from"/>
>         </owl:onProperty>
>       </owl:Restriction>
>     </rdfs:subClassOf>
>     <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/ 
> owl#Thing"/>
>   </owl:Class>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03




More information about the protege-owl mailing list