Imports in Protege 4

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Imports in Protege 4

Sarah Maynard
I am having trouble successfully importing ontologies and opening ontologies that import other ontologies in Protege 4beta (build 110).

The first problem I have is that saving a new ontology as OWL/XML doesn't seem to save the import correctly.  I have performed the following steps:

I open Protege 4 beta (build 110) and create a new ontology.  I go to the "Active Ontology" tab and hit the "plus" on direct imports.  When I import an ontology from the web: http://ccdb.ucsd.edu/NIF/NIF-Cell4.owl the ontology loads successfully.  When I save the ontology as OWL/XML and reopen it, under the direct imports label in the Active Ontology tab, the imported ontology says "Not Loaded".  There are no obvious exceptions in the console output.  Looking at the text of the saved OWL/XML file, the import statement writes the URI of the imported owl file instead of the URL. I have pasted the full ontology below. It is also strange that Protege seems to write the import statement twice.


The second problem I have is that saving a new ontology as RDF/XML doesn't seem to save the import correctly either.

When I create a new ontology, I can import http://ccdb.ucsd.edu/NIF/NIF-Cell4.owl and the ontology loads fine.  But when I save the file as RDF/XML,and reopen the file up again, the ontology does not load the the import statement and again has the URI and not the URL.

I am attaching both the OWL/XML and the RDF/XML versions of this ontology.

What should I do about this issue?  Thank you.

OWL/XML file:
<?xml version="1.0"?>

<!DOCTYPE Ontology [
    <!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 rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>

<Ontology xmlns="http://www.w3.org/2006/12/owl2-xml#"
     xml:base="http://www.w3.org/2006/12/owl2-xml#"
     xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     URI="http://www.semanticweb.org/ontologies/2008/8/Ontology1221770647156.owl">
    <Imports
        >http://ccdb.ucsd.edu/NIF/</Imports>
    <Imports
        >http://ccdb.ucsd.edu/NIF/</Imports>
</Ontology>

<!-- Generated by the OWL API (version 2.2.1.842) http://owlapi.sourceforge.net -->

RDF/XML:
<?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 rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>

<rdf:RDF xmlns="http://www.semanticweb.org/ontologies/2008/8/Ontology1221771082921.owl#"
     xml:base="http://www.semanticweb.org/ontologies/2008/8/Ontology1221771082921.owl"
     xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:owl="http://www.w3.org/2002/07/owl#">
    <owl:Ontology rdf:about="">
        <owl:imports rdf:resource="http://ccdb.ucsd.edu/NIF/"/>
    </owl:Ontology>
</rdf:RDF>

<!-- Generated by the OWL API (version 2.2.1.842) http://owlapi.sourceforge.net -->

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: Imports in Protege 4

Nick Drummond
Hi,

The imports statement always contains the URI of the ontology (not its location).
The strategy P4 uses to find imports is:

1) look into the directory that the ontology was loaded from
2) look into any ontology libraries that have been set up
3) look on the web at the URI of the ontology being imported

The ontology you import is located at [1] but is called [2]
So, p4 is failing to find any ontology at [2].

The easiest way to resolve this is:
a) if you are happy to use your own local version, copy the file at [1] to the same folder as your main ontology OR
b) set up an ontology library (under the file menu) to point [2] to [1] OR
c) if you have control over the imported ontology get the people responsible to move it to [2]

Nick


On Fri, Sep 19, 2008 at 7:44 PM, Sarah Maynard <[hidden email]> wrote:
I am having trouble successfully importing ontologies and opening ontologies that import other ontologies in Protege 4beta (build 110).

The first problem I have is that saving a new ontology as OWL/XML doesn't seem to save the import correctly.  I have performed the following steps:

I open Protege 4 beta (build 110) and create a new ontology.  I go to the "Active Ontology" tab and hit the "plus" on direct imports.  When I import an ontology from the web: http://ccdb.ucsd.edu/NIF/NIF-Cell4.owl the ontology loads successfully.  When I save the ontology as OWL/XML and reopen it, under the direct imports label in the Active Ontology tab, the imported ontology says "Not Loaded".  There are no obvious exceptions in the console output.  Looking at the text of the saved OWL/XML file, the import statement writes the URI of the imported owl file instead of the URL. I have pasted the full ontology below. It is also strange that Protege seems to write the import statement twice.


The second problem I have is that saving a new ontology as RDF/XML doesn't seem to save the import correctly either.

When I create a new ontology, I can import http://ccdb.ucsd.edu/NIF/NIF-Cell4.owl and the ontology loads fine.  But when I save the file as RDF/XML,and reopen the file up again, the ontology does not load the the import statement and again has the URI and not the URL.

I am attaching both the OWL/XML and the RDF/XML versions of this ontology.

What should I do about this issue?  Thank you.

OWL/XML file:
<?xml version="1.0"?>

<!DOCTYPE Ontology [
    <!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 rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>

<Ontology xmlns="http://www.w3.org/2006/12/owl2-xml#"
     xml:base="http://www.w3.org/2006/12/owl2-xml#"
     xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     URI="http://www.semanticweb.org/ontologies/2008/8/Ontology1221770647156.owl">
    <Imports
        >http://ccdb.ucsd.edu/NIF/</Imports>
    <Imports
        >http://ccdb.ucsd.edu/NIF/</Imports>
</Ontology>

<!-- Generated by the OWL API (version 2.2.1.842) http://owlapi.sourceforge.net -->

RDF/XML:
<?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 rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>

<rdf:RDF xmlns="http://www.semanticweb.org/ontologies/2008/8/Ontology1221771082921.owl#"
     xml:base="http://www.semanticweb.org/ontologies/2008/8/Ontology1221771082921.owl"
     xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:owl="http://www.w3.org/2002/07/owl#">
    <owl:Ontology rdf:about="">
        <owl:imports rdf:resource="http://ccdb.ucsd.edu/NIF/"/>
    </owl:Ontology>
</rdf:RDF>

<!-- Generated by the OWL API (version 2.2.1.842) http://owlapi.sourceforge.net -->

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback



_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: Imports in Protege 4

Stephen Larson
Nick,

   There has been a thread about imports on this list which suggested that the OWL api would include support for extending the imports statement to include the physical location.  Timothy Redmond has a nice explanation of the problem in this thread:

https://mailman.stanford.edu/pipermail/p4-feedback/2007-November/000469.html

   This feature is important for managing large conglomerate ontologies with complex import trees.  The problem as I see it is that in general, to manage a large family of ontologies, it is unrealistic to expect that other ontologies will keep the physical location the same as the URI of the ontology.  In fact there are good reasons related to versioning to keep them separate.

   I had thought that an earlier version of Protege 4 had implemented this already.  Will some form of this strategy be included in future versions?

Thanks,
  Stephen

On Mon, Sep 22, 2008 at 6:27 AM, Nick Drummond <[hidden email]> wrote:
Hi,

The imports statement always contains the URI of the ontology (not its location).
The strategy P4 uses to find imports is:

1) look into the directory that the ontology was loaded from
2) look into any ontology libraries that have been set up
3) look on the web at the URI of the ontology being imported

The ontology you import is located at [1] but is called [2]
So, p4 is failing to find any ontology at [2].

The easiest way to resolve this is:
a) if you are happy to use your own local version, copy the file at [1] to the same folder as your main ontology OR
b) set up an ontology library (under the file menu) to point [2] to [1] OR
c) if you have control over the imported ontology get the people responsible to move it to [2]

Nick


On Fri, Sep 19, 2008 at 7:44 PM, Sarah Maynard <[hidden email]> wrote:
I am having trouble successfully importing ontologies and opening ontologies that import other ontologies in Protege 4beta (build 110).

The first problem I have is that saving a new ontology as OWL/XML doesn't seem to save the import correctly.  I have performed the following steps:

I open Protege 4 beta (build 110) and create a new ontology.  I go to the "Active Ontology" tab and hit the "plus" on direct imports.  When I import an ontology from the web: http://ccdb.ucsd.edu/NIF/NIF-Cell4.owl the ontology loads successfully.  When I save the ontology as OWL/XML and reopen it, under the direct imports label in the Active Ontology tab, the imported ontology says "Not Loaded".  There are no obvious exceptions in the console output.  Looking at the text of the saved OWL/XML file, the import statement writes the URI of the imported owl file instead of the URL. I have pasted the full ontology below. It is also strange that Protege seems to write the import statement twice.


The second problem I have is that saving a new ontology as RDF/XML doesn't seem to save the import correctly either.

When I create a new ontology, I can import http://ccdb.ucsd.edu/NIF/NIF-Cell4.owl and the ontology loads fine.  But when I save the file as RDF/XML,and reopen the file up again, the ontology does not load the the import statement and again has the URI and not the URL.

I am attaching both the OWL/XML and the RDF/XML versions of this ontology.

What should I do about this issue?  Thank you.

OWL/XML file:
<?xml version="1.0"?>

<!DOCTYPE Ontology [
    <!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 rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>

<Ontology xmlns="http://www.w3.org/2006/12/owl2-xml#"
     xml:base="http://www.w3.org/2006/12/owl2-xml#"
     xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     URI="http://www.semanticweb.org/ontologies/2008/8/Ontology1221770647156.owl">
    <Imports
        >http://ccdb.ucsd.edu/NIF/</Imports>
    <Imports
        >http://ccdb.ucsd.edu/NIF/</Imports>
</Ontology>

<!-- Generated by the OWL API (version 2.2.1.842) http://owlapi.sourceforge.net -->

RDF/XML:
<?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 rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>

<rdf:RDF xmlns="http://www.semanticweb.org/ontologies/2008/8/Ontology1221771082921.owl#"
     xml:base="http://www.semanticweb.org/ontologies/2008/8/Ontology1221771082921.owl"
     xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:owl="http://www.w3.org/2002/07/owl#">
    <owl:Ontology rdf:about="">
        <owl:imports rdf:resource="http://ccdb.ucsd.edu/NIF/"/>
    </owl:Ontology>
</rdf:RDF>

<!-- Generated by the OWL API (version 2.2.1.842) http://owlapi.sourceforge.net -->

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback



_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback



_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: Imports in Protege 4

Bijan Parsia-3
Imports has been rather substantively revamped in OWL 2:
        http://www.w3.org/2007/OWL/wiki/Syntax#Ontologies
(esp 3.1-3.4).

I imagine the OWL API (and thus P4) will track that.

Cheers,
Bijan.
_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: Imports in Protege 4

Nick Drummond
Yes, when this is supported in the OWL API, protege will be able to use this mechanism to find ontologies.

"it is unrealistic to expect that other ontologies will keep the physical location the same as the URI of the ontology"

You don't have to do this - one of the options is to use a local copy or use the ontology library mechanism.
These have both been implemented in P4 since very early on.
And I'm sure Timothy would agree that we would rather use the standard OWL2 mechanism than invent an annotation that would later have to be deprecated.

Nick


On Mon, Sep 22, 2008 at 10:56 PM, Bijan Parsia <[hidden email]> wrote:
Imports has been rather substantively revamped in OWL 2:
       http://www.w3.org/2007/OWL/wiki/Syntax#Ontologies
(esp 3.1-3.4).

I imagine the OWL API (and thus P4) will track that.

Cheers,
Bijan.
_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback


_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback