Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
minLevel2
outlinetrue
stylenone

Servidor OAI-PMH

En las siguientes secciones y subpáginas, aprenderás cómo configurar el servidor OAI-PMH y activar crosswalks adicionales de OAI-PMH. También se recomienda al usuario consultar OAI-PMH Data Provider para obtener detalles más profundos sobre el funcionamiento del programa.

La interfaz OAI-PMH puede ser utilizada por otros sistemas para recolectar registros de metadatos desde tu instalación de DSpace.

Activación del Servidor OAI-PMH

El servidor OAI-PMH de DSpace está habilitado de forma predeterminada. Sin embargo, puedes optar por habilitarlo o deshabilitarlo en tu archivo local.cfg utilizando las siguientes configuraciones:

Code Block
# Enable (true) or disable (false) OAI-PMH server
oai.enabled = true

# When enabled, OAI-PMH server is available at this path
oai.path = oai

Si modificas cualquiera de estas configuraciones, debes reiniciar tu contenedor de servlets (generalmente Tomcat).

  • Puedes comprobar que está funcionando enviando una solicitud a: [dspace.server.url]/[oai.path]/request?verb=Identify (por ejemplo: http://localhost:8080/server/oai/request?verb=Identify)
  • La respuesta debería ser similar a la que devuelve el Servidor de Demostración de DSpace 7: https://api7.dspace.org/server/oai/request?verb=Identify

Si estás utilizando un navegador moderno, deberías ver una página HTML que describe tu repositorio. Lo que realmente estás recibiendo del servidor es un archivo XML con un enlace a una hoja de estilo XSLT que genera ese HTML en tu navegador (del lado del cliente). Cualquier navegador que no pueda interpretar XSLT mostrará únicamente el XML puro. La hoja de estilo predeterminada se encuentra en [dspace-source]/dspace-oai/src/main/resources/static/style.xsl y puede modificarse configurando el atributo stylesheet del elemento Configuration en [dspace]/config/crosswalks/oai/xoai.xml.

Info
titleEnlaces relevantes

Mantenimiento del Servidor OAI-PMH

Después de activar el servidor OAI-PMH, también debes asegurarte de que su índice se actualice de forma regular. Actualmente, esto no ocurre automáticamente dentro de DSpace. En su lugar, debes programar la ejecución periódica de la herramienta de línea de comandos [dspace.dir]/bin/dspace oai import (normalmente al menos una vez por noche, aunque podrías programarla con mayor frecuencia).

Aquí tienes un ejemplo de cron que puede usarse para programar una reindexación del servidor OAI-PMH de forma nocturna (para ver la lista completa de tareas programadas recomendadas en DSpace, consulta Tareas programadas mediante Cron):

Code Block
# Update the OAI-PMH index with the newest content at midnight every day
# NOTE: ONLY NECESSARY IF YOU ARE RUNNING OAI-PMH 
# (This ensures new content is available via OAI-PMH)
0 0 * * * [dspace.dir]/bin/dspace oai import > /dev/null

Puedes encontrar más información sobre la herramienta de línea de comandos dspace oai en la documentación del Administrador OAI (OAI Manager).

Recolector OAI-PMH / OAI-ORE (Cliente)

Esta sección describe los parámetros utilizados para configurar el recolector OAI-PMH / OAI-ORE. Este recolector puede utilizarse para recolectar contenido (bitstreams y metadatos) en DSpace desde un servidor externo OAI-PMH u OAI-ORE.

Info
titleCompatible con la versión 7.1 o superior

La recolección OAI no estaba disponible en DSpace 7.0. Fue restablecida en DSpace 7.1. Consulta Estado de la versión 7.0 de DSpace

Recolección desde otro DSpace

Si estás recolectando contenido (bitstreams y metadatos) desde una instalación externa de DSpace mediante OAI-PMH y OAI-ORE, primero debes verificar que dicha instalación externa de DSpace permita la recolección a través de OAI-ORE.

Si el DSpace externo está ejecutando la versión 6.x o una anterior, debe tener en funcionamiento tanto la interfaz OAI-PMH como la interfaz XMLUI para admitir la recolección de contenido mediante OAI-ORE.

Si el DSpace externo está ejecutando la versión 7.x o superior, solo necesita tener habilitada la interfaz OAI-PMH.

Puedes verificar que la opción de recolección OAI-ORE esté habilitada siguiendo estos pasos:

  1. Primero, verifica si el DSpace externo indica que admite la recolección ORE a través de la interfaz OAI-PMH. Para ello, envía la siguiente solicitud a la interfaz OAI-PMH del DSpace: http://[URL-completa-a-OAI-PMH]/request?verb=ListRecords&metadataPrefix=ore
  2. Para versiones 6.x o anteriores, puedes verificar que la interfaz XMLUI admite OAI-ORE (debería hacerlo, siempre que sea una versión actual de DSpace). Primero, localiza un Handle de ítem válido. Luego, envía la siguiente solicitud a la interfaz XMLUI de DSpace: http://[URL-completa-a-XMLUI]/metadata/handle/[item-handle]/ore.xml

Para ver ejemplos de cómo configurar la recolección mediante la interfaz de usuario, consulta la documentación sobre la configuración de "Content Source" en la sección "Editar Colección"

Configuración del Recolector OAI-PMH / OAI-ORE

Existen muchas opciones de configuración posibles para el recolector OAI. La mayoría de ellas se encuentran en el archivo [dspace]/config/modules/oai.cfg (a menos que se indique lo contrario más abajo). Estas opciones pueden ser modificadas directamente en ese archivo o sobrescritas en tu archivo local.cfg (consulta la sección Referencia de Configuración).

...

Configuration File:

...

[dspace]/config/modules/oai.cfg

...

Property:

...

oai.harvester.eperson

...

Example Value:

...

oai.harvester.eperson = admin@myu.edu

...

Informational Note:

...

The EPerson under whose authorization automatic harvesting will be performed. This field does not have a default value and must be specified in order to use the harvest scheduling system. This will most likely be the DSpace admin account created during installation.

...

Property:

...

oai.url

...

Example Value:

...

oai.url = ${dspace.server.url}/${oai.path}

...

Informational Note:

...

The base url of the OAI-PMH disseminator webapp (i.e. do not include the /request on the end). This is necessary in order to mint URIs for ORE Resource Maps. The default value of ${dspace.baseUrl}/oai will work for a typical installation, but should be changed if appropriate. Please note that dspace.baseUrl is defined in your dspace.cfg configuration file.

...

Property:

...

oai.ore.authoritative.source

...

Example Value:

...

oai.ore.authoritative.source = oai

...

Informational Note:

The webapp responsible for minting the URIs for ORE Resource Maps. If using oai, the oai.url config value must be set.

...

Property:

...

oai.harvester.autoStart

...

Example Value:

...

oai.harvester.autoStart = false

...

Informational Note:

...

Determines whether the harvest scheduler process starts up automatically when DSpace webapp is redeployed.

...

Property:

...

oai.harvester.metadataformats.PluginName

...

Example Value:

Code Block
oai.harvester.metadataformats.PluginName = \
http://www.openarchives.org/OAI/2.0/oai_dc/, Simple Dublin Core

...

Informational Note:

...

This field can be repeated and serves as a link between the metadata formats supported by the local repository and those supported by the remote OAI-PMH provider. It follows the form oai.harvester.metadataformats.PluginName = NamespaceURI,Optional Display Name . The pluginName designates the metadata schemas that the harvester "knows" the local DSpace repository can support. Consequently, the PluginName must correspond to a previously declared ingestion crosswalk. The namespace value is used during negotiation with the remote OAI-PMH provider, matching it against a list returned by the ListMetadataFormats request, and resolving it to whatever metadataPrefix the remote provider has assigned to that namespace. Finally, the optional display name is the string that will be displayed to the user when setting up a collection for harvesting. If omitted, the PluginName:NamespaceURI combo will be displayed instead.

...

Property:

...

oai.harvester.oreSerializationFormat.OREPrefix

...

Example Value:

Code Block
oai.harvester.oreSerializationFormat.OREPrefix = \
http://www.w3.org/2005/Atom

...

Informational Note:

...

This field works in much the same way as oai.harvester.metadataformats.PluginName . The OREPrefix must correspond to a declared ingestion crosswalk, while the Namespace must be supported by the target OAI-PMH provider when harvesting content.

...

Property:

...

oai.harvester.timePadding

...

Example Value:

...

oai.harvester.timePadding = 120

...

Informational Note:

...

Amount of time subtracted from the from argument of the PMH request to account for the time taken to negotiate a connection. Measured in seconds. Default value is 120.

...

Property:

...

oai.harvester.harvestFrequency

...

Example Value:

...

oai.harvester.harvestFrequency = 720

...

Informational Note:

...

How frequently the harvest scheduler checks the remote provider for updates. Should always be longer than timePadding . Measured in minutes. Default value is 720.

...

Property:

...

oai.harvester.minHeartbeat

...

Example Value:

...

oai.harvester.minHeartbeat = 30

...

Informational Note:

...

The heartbeat is the frequency at which the harvest scheduler queries the local database to determine if any collections are due for a harvest cycle (based on the harvestFrequency) value. The scheduler is optimized to then sleep until the next collection is actually ready to be harvested. The minHeartbeat and maxHeartbeat are the lower and upper bounds on this timeframe. Measured in seconds. Default value is 30.

...

Property:

...

oai.harvester.maxHeartbeat

...

Example Value:

...

oai.harvester.maxHeartbeat = 3600

...

Informational Note:

...

The heartbeat is the frequency at which the harvest scheduler queries the local database to determine if any collections are due for a harvest cycle (based on the harvestFrequency) value. The scheduler is optimized to then sleep until the next collection is actually ready to be harvested. The minHeartbeat and maxHeartbeat are the lower and upper bounds on this timeframe. Measured in seconds. Default value is 3600 (1 hour).

...

Property:

...

oai.harvester.maxThreads

...

Example Value:

...

oai.harvester.maxThreads = 3

...

Informational Note:

...

How many harvest process threads the scheduler can spool up at once. Default value is 3.

...

Property:

...

oai.harvester.threadTimeout

...

Example Value:

...

oai.harvester.threadTimeout = 24

...

Informational Note:

...

How much time passes before a harvest thread is terminated. The termination process waits for the current item to complete ingest and saves progress made up to that point. Measured in hours. Default value is 24.

...

Property:

...

oai.harvester.unknownField

...

Example Value:

...

oai.harvester.unkownField = fail | add | ignore

...

Informational Note:

...

You have three (3) choices. When a harvest process completes for a single item and it has been passed through ingestion crosswalks for ORE and its chosen descriptive metadata format, it might end up with DIM values that have not been defined in the local repository. This setting determines what should be done in the case where those DIM values belong to an already declared schema. Fail will terminate the harvesting task and generate an error. Ignore will quietly omit the unknown fields. Add will add the missing field to the local repository's metadata registry. Default value: fail.

...

Property:

...

oai.harvester.unknownSchema

...

Example Value:

...

oai.harvester.unknownSchema = fail | add | ignore

...

Informational Note:

...

When a harvest process completes for a single item and it has been passed through ingestion crosswalks for ORE and its chosen descriptive metadata format, it might end up with DIM values that have not been defined in the local repository. This setting determines what should be done in the case where those DIM values belong to an unknown schema. Fail will terminate the harvesting task and generate an error. Ignore will quietly omit the unknown fields. Add will add the missing schema to the local repository's metadata registry, using the schema name as the prefix and "unknown" as the namespace. Default value: fail.

...

Property:

...

oai.harvester.acceptedHandleServer

...

Example Value:

Code Block
oai.harvester.acceptedHandleServer = \
hdl.handle.net, handle.test.edu

...

Informational Note:

...

A harvest process will attempt to scan the metadata of the incoming items (identifier.uri field, to be exact) to see if it looks like a handle. If so, it matches the pattern against the values of this parameter. If there is a match the new item is assigned the handle from the metadata value instead of minting a new one. Default value: hdl.handle.net .

...

Property:

...

oai.harvester.rejectedHandlePrefix

...

Example Value:

...

oai.harvester.rejectedHandlePrefix = 123456789, myeduHandle

...

Informational Note:

...

Pattern to reject as an invalid handle prefix (known test string, for example) when attempting to find the handle of harvested items. If there is a match with this config parameter, a new handle will be minted instead. Default value: 123456789 .

Configuración de una recolección para importar contenido en una colección

Existen dos opciones para configurar una colección para la recolección de contenido. Una es utilizando los scripts de DSpace llamados "harvest", y la otra es configurando la fuente de contenido (content source) de una colección a través de la interfaz de usuario.

Uso del script "harvest"

El script harvest puede ejecutarse tanto desde la línea de comandos (CLI) como desde la API REST mediante la llamada a "harvest". Utiliza los parámetros definidos en la siguiente tabla.

...

Ejemplos de recolección de una colección mediante comandos CLI

1. Verifica si se puede acceder a la fuente del recolector

  dspace/bin/dspace -g -a https://harvest.source.org -i harvest-set

Reemplaza https://harvest.source.org con la fuente que deseas utilizar, el harvest-set con el conjunto o los conjuntos que deseas recolectar o all en caso de que quieras recolectar todos los conjuntos.

2. Configurar una colección para recolección

  dspace/bin/dspace harvest -s -c 123456789/123 
  -e harvest-user@dspace.org -a https://harvest.source.org -i harvest-set -m dc -t 1

Reemplaza el 123456789/123 con tu colección, el harvest-user@dspace.org con un usuario existente en DSpace que tenga los permisos necesarios para realizar la ingestión, https://harvest.source.org con la fuente que deseas utilizar, el harvest-set con el conjunto o conjuntos que deseas recolectar o all en caso de que quieras recolectar todos los conjuntos. El -m parámetro indica el formato de metadatos que se utilizará y el -t parámetro indica el tipo de recolección a emplear. Cuando se utiliza el valor 0 para -t , la recolección se desactiva.

3. Ejecuta la recolección para la colección configurada

  dspace/bin/dspace harvest -r -c 123456789/123 -e harvest-user@dspace.org 

Reemplaza el 123456789/123 con el identificador de tu colección, y el harvest-user@dspace.org con un usuario existente en DSpace que tenga los permisos necesarios para realizar la ingestión.

Configuración de una fuente de contenido para recolección desde la interfaz de usuario (UI)

Una colección puede configurarse para recuperar su contenido desde una fuente externa. Esto puede hacerse desde la interfaz de "Editar colección" siguiendo los siguientes pasos.

1. Configura la colección para recolectar su contenido desde una fuente externa

Ve a la pestaña "Editar colección" > "Fuente de contenido". Marca la casilla "Esta colección recolecta su contenido desde una fuente externa".

Image Removed

2. Configura la fuente de recolección

Una vez marcada la casilla, se puede configurar el proveedor OAI, el identificador del set y el formato de metadatos. Un ejemplo de esta configuración se muestra en la imagen a continuación.

Image Removed

Cuando se necesite recolectar todos los sets, el campo puede dejarse vacío.

La configuración del servidor será verificada al hacer clic en el botón "Guardar".

3. Iniciar la recolección

Haz clic en el botón "Importar ahora" para iniciar la importación. Una vez iniciada, el botón indicará que la importación está en progreso; sin embargo, no es necesario permanecer en esta página, ya que la recolección continuará ejecutándose después de salir de ella.

Image Removed

Si más adelante necesitas volver a probar la configuración actual del servidor, puedes usar el botón "Probar configuración". Para restablecer completamente la colección eliminando todos los ítems y comenzar una nueva importación, haz clic en el botón "Restablecer e importar nuevamente".

Demostración de DSpace 7 - OAI-PMH

Today 14-10-2025 you use ruffle!
Today 14-10-2025 you use ruffle!
Today 14-10-2025 you use ruffle!
Today 15-10-2025 you use ruffle!