Download the PHP package silverstripe-terraformers/open-archive-initiative-repository without Composer

On this page you can find all versions of the php package silverstripe-terraformers/open-archive-initiative-repository. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package open-archive-initiative-repository

Open Archive Initiative > Repository

Requirements

Installation

Goal

The goal of this module is to provide you with an easy entry point to start serving content from your website as an Open Archive Initial Repostory.

This module does not include anything to help with becoming an Open Archive Initiative Harvester.

We are still new to the OAI spec, so we will be doing our absolute best to get everything right. Test coverage for what has been built is very high, but that doesn't help if we've just gotten something incorrect in the spec, so please be prepared to contribute your thoughts and/or code to help improve this module.

Supported Metadata formats

We are currently only building support for oai_dc, however, we will be doing our best to build this in a way that will allow you to easily supplement this module with additional Metadata format support.

Supported Verbs

Identify

Repository name: The default is simply using the Site Title that you have set in the CMS Admin email: Set using the environment variable OAI_API_ADMIN_EMAIL

Please check out OaiController::Identify(). There are many options there for how you can configure different values for this verb.

List Metadata Formats

The response for this endpoint is generated based on the config you specify for OaiController::$supported_formats.

List Records

This endpoint requires that the request includes a metadataPrefix parameter value that matches one of the configs that you have specified for OaiController::$supported_formats.

The output of this endpoint is based on your current OAI Records

Filter support:

List Identifiers

Same support as List Records. The only difference is that List Identifiers only provides headers for each OAI Record.

List Sets (TBA)

TBA

Get Record

Requires harvesters to provide a metadataPrefix and identifier.

OAI Records

All data provided through the API is driven by OaiRecords.

Each OaiRecord is associated to one of your DataObjects, however, it indexes all of the content that it cares about so that fetching data for the API does not require you to fetch associated DataObjects.

When/where to OaiRecords get updated with data? See OAI Record Managers.

Configuration

OAI Record Managers

There are two "Record Manager" Extensions that you can apply to appropriate DataObjects. The purpose of these Managers is to control when we trigger updates on OAI Records for our DataObjects.

Using the incorrect Manager for your DataObject might result in OAI Records updating at unexpected times.

All updates for OaiRecords are performed through Queued Jobs. Please see the docblock above OaiRecordManager::triggerOaiRecordUpdate() for the rationale behind using Queued Jobs.

OAI fields

This modules makes no assumptions about how you wish to populate OAI Record data. As such, you need to specify how your DataObjects are going to map to the expected OAI fields.

You can have a look in OaiRecord for a list of MANAGED_FIELDS. All of which support you adding CSV values for when you need to have multiple of one field.

A note on CSV parsing: If you're anticipating that some of your properties could contain commas, then you might instead need to map to a method that appropriately wraps your property value in quotes. See OaiRecord for the supported enclosure.

When configuring your field mappings, the array key should map to the Oai field, and the value can map to a property or method in your class. We use relField() to fetch from your class, so you can use any mapping that this framework method supports.

Configure oai_fields in your class:

Configure oai_fields in yaml:

Routing

Routing for the api is:

If you need to change this route, then you can do so by overriding the routing configuration.

Populating your initial set of OAI Records

Because the module can't know what DataObjects you wish to apply the OaiRecordManager to, we have opted not to add any dev task to populate initial OaiRecords. However, below is an example build task that you might adapt/own/use.

In this example we have applied the OaiRecordManager to Page and File.

License

See License

Maintainers

Development and contribution

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.


All versions of open-archive-initiative-repository with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
silverstripe/framework Version ^5
symbiote/silverstripe-queuedjobs Version ^5.0
silverstripe/siteconfig Version ^5.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package silverstripe-terraformers/open-archive-initiative-repository contains the following files

Loading the files please wait ....