Class OaiPmhRepository
java.lang.Object
org.opencastproject.oaipmh.server.OaiPmhRepository
- All Implemented Interfaces:
org.osgi.service.cm.ManagedService
- Direct Known Subclasses:
DefaultRepository
An OAI-PMH protocol compliant repository.
Currently supported:
Currently not supported:
- deletions
- sets
- <about> containers in records, see section 2.5. Record
- resumption tokens do not report about their expiration date; see section 3.5. Flow Control
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddItem(MediaPackage mp) Add an item to the repository.Return the current date.abstract StringgetMetadataProvider(String metadataPrefix) Return the metadata provider for a given metadata prefix.final List<MetadataProvider> Return a list of all available metadata providers.abstract OaiPmhDatabaseabstract StringRepository ID.abstract List<MetadataProvider> Return a list of available metadata providers.abstract StringDisplay name of the OAI-PMH repository.abstract Granularityabstract intMaximum number of items returned by the list queries ListIdentifiers, ListRecords and ListSets.abstract Option<ResumableQuery> getSavedQuery(String resumptionToken) Get a saved query.static Dategranulate(Granularity g, Date d) "Cut" a date to the repositories supported granularity.abstract StringsaveQuery(ResumableQuery query) Save a query.selectVerb(Params p) Create an OAI-PMH response based on the given request params.voidupdated(Dictionary<String, ?> properties) Parse service configuration file.
-
Constructor Details
-
OaiPmhRepository
public OaiPmhRepository()
-
-
Method Details
-
getRepositoryTimeGranularity
-
getRepositoryName
Display name of the OAI-PMH repository. -
getRepositoryId
Repository ID. -
getPersistence
-
getAdminEmail
-
updated
public void updated(Dictionary<String, ?> properties) throws org.osgi.service.cm.ConfigurationExceptionParse service configuration file.- Specified by:
updatedin interfaceorg.osgi.service.cm.ManagedService- Parameters:
properties- Service configuration as dictionary- Throws:
org.osgi.service.cm.ConfigurationException- If there is a problem within get configuration
-
saveQuery
Save a query.- Returns:
- a resumption token
-
getSavedQuery
Get a saved query. -
getResultLimit
public abstract int getResultLimit()Maximum number of items returned by the list queries ListIdentifiers, ListRecords and ListSets. -
getRepositoryMetadataProviders
Return a list of available metadata providers. Please do not expose the default provider for the mandatory oai_dc format since this is automatically added when callinggetMetadataProviders().- See Also:
-
currentDate
Return the current date. Used in implementation instead of new Date(); to facilitate unit testing. -
getMetadataProviders
Return a list of all available metadata providers. Theoai_dcformat is always included. -
addItem
Add an item to the repository. -
selectVerb
Create an OAI-PMH response based on the given request params. -
getMetadataProvider
Return the metadata provider for a given metadata prefix. -
granulate
"Cut" a date to the repositories supported granularity. Cutting behaves similar to the mathematical floor function.
-