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] Protege 4.0.2 problem or bug?

Oancea Daniel doancea at gmail.com
Thu Jan 28 03:12:12 PST 2010


Hello everybody,

I'm facing with a strange (at least for me) situation.

I have an ontology designed with the Protege 4.0.2 tool. This ontology is
imported into another one and in the last one I would like to insert some
individuals using property form the previous one. For this operations I used
OWL-API.

Now, the strange part is the following. Every time when I'm trying to insert
an individual into my ontology, the OWL-API creates and insert the
individual into a new class (a Thing subclass) with the same name with the
one that already exits in ontology taxonomy. At the beginning I thought that
I don't have the right references to the appropriate class. But it seams
that the problem comes from Protege and how he is dealing with imports
(maybe namespaces).

To be more precisely, I will put some fragments of code here. The imported
ontology have the following code if it will be opened with a regular text
editor :

<?xml version="1.0"?>

<!DOCTYPE rdf:RDF [
    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
    <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" >
    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
    <!ENTITY MyOnt "http://localhost/owl/MyOnt.owl#" >
    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>

<rdf:RDF xmlns="http://localhost/owl/MyOnt.owl#"
     xml:base="http://localhost/owl/MyOnt.owl"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
     xmlns:MyOnt="http://localhost/owl/MyOnt.owl#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <owl:Ontology rdf:about=""/>

If I will open the* same* ontology with the Protege 4.0.2 and I go to
ActiveOntology Tab and I choose RDF/XML Rendering Tab the code is:
<?xml version="1.0"?>

<!DOCTYPE rdf:RDF [
    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
    <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" >
   * <!ENTITY MyOnt2 "http://localhost/owl/MPEG7Prot4.owl#" >*
    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
    <!ENTITY MyOnt "http://localhost/owl/MyOnt.owl#" >
    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>

<rdf:RDF xmlns="http://localhost/owl/MyOnt.owl#"
     xml:base="http://localhost/owl/MPEG7Prot4.owl"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
     xmlns:MyOnt="http://localhost/owl/MyOnt.owl#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    * xmlns:MyOnt2="http://localhost/owl/MyOnt.owl#">*
    <owl:Ontology rdf:about=""/>

Like you see, appeared a new namespase: MyOnt2. This is normal?
Forward, like I said, I've been used OWL-API to insert individual into
ontology.
When I insert the individual using the OWL-API the code is:

    <!-- http://localhost/owl/mainOntology.owl#John -->

    <*MyOnt2*:Adult rdf:about="#John">
        <rdf:type rdf:resource="&owl;Thing"/>
    </*MyOnt2*:Adult>

This operation add a new class into "mainOntology" called Adult. Something
like:
+Thing
++Person
+++Adult
++Adult (John)

If I'm using the Protege 4.0.2 application what I get is different and it is
what I need:

    <!-- http://localhost/owl/mainOntology.owl#John-->

    <*MyOnt*:Adult rdf:about="#John">
        <rdf:type rdf:resource="&owl;Thing"/>
    </*MyOn*t:Adult>

My doubt is somehow I added some junk name-spaces and when I'm using the
OWL-API, is using the wrong one. A solution is to start making a new
ontology from the start indenticaly with the MyOnt. But, the MyOnt is a
large one and I will some time.

May this information it will help also, the MyOnt which is imported into
"mainOntology" is available via web server at "
http://localhost/owl/MyOnt.owl".

Any suggestions it will be appreciated.

Thank you!
-Daniel
-- 
________
Note:  If the reader of this message is not the intended recipient, or an
employee or agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have received
this communication in error, please notify us immediately by replying to the
message and deleting it from your computer. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20100128/fe8db970/attachment.html>


More information about the protege-owl mailing list