www.altova.com
Previous  Top  Next

Referencing the DC Ontology


After opening a new document, select the RDF level (RDF/Owl | RDF/OWL Level) and save the document as DCMetadataSample.rdf.

 

 

Referencing the DC ontology

To reference the Dublin Core (DC) ontology, do the following:

 

1.Check that you are in RDF level.
2.Click Tools | Namespace Imports for RDF. This pops up the Namespace Imports dialog (screenshot below).

 

dlg_tut_rdf_dcns_imports

 

3.In the Namespace column enter http://purl.org/dc/elements/1.1/, which is the DC namespace declared in the ontology file DCOntology.rdf.
4.In the Import File column, enter the location of the ontology file DCOntology.rdf. This file will have been delivered in the C:/Documents and Settings/<username>/My Documents/Altova/SemanticWorks2008/SemanticWorksExamples/Tutorial folder of the SemanticWorks application folder. Note that you should give the absolute path for the ontology document.
5.If you have edited the ontology file to define XML Schema datatypes, you will need to import the XML Schema namespace (http://www.w3.org/2001/XMLSchema#), too. Enter the namespace to be imported in the Namespace column and the location of the ontology file DCOntology.rdf in the Import File column.
6.Click OK to complete.

 

Note: Defining a DC element in the ontology as having a certain datatype does not automatically insert that datatype annotation when that DC element is inserted in the RDF document. The datatype information in the RDF document must be explicitly entered when entering the object definition for that metadata.

 

 

Declaring namespaces for the RDF document

Your RDF document will require the DC (http://purl.org/dc/elements/1.1/) and XML Schema (http://www.w3.org/2001/XMLSchema#) namespaces to be declared. Declare these namespaces, with prefixes, in the URIref Prefixes dialog (Tools | URIref Prefixes) shown below. Add a line for each namespace using the Add button. Then enter the namespace and its prefix. Click OK to complete.

 

dlg_tut_rdf_uriref_prefixes

 

Note:

The following points about namespaces in the RDF document should be noted.

 

If you do not wish to use datatyping in an RDF document, there is no need to declare the XML Schema namespace. If, in this case, the ontology contains datatype definitions, then these will appear in the GUI as expanded URIrefs. To collapse the namespace part of the URIref, you should then declare the XML Schema namespace with a prefix.
If you wish to create resources in a specific namespace, you must declare this namespace.

 

 

After you have imported the DC ontology namespaces and declared namespaces for the RDF document, the RDF/OWL View Overview should look like this:

 

ss_tut_rdf_dc_resources

 

The 15 Simple DC elements are now available as resources and can be used as predicates of RDF statements. You are now ready to start creating the DC metadata.

 

 

Troubleshooting

If the DC resources do not appear in the Resources Overview, check the following:

 

That RDF level is selected.
That the namespaces are correctly entered. You should also check that they tally with the namespaces in the ontology document.
That the location of the ontology file is an absolute path and is correctly entered.
That namespaces have been correctly declared for the RDF document.

 


Previous  Top  Next

© 2008 Altova