Difference between revisions of "Importing Ontologies in P41"
(→Importing Ontologies in Protege 4.1) |
(→Importing Ontologies in Protege 4.1) |
||
Line 6: | Line 6: | ||
In this section, I will walk you through adding an import to an ontology. The purpose of this page is to illustrate OWL 2.0 imports and explain the design of the Protege 4.1 import mechanism. First I will introduce some terminology. | In this section, I will walk you through adding an import to an ontology. The purpose of this page is to illustrate OWL 2.0 imports and explain the design of the Protege 4.1 import mechanism. First I will introduce some terminology. | ||
+ | |||
+ | === Definitions === | ||
'''An import declaration''' is the owl statement that is used to import an ontology. Here is a simplification of the ontology declaration from the pizza ontology: | '''An import declaration''' is the owl statement that is used to import an ontology. Here is a simplification of the ontology declaration from the pizza ontology: | ||
Line 20: | Line 22: | ||
While this description leaves much of the meaning of exactly what is done with an import declaration to the implementation, the reference to ''an appropriate protocol'' makes it fairly clear that we are talking about finding the ontology to be imported by chasing down an ontology location. So in the case of the pizza ontology, the protege import should be treated as a URL and the ontology to be imported is found using the http protocol. | While this description leaves much of the meaning of exactly what is done with an import declaration to the implementation, the reference to ''an appropriate protocol'' makes it fairly clear that we are talking about finding the ontology to be imported by chasing down an ontology location. So in the case of the pizza ontology, the protege import should be treated as a URL and the ontology to be imported is found using the http protocol. | ||
− | '''The physical location''' of an ontology is the location where the source for the ontology | + | '''The physical location''' of an ontology is the location where the source for the ontology is found and loaded from. It may appear from the above definition of the import declaration that the physical location of an imported file should simply be the location indicated by the import declaration. But often ontology developers want to have imports redirected to a physical location on their local machine. The OWL 2 specification makes allowances for this: |
+ | : ''OWL 2 tools will often need to implement functionality such as caching or off-line processing, where ontology documents may be stored at addresses different from the ones dictated by their ontology IRIs and version IRIs. OWL 2 tools MAY implement a redirection mechanism: when a tool is used to access an ontology document at IRI I, the tool MAY redirect I to a different IRI DI and access the ontology document via DI instead.'' |
Revision as of 17:52, December 27, 2009
Under Construction
Importing Ontologies in Protege 4.1
In this section, I will walk you through adding an import to an ontology. The purpose of this page is to illustrate OWL 2.0 imports and explain the design of the Protege 4.1 import mechanism. First I will introduce some terminology.
Definitions
An import declaration is the owl statement that is used to import an ontology. Here is a simplification of the ontology declaration from the pizza ontology:
<owl:Ontology rdf:about="http://www.co-ode.org/ontologies/pizza/2005/10/18/pizza.owl"> <owl:imports rdf:resource="http://protege.stanford.edu/plugins/owl/protege"/> </owl:Ontology>
This declaration states that the pizza.owl ontology imports all the assertions found in the protege ontology. The OWL 2 specification has the following to say about the imported declaration (http://protege.stanford.edu/plugins/owl/protege in this case):
- these IRIs identify the ontology documents of the directly imported ontologies as specified in Section 3.2.
And in section 3.2 we have the following expansion of this definition:
- Each ontology document can be accessed via an IRI by means of an appropriate protocol.
- Each ontology document can be converted in some well-defined way into an ontology (i.e., into an instance of the Ontology UML class from the structural specification).
While this description leaves much of the meaning of exactly what is done with an import declaration to the implementation, the reference to an appropriate protocol makes it fairly clear that we are talking about finding the ontology to be imported by chasing down an ontology location. So in the case of the pizza ontology, the protege import should be treated as a URL and the ontology to be imported is found using the http protocol.
The physical location of an ontology is the location where the source for the ontology is found and loaded from. It may appear from the above definition of the import declaration that the physical location of an imported file should simply be the location indicated by the import declaration. But often ontology developers want to have imports redirected to a physical location on their local machine. The OWL 2 specification makes allowances for this:
- OWL 2 tools will often need to implement functionality such as caching or off-line processing, where ontology documents may be stored at addresses different from the ones dictated by their ontology IRIs and version IRIs. OWL 2 tools MAY implement a redirection mechanism: when a tool is used to access an ontology document at IRI I, the tool MAY redirect I to a different IRI DI and access the ontology document via DI instead.