Page History
...
OAI 2.0 is a Java implementation of an OAI-PMH data provider interface developed by Lyncode that uses XOAI, an OAI-PMH Java Library, http://www.lyncode.com/dspace/addons/xoai/doc/XOAI_en.pdf.
Why OAI 2.0?
Projects like OpenAIRE, and Driver have specific metadata requirements (to the published content through the OAI-PMH interface). As the OAI-PMH protocol doesn't establish any frame to these specifics, OAI 2.0 can, in a simple way, have more than one instance of an OAI interface (feature provided by the XOAI core library) so one could define an interface for each project. That is the main purpose, although, OAI 2.0 allows much more than that.
...
- http://www.example.com/oai/request
- http://www.example.com/oai/driver
- http://www.example.com/oai/openaire
With this these ingredients it is possible to build a robust solution that fulfills all requirements of Driver, OpenAIRE and also other project-specific requirements. As shown in Figure 1, with contexts one could select a subset of all available items in the data source. So when entering the OpenAIRE context, all OAI-PMH request will be restricted to that subset of items.
...
Configuration
Basic Configuration
Configuration File: |
|
---|---|
Property: |
|
Example Value: |
|
Information Note: | This allows to choose the OAI data source between solr and database |
Property: |
|
Example Value: |
|
Informational Note: | Solr Server location |
Property: |
|
Example Value: |
|
Informational Note: | OAI persistent identifier prefix. Format - oai:PREFIX:HANDLE |
Property: |
|
Example Value: |
|
Informational Note: | Configuration directory, used by XOAI (core library). Contains xoai.xml, metadata format XSLTs and transformer XSLTs. |
Property: |
|
Example Value: |
|
Informational Note: | Directory to store runtime generated files (for caching purposes). |
Advanced Configuration
OAI 2.0 allows you to configure following advanced options:
...
Code Block |
---|
<Format id="[IDENTIFIER]"> <Prefix>[PREFIX]</Prefix> <XSLT>metadataFormats/[XSLT]</XSLT> <Namespace>[NAMESPACE]</Namespace> <SchemaLocation>[SCHEMA_LOCATION]</SchemaLocation> </Format> |
where:
Parameter | Description |
---|---|
IDENTIFIER | The identifier used within context configurations to reference this specific format, must be unique within all Metadata Formats available. |
PREFIX | The prefix used in OAI interface (metadataPrefix=PREFIX). |
XSLT | The name of the XSLT file within [dspace]/config/crosswalks/oai/metadataFormats directory |
NAMESPACE | XML Default Namespace of the created Schema |
SCHEMA_LOCATION | URI Location of the XSD of the created Schema |
NOTE: Changes in [dspace]/config/crosswalks/oai/xoai.xml requires reloading/restarting the servlet container.
...
Therefore exposing any DSpace metadata field in any OAI format is just a matter of modifying the corresponding output format stylesheet (This assumes the general knowledge of how XSLT works. For a tutorial, see e.g. http://www.w3schools.com/xsl/).
For example, if you have a DC field "local.note.librarian" that you want to expose in oai_dc as <dc:note> (please note that this is not a valid DC field and thus breaks compatibility), then edit oai_dc.xsl and add the following lines just above the closing tag </oai_dc:dc>:
Code Block | ||
---|---|---|
| ||
<xsl:for-each select="doc:metadata/doc:element[@name='local']/doc:element[@name='note']/doc:element/doc:element/doc:field[@name='librarian']">
<dc:note><xsl:value-of select="." /></dc:note>
</xsl:for-each> |
If you need to add/remove metadata fields, you're changing the output format. Therefore it is recommended to create a new If you need to add/remove metadata fields, you're changing the output format. Therefore it is recommended to create a new metadata format as a copy of the one you want to modify. This way the old format will remain available along with the new one and any upgrades to the original format during DSpace upgrades will not overwrite your customizations. If you need the format to have the same name as the original format (e.g. the default oai_dc format), you can create a new context in xoai.xsl containing your modified format with the original name, which will be available as /oai/context-name.
...
Info | ||
---|---|---|
| ||
|
Sanity check your OAI interface with the OAI Validator
There is a very useful validator for OAI interfaces available at http://validator.oaipmh.com, we urge you to use this validator to confirm your OAI interface is in fact usable.