DSpace-CRIS comes with an OAI-PMH data provider endpoint, available at url
https://<dspace-cris-base-url/server/oai
This endpoint can be enabled or disabled via configuration, using property “oai.enabled”
ENRICH DATA SOURCE
Metadata xml returned by OAI-PMH Provider gets its data from ‘oai’ solr core. Its output is built on top of “item.compile” value of each solr document returned by a proper query, and it is trasformed via xsl rules as defined in xoai.xml file.
Interface org.dspace.xoai.app.XOAIItemCompilePlugin is available. By implementing this plugin interface, it is possible to enrich content of “item.compile” field, by adding custom metadata.
Each custom implementation of this interface must be initialized as Spring bean via proper configuration, in order to contribute its own content to “item.compile” field,
CERIF EXPORT
It is possible to enrich “item.compile” field with cerif compliant representation of a given Item. To reach this goal, XOAICerifItemCompilePlugin implementation of org.dspace.xoai.app.XOAIItemCompilePlugin is provided.
This class uses stream dissemination logic defined and configured in crosswalks.xml file to create an xml representation of the item. Multiple Spring Beans with type of this class can be instantiated. Each Spring Bean, configured in oai.xml file, must contain:
generator: type of generator to be used (xml, xml-cerif, available generators are the one defined in crosswalks.xml for each DSpace-CRIS entity type)
fieldName: name of field to be created and added to “item.compile”.
ePerson: (optional) if set with an Eperson email, item exported contains all metadata such person can see, even not public ones.
For example, with this default configuration
| Code Block |
|---|
<bean id="xoaiCerifGenerator" class="org.dspace.xoai.app.XOAICerifItemCompilePlugin">
<property name="generator" value="cerif-xml"/>
<property name="fieldName" value="openaire"/>
</bean> |
an element “cerif.openaire” will be added to “item.compile” field, and its content will be generated depending on Entity type, and using generator named cerif-xml xml.
while this other one
| Code Block |
|---|
<bean id="xoaiCerifGenerator" class="org.dspace.xoai.app.XOAICerifItemCompilePlugin">
<property name="generator" value="cerif-xml"/>
<property name="fieldName" value="openaire"/>
<property name="ePerson" value="john.doe@example.com"/>
</bean> |
an element “cerif.openaire” will be added to “item.compile” field, and its content will be generated depending on Entity type, and using generator named cerif-xml. Generated xml will contain all metadata values user “john.doe@example.com” is allowed to access.
To have the XOAICerifItemCompilePlugin configuration properly working, “generator” value should match with generators defined in crosswalks.xml file, more specifically, generator value should be a suffix of a generator key defined in crosswalks.xml, for example, given above configuration, generators entry keys with id ending in “cerif-xml”, i.e. “publication-cerif-xml”, “person-cerif-xml”, etc. If such generators are not defined, generated oai xml will be incomplete.