![]() |
| Previous Top Next |
Namespace Imports for RDF |
When creating an RDF or RDFS document, it is convenient to be able to insert resources in RDF statements by selecting the required resources from a list. This is especially useful if a single resource is to be inserted multiple times in a document.
As an example of such use consider the creation of an RDF document that contains metadata for a large number of web pages. Each web page resource is described by the same set of property resources. If the property resources are described in an ontology, then SemanticWorks can access these resources so that they can be displayed in the SemanticWorks interface and be inserted in RDF statements. SemanticWorks does this using the Namespace Imports mechanism.
The Namespace Imports mechanism works by importing, into the RDF or RDFS document, the namespace URIs of the resources to be referenced. The imported namespace URIs must be the same as those used to define the required resources in an ontology. Once a namespace URI is imported, ontology resources associated with this URI are made available to SemanticWorks for insertion in the active document. The Namespace Imports for RDF command is the SemanticWorks feature that enables you to import the required namespaces. The feature is to be used as follows:
| 1. | Select the Namespace Imports for RDF command in order to display the Namespace Imports dialog (screenshot below). |

| 2. | In the Namespace column enter the first namespace to be imported, say, http//purl.org/dc/elements/1.1/, which is the DC namespace declared, say, in an ontology document DCOntology.rdf. |
| 3. | In the Import File column, enter the location of the ontology document DCOntology.rdf. Note that you should give the absolute path for the ontology document. |
| 4. | If the ontology file defines XML Schema datatypes, you will need to import the XML Schema namespace (http//www.w3.org/2001/XMLSchema#), too. Enter the XML Schema namespace (http://www.w3.org/2001/XMLSchema#) in the Namespace column and the location of the ontology file in the Import File column. |
| 5. | Click OK to complete. |
In the procedure outlined above, you have imported two namespace URIs. After declaring these namespaces in your RDF document (see URIref Prefixes and Namespaces for a description of how to do this), resources from the ontology file from which the namespaces have been imported are listed as resources (in RDF documents) or instances (in RDFS documents); and (ii) are available in the Detail View of resources (or instances) , for insertion in the RDF or RDFS document.
For a detailed description of usage in practice, see the tutorial section RDF Documents.
Note: Resources that are displayed in the Resources or Instances Overview as a result of the namespace imports (and not as a result of being physically entered in the document) are available only for insertion. They should be regarded as abstract resources (available for instantiation) and distinct from the resources actually contained in the document.
Namespace imports and owl:imports
The Namespace Import feature can also be used to locate ontology resources indicated in the owl:imports statement of an ontology. The URI used in the owl:imports statement is entered as a Namespace in the Namespace Imports dialog (screenshot above). The actual (absolute path) location of the ontology to be imported is entered as the corresponding Import File. In order for the namespace import to work, the base URI of the ontology to be imported, which is specified using the xml:base attribute of its rdf:RDF document element, must be the same as the URI used in the owl:imports statement of the importing ontology. Note that it is the mapping in the Namespace Imports dialog of the importing ontology that provides the actual location of the ontology to be imported. See Usage Issues for an overview of how the owl:imports mechanism works.
|