Page History
...
OAI manager it's an utility that allows one to do some administrative operations with OAI.
Syntax
bin bin/dspace oai <action> \ [parameters\] Wiki Markup
Actions
- import Imports DSpace items into OAI Solr index (also cleans OAI cache)
- clean-cache Cleans the OAI cache
...
- -o Optimize index after indexing
- -c Clears the Solr index before indexing (it will import all items again)
- -v Verbose output
- -h Shows an help text
Scheduled Tasks
In order to refresh the OAI Solr index, it is required to run the {{\[dspace\]/bin/dspace oai import import }}command periodically. You can add the following task to your crontab: Wiki Markup
Code Block |
---|
0 3 * * * [dspace]/bin/dspace oai import |
Note that {{\ Wiki Markup [dspace
\]
}} should be replaced by the correct value, that is, the value defined in {{dspace.cfg
}} parameter {{dspace.dir
}}.
Using Database
OAI 2.0 could also work using the database for querying. To configure that one must change the \ [dspace\]/config/modules/xoai.cfg file, specifically parameter 'storage', setting it to _database_. Wiki Markup
OAI Manager (Database Data Source)
OAI manager it's an utility that allows one to do some administrative operations with OAI.
Syntax
bin bin/dspace oai <action> \ [parameters\] Wiki Markup
Actions
- clean-cache Cleans the OAI cache
- compile-items Compiles DSpace items
- erase-compiled-items Erases all DSpace compiled items
...
- -v Verbose output
- -h Shows an help text
Scheduled Tasks
In order to refresh the OAI cache and compile DSpace items (for fast responses), it is required to run the {{\[dspace\]/bin/dspace xoai compile-items items }}command periodically. You can add the following task to your crontab: Wiki Markup
Code Block |
---|
0 3 * * * [dspace]/bin/dspace oai compile-items |
...
Note that {{\[dspace
\]
}} should be replaced by the correct value, that is, the value defined in {{dspace.cfg
}} parameter {{dspace.dir
}}.
Client-side stylesheet
...
The OAI-PMH response is an XML file. While OAI-PMH is primarily used by harvesting tools and usually not directly by humans, sometimes it can be useful to look at the OAI-PMH requests directly - usually when setting it up for the first time or to verify any changes you make. For these cases, XOAI provides an XSLT stylesheet to transform the response XML to a nice looking, human-readable and interactive HTML. The stylesheet is linked from the XML response and the transformation takes place in the user's browser. Most automated tools are interested only in the XML file itself and will not perform the transformation. If you want, you can change which stylesheet will be used by placing it into the {{\[dspace
\]/webapps/xoai/static
}} directory (or into the {{\[dspace-src
\]/dspace-xoai/dspace-xoai-webapp/src/main/webapp/static
}} after which you have to rebuild DSpace), modifying the "stylesheet" attribute of the "Configuration" element in {{\[dspace
\]/config/modules/xoai/xoai.xml
}} and restarting your servlet container.
Metadata Formats
By default OAI 2.0 provides 12 metadata formats within the /request context:
...
Configuration
Basic Configuration
...
Configuration File: | | ]]></ac:plain-text-body></ac:structured-macro> |
---|---|---|
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). |
...
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.dir}/config/modules/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/modules/oai/xoai.xml requires reloading/restarting the servlet container.