What is XOAI?
XOAI is the most powerful and flexible OAI-PMH Java Toolkit (initially developed by Lyncode, updated by DSpace). XOAI contains common Java classes allowing to easily implement OAI-PMH data and service providers.
Compliance with the OAI-PMH standard is checked using an included Technology Compatibility Kit, relying on https://github.com/zimeon/oaipmh-validator. Compliance checks are operated on every pull request and push to main branch.
Moving (again): as XOAI is no longer actively maintained by DSpace since 2019, this fork by the Global Dataverse Community Consortium provides an updated version for the needs of and usage with the open source repository Dataverse Software.
This library is available from Maven Central, simply rely on them in your builds:
When building a data provider, you'll add xoai-data-provider:
<dependency>
<groupId>io.gdcc</groupId>
<artifactId>xoai-data-provider</artifactId>
<version>${xoai.version}</version>
</dependency>
When building a service provider, you'll add xoai-service-provider:
<dependency>
<groupId>io.gdcc</groupId>
<artifactId>xoai-service-provider</artifactId>
<version>${xoai.version}</version>
</dependency>
Some minimal usage documentation has been scraped from the DSpace Wiki, mostly explaining the concepts of this library, and put into docs/README.md. It also contains some minimal explanation of this forks special changes. Feel free to extend the documentation, pull requests welcome.
This project uses Spotless Maven Plugin, google-format-java and pre-commit to ensure a standardized and well-formatted codebase.
After cloning the repo, please make sure to install pre-commit
, which will take care of everything for you:
pip install pre-commit
pre-commit install
If you want to run spotless directly, use Maven:
mvn spotless:apply
# - or to just check for consistency use -
mvn spotless:check
CopyElement
to copy and paste metadata (#188)This is a breaking changes release with a lot of new features, influenced by the usage of XOAI within Dataverse and other places.
ItemRepository
, Item
and ItemIdentifier
implementationsSetRepository
implementationDataProvider
(much simplified!)OAIClient
, as default implementation changedCopyElement
or Metadata.copyFromStream()
to skip metadata XML processing, so pregenerated or cached
data can be served from your ItemRepository
implementationResultsPage
until
timestamps are tweaked to enable more inclusive requests (avoid spilling milk with database timestamps etc)RawRequest
and Request
classes to create non-servlet based endpoints with in-tree
verification methods now possible via RequestBuilder
!SetRepositoryHelper
to identify available setsfrom
and until
timestamps are now correctly verified in data provider, see #25
from
is not after earliestDate
. Default is to allow
such requests, as spec is non-prohibitive. Former implementation behaviour was to deny such requests!See LICENSE or DSpace BSD License