For the complete documentation index, see llms.txt. This page is also available as Markdown.

OAI/PMH

The OAI/PMH endpoint allows accessing records in the OAI/PMH (XML) format

The Open Archives Initiative Protocol for Metadata Harvesting (OAI/PMH) was first developed in the late 1990's as a standard for harvesting metadata from distributed metadata/data repositories. The current version of the OAI/PMH standard is 2.0 as of June 2002, with minor updates in December 2008.

More information about the standard can be found here: http://www.openarchives.org/

Configuration

OAI/PMH is configured in the base configuration tab "Export and OAI/PMH". In order to use it, first enable it using the checkbox and then fill in the necessary fields.

Rights Management

The OAI endpoint is accessible without any authenticated Access Token, however it is protected by the rights management. Internally, the System User oai_pmh is used to apply the rights. When the endpoint is called, the rights this user has are deciding which records are available.

Make sure that the oai_pmh user has the necessary read rights on all masks and objects which should be exposed over the OAI endpoint. Since the OAI endpoint is read only, all rights that allow writing have no effect. The rights can be applied in pools or objecttypes, just like for any other user or group.

API

The OAI/PMH can be accessed under:

GET /api/v1/oai

The parameters are defined in the external documentation: Protocol Requests and Responses.

Identify

?verb=Identify

This returns information about the OAI/PMH endpoint.

Example:

fylr provides the information configured in the base configuration tab "OAI/PMH" to identify the repository.

If the endpoint is called without any verb, the fallback is Identify and this information is shown.

Repository

The repository consists of all user objects that can be seen by the system user "OAI/PMH". That means, that the rights management settings allow to control which objects are offered via OAI/PMH.

The objects are identified by their UUID. The identifier format depends on the settings in the base configuration:

  • If an optional namespace is specified, the identifier format is: oai:<namespace>:<uuid>

  • If no namespace is specified, the identifier format is: oai:<uuid>

To get a single or multiple records, use

or

Deleted Records

Records which are deleted are still reported with a stub of the original record: the <record> consists of its <header> only, marked with status="deleted".

Two reasons for status="deleted"

The record was deleted in fylr

The record has been deleted (but not purged) and is still stored in the database.

The <datestamp> is the time of the deletion.

The record matches the tag filter "Tag Filter: Record deleted"

In the base configuration tab "Export and OAI/PMH", a tag filter can be configured which marks all matching records as deleted for OAI/PMH only. The record itself is untouched and is delivered normally by every other part of the API, only the OAI/PMH endpoint shows it as being deleted.

The <datestamp> is the creation date of the record's current version, because fylr does not record when the tags of a record were changed.

This is the recommended way to withdraw a record from harvesters without deleting it, and it can be reverted: as soon as the tag filter no longer matches, the record is shown with its metadata again.

Verbs

ListIdentifiers and ListRecords include deleted records in their result, also when a set is requested. GetRecord answers with the stub header for a deleted record.

Purged records are removed from the database completely. They cannot be harvested any more: GetRecord answers with the OAI error idDoesNotExist and they vanish from the lists without leaving a stub.

Deleted Record Policy

fylr announces the delete policy transient, which means that a record which once was part of the feed is not guaranteed to appear as deleted once it is gone. Apart from purging, a record can silently disappear because the system user oai_pmh lost the right to read it, or because it was moved out of the pool or collection a harvested set is based on.

Datestamps and incremental harvesting

The from and until arguments are matched against the last modification date of a record, which is the creation date of its current version. Deleting a record or changing tags does not create a new version. A record which has just become deleted therefore keeps the last modification date it had before, while the <datestamp> in its header shows the time of the deletion.

Metadata Formats

fylr disseminates all available formats to all objects. To get all available metadata formats, use

Default XML Format

The default metadata format of fylr is the easydb export format. This format is basically an XML representation of the object in the given mask and it is very similar to the JSON representation that is normally used by the API.

From version 6.35.0, the easydb format can be taken off the interface with the checkbox "Offer metadataPrefix "easydb"" in the base configuration tab "Export and OAI/PMH" (on by default), e.g. to offer only oai_dc and the XSLT formats. Switched off, ListMetadataFormats no longer lists it and a request with metadataPrefix=easydb answers cannotDisseminateFormat.

Dublin Core

As per OAI/PMH standard, Dublin Core is always offered as the Metadata format oai_dc. It is possible to define mapping profiles for Dublin Core under "Profile" > "Dublin Core". These mapping profiles work like any other metadata mapping profile, so they can be configured per objecttype and pool.

The OAI/PMH will use the configured profile to generate the Dublin Core representation for the object. If no profile is configured, a minimal representation is returned.

XSLT Formats

Besides those two formats, more formats can be defined using the base configuration, tab "Export and OAI/PMH", table "XSLT formats".

There is a column "Name (OAI/PMH prefix, name in Deep-Links with /api/objects)" that is used to identify the XSLT file. The prefix must be conform to the standard and unique. Notice that oai_dc and easydb are already used. This prefix is used to format the metadata prefix: xslt-<prefix>.

To enable the XSLT file to be used as a Metadata Format for OAI/PMH, enable the Checkbox "Use for OAI/PMH". Make sure that you use XSLT files that output valid XML when activating them for OAI/PMH. Optionally, you can specify a namespace and a schema for the Metadata Format.

Since the OAI/PMH endpoint merges multiple XML, it is important that the XML which is generated by the XSLT does not include the XML declaration <?xml version="..."?> in the first line.

To avoid this, define the output format of the XSLT as

Sets

To get a list of all available sets, use

From version 6.35.0, ListSets lists a set only when at least one record can be harvested from it by the user "OAI/PMH"; before, every combination of pool managed objecttype and pool was listed, most of them empty, and every collection and tag set as well. When no set has a record, ListSets answers noSetHierarchy. Which sets are published is therefore controlled by the rights of the user "OAI/PMH", like the records themselves.

To harvest a set, pass its setSpec as the set parameter, spelled exactly as ListSets lists it. From version 6.35.0, a set that is unknown, malformed or spelled differently (for example a pool without its whole path) answers badArgument.

fylr supports the following types of sets:

Objecttypes

All objecttypes.

Example for all objects of objecttype sample_object:

Pools

All pools that the user "OAI/PMH" can see (bag_read right). The setSpec carries the whole path of the pool, starting with the root pool, and the set harvests the records of the pool and all its subpools. Harvesting a pool set works from version 6.35.0.

Example for all objects in the Standard Pool:

Collections

All collections that the user "OAI/PMH" can see (bag_read right).

Example for the collection with the id 3:

Combination of pools and objecttypes

All combinations of pool managed objecttypes and pools that the user "OAI/PMH" can see (bag_read right)

Example for all objects of objecttype sample_object in the Standard Pool:

Tagfilters

All names of tagfilters that have been configured in the base configuration. All sets based on tagfilters have the prefix tagset:

Example for all objects that are found by the Tagfilter sample_tagfilter:

Last updated