org.fcrepo.server.oai
Class FedoraOAIProviderModule

java.lang.Object
  extended by org.fcrepo.server.Parameterized
      extended by org.fcrepo.server.Pluggable
          extended by org.fcrepo.server.Module
              extended by org.fcrepo.server.oai.FedoraOAIProviderModule
All Implemented Interfaces:
Constants, OAIProvider

public class FedoraOAIProviderModule
extends Module
implements OAIProvider

An OAIProvider that acts as a server module and wraps FedoraOAIProvider.

Author:
Chris Wilper

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.fcrepo.common.Constants
Constants.FedoraHome
 
Field Summary
 
Fields inherited from interface org.fcrepo.common.Constants
ACCESS, ACTION, API, ATOM_APIM1_0, ATOM_ZIP1_1, ATOM1_1, AUDIT, AUDIT1_0, BATCH_MODIFY, BATCH_MODIFY1_1, BE_SECURITY, BE_SECURITY1_0, BINDING_SPEC, DATASTREAM, DC, DISSEMINATOR, DS_COMPOSITE_MODEL, DS_COMPOSITE_MODEL1_0, DS_INPUT_SPEC1_0, DS_INPUT_SPEC1_1, ENVIRONMENT, FCFG, FEDORA, FEDORA_APP_CONTEXT_NAME, FEDORA_DEFAULT_APP_CONTEXT, FEDORA_HOME, FEDORA_REPOSITORY_PID, FOXML, FOXML1_0, FOXML1_0_LEGACY, FOXML1_1, HTTP_REQUEST, MANAGEMENT, METHOD_MAP, METS, METS_EXT, METS_EXT1_0, METS_EXT1_0_LEGACY, METS_EXT1_1, MODEL, MULGARA, OAI_DC, OAI_DC2_0, OAI_FRIENDS, OAI_FRIENDS2_0, OAI_IDENTIFIER, OAI_IDENTIFIER2_0, OAI_PMH, OAI_PMH2_0, OAI_PROV, OAI_PROV2_0, OBJ_DATASTREAMS1_0, OBJ_HISTORY1_0, OBJ_ITEMS1_0, OBJ_METHODS1_0, OBJ_PROFILE1_0, OBJ_VALIDATION1_0, OBJECT, OLD_XLINK, PID_LIST1_0, RDF, RDF_XSD, RECOVERY, RELS_EXT, RELS_EXT1_0, RELS_INT1_0, REPO_DESC1_0, RESOURCE, SDEF, SDEF_METHOD_MAP1_0, SDEP, SDEP_METHOD_MAP1_0, SDEP_METHOD_MAP1_1, SERVICE_PROFILE, SOAP, SOAP_ENC, SUBJECT, TYPES, VIEW, WSDL, WSDL_HTTP, WSDL_MIME, XACML_POLICY, XACML_POLICY1_0, XACML1, XACML1_ACTION, XACML1_POLICY, XACML1_RESOURCE, XACML1_SUBJECT, XACML2_POLICY_SCHEMA, XLINK, XML_XSD, XMLNS, XSI
 
Constructor Summary
FedoraOAIProviderModule(Map params, Server server, String role)
           
 
Method Summary
 Set getAdminEmails()
          Get the email addresses of administrators of the repository.
 String getBaseURL(String protocol, String port)
          Get the HTTP endpoint for the OAI-PMH interface.
 DateGranularitySupport getDateGranularitySupport()
          Get the finest harvesting granularity supported by the repository.
 DeletedRecordSupport getDeletedRecordSupport()
          Get the manner in which the repository supports the notion of deleted records.
 Set getDescriptions()
          Get XML descriptions of the repository.
 Date getEarliestDatestamp()
          Get a Date (in UTC) that is the guaranteed lower limit of all datestamps recording changes, modifications, or deletions in the repository.
 List getHeaders(Date from, Date until, String metadataPrefix, String set)
          Just like getRecords, but returns Header objects.
 List getHeaders(String resumptionToken)
          Get the remaining portion of a set of Headers.
 long getMaxHeaders()
          Get the maximum number of headers that are returned at a time.
 long getMaxRecords()
          Get the maximum number of records that are returned at a time.
 long getMaxSets()
          Get the maximum number of sets that are returned at a time.
 Set getMetadataFormats(String id)
          Get the MetadataFormats supported across the repository or for an individual item in the repository.
 String getProtocolVersion()
          Get the version of the OAI-PMH supported by the repository.
 Record getRecord(String identifier, String metadataPrefix)
          Get an individual metadata record from the repository.
 List getRecords(Date from, Date until, String metadataPrefix, String set)
          Get the Records in the repository matching the given criteria.
 List getRecords(String resumptionToken)
          Get the remaining portion of a set of Records.
 String getRepositoryName()
          Get a human readable name for the repository.
 List getSets()
          Get the setSpecs, setNames, and setDescriptions of sets in the repository.
 List getSets(String resumptionToken)
          Get the remaining portion of a set of Sets.
 Set getSupportedCompressionEncodings()
          Get the compression encodings supported by the repository.
 void postInitModule()
          Second stage of Module initialization.
 
Methods inherited from class org.fcrepo.server.Module
getRole, getServer, initModule, shutdownModule
 
Methods inherited from class org.fcrepo.server.Pluggable
getHelp, getOptionalParameters, getParameterHelp, getRequiredModuleRoles, getRequiredParameters
 
Methods inherited from class org.fcrepo.server.Parameterized
getParameter, getParameter, getParameter, getParameterList, getParameters, getParameters, parameterNames, setParameter, setParameters, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FedoraOAIProviderModule

public FedoraOAIProviderModule(Map params,
                               Server server,
                               String role)
                        throws ModuleInitializationException
Throws:
ModuleInitializationException
Method Detail

postInitModule

public void postInitModule()
                    throws ModuleInitializationException
Description copied from class: Module
Second stage of Module initialization. This is guaranteed to run after all Modules' initModule() methods have run.

Overrides:
postInitModule in class Module
Throws:
ModuleInitializationException - If initialization values are invalid or initialization fails for some other reason.

getRepositoryName

public String getRepositoryName()
Description copied from interface: OAIProvider
Get a human readable name for the repository.

Specified by:
getRepositoryName in interface OAIProvider
Returns:
the repository name.

getBaseURL

public String getBaseURL(String protocol,
                         String port)
Description copied from interface: OAIProvider
Get the HTTP endpoint for the OAI-PMH interface.

Specified by:
getBaseURL in interface OAIProvider
Returns:
the base URL.

getProtocolVersion

public String getProtocolVersion()
Description copied from interface: OAIProvider
Get the version of the OAI-PMH supported by the repository.

Specified by:
getProtocolVersion in interface OAIProvider
Returns:
the protocol version number.

getEarliestDatestamp

public Date getEarliestDatestamp()
Description copied from interface: OAIProvider
Get a Date (in UTC) that is the guaranteed lower limit of all datestamps recording changes, modifications, or deletions in the repository. A repository must not use datestamps lower than this.

Specified by:
getEarliestDatestamp in interface OAIProvider
Returns:
the earliest datetime stamp.

getDeletedRecordSupport

public DeletedRecordSupport getDeletedRecordSupport()
Description copied from interface: OAIProvider
Get the manner in which the repository supports the notion of deleted records.

Specified by:
getDeletedRecordSupport in interface OAIProvider
Returns:
manner in which repository supports the notion of deletion.

getDateGranularitySupport

public DateGranularitySupport getDateGranularitySupport()
Description copied from interface: OAIProvider
Get the finest harvesting granularity supported by the repository.

Specified by:
getDateGranularitySupport in interface OAIProvider
Returns:
the finest harvesting granularity supported by the repository.

getAdminEmails

public Set getAdminEmails()
Description copied from interface: OAIProvider
Get the email addresses of administrators of the repository. This set must contain at least one item.

Specified by:
getAdminEmails in interface OAIProvider
Returns:
the email addresses of administrators of the repository.

getSupportedCompressionEncodings

public Set getSupportedCompressionEncodings()
Description copied from interface: OAIProvider
Get the compression encodings supported by the repository. This set may be empty. Recommended values are those in RFC 2616 Section 14.11

Specified by:
getSupportedCompressionEncodings in interface OAIProvider
Returns:
the compression encodings supported by the repository.

getDescriptions

public Set getDescriptions()
Description copied from interface: OAIProvider
Get XML descriptions of the repository. Each Set element must be a String containing a description according to some W3C schema, where the xsi:schemaLocation attribute is used on the root element. See http://www.openarchives.org/OAI/2.0/guidelines.htm for guidelines regarding these repository-level descriptions.

Specified by:
getDescriptions in interface OAIProvider
Returns:
XML descriptions of the repository.

getRecord

public Record getRecord(String identifier,
                        String metadataPrefix)
                 throws CannotDisseminateFormatException,
                        IDDoesNotExistException,
                        RepositoryException
Description copied from interface: OAIProvider
Get an individual metadata record from the repository.

Specified by:
getRecord in interface OAIProvider
Parameters:
identifier - the record identifier.
metadataPrefix - the metadata prefix identifier.
Returns:
an individual metadata record from the repository.
Throws:
CannotDisseminateFormatException
IDDoesNotExistException
RepositoryException - if an error has occurred.

getRecords

public List getRecords(Date from,
                       Date until,
                       String metadataPrefix,
                       String set)
                throws CannotDisseminateFormatException,
                       NoRecordsMatchException,
                       NoSetHierarchyException,
                       RepositoryException
Description copied from interface: OAIProvider
Get the Records in the repository matching the given criteria. Any of the arguments (except metadataPrefix) may be null, indicating "any". If the size of the returned list is over getMaxRecords(), the last element is a resumptionToken (a String) which can be used to get the rest of the list.

Specified by:
getRecords in interface OAIProvider
Parameters:
from - the beginning date of the date range.
until - the ending date of the date range.
metadataPrefix - the metadata prefix.
set - the set of criteria
Returns:
the Records in the repository matching the given criteria.
Throws:
CannotDisseminateFormatException
NoRecordsMatchException
NoSetHierarchyException
RepositoryException - if an error has occurred.

getRecords

public List getRecords(String resumptionToken)
                throws CannotDisseminateFormatException,
                       NoRecordsMatchException,
                       NoSetHierarchyException,
                       BadResumptionTokenException,
                       RepositoryException
Description copied from interface: OAIProvider
Get the remaining portion of a set of Records. If the size of the returned list is over getMaxRecords(), the last element is another resumptionToken (a String) which can be used to get the rest of the list.

Specified by:
getRecords in interface OAIProvider
Parameters:
resumptionToken - a string that can be used to get the rest of the list.
Returns:
the remaining portion of a set of Records.
Throws:
CannotDisseminateFormatException
NoRecordsMatchException
NoSetHierarchyException
BadResumptionTokenException
RepositoryException - if an error has occurred.

getHeaders

public List getHeaders(Date from,
                       Date until,
                       String metadataPrefix,
                       String set)
                throws CannotDisseminateFormatException,
                       NoRecordsMatchException,
                       NoSetHierarchyException,
                       RepositoryException
Description copied from interface: OAIProvider
Just like getRecords, but returns Header objects. If the size of the returned list is over getMaxHeaders(), the last element is a resumptionToken (a String) which can be used to get the rest of the list.

Specified by:
getHeaders in interface OAIProvider
Parameters:
from - the beginning date range.
until - the end of the date range.
metadataPrefix - the metadata prefix.
set - the set of criteria.
Returns:
the remaining portion of a set of Header objects.
Throws:
CannotDisseminateFormatException
NoRecordsMatchException
NoSetHierarchyException
RepositoryException - if an error has occurred.

getHeaders

public List getHeaders(String resumptionToken)
                throws CannotDisseminateFormatException,
                       NoRecordsMatchException,
                       NoSetHierarchyException,
                       BadResumptionTokenException,
                       RepositoryException
Description copied from interface: OAIProvider
Get the remaining portion of a set of Headers. If the size of the returned list is over getMaxHeaders() the last element is another resumptionToken (a String) which can be used to get the rest of the list.

Specified by:
getHeaders in interface OAIProvider
Parameters:
resumptionToken - a string that can be used to get the rest of the list.
Returns:
the remaining portion of a set of Headers.
Throws:
CannotDisseminateFormatException
NoRecordsMatchException
NoSetHierarchyException
BadResumptionTokenException
RepositoryException - if an error has occurred.

getSets

public List getSets()
             throws NoSetHierarchyException,
                    RepositoryException
Description copied from interface: OAIProvider
Get the setSpecs, setNames, and setDescriptions of sets in the repository. Each set has a setSpec, a name, and zero or more descriptions, held by a SetInfo object. If the size of the returned list is over getMaxSets(), the last element is a resumptionToken (a String) which can be used to get the rest of the list.

Specified by:
getSets in interface OAIProvider
Returns:
the setSpecs, setNames, and setDescriptions of sets in the repository.
Throws:
NoSetHierarchyException
RepositoryException - if an error has occurred.

getSets

public List getSets(String resumptionToken)
             throws BadResumptionTokenException,
                    NoSetHierarchyException,
                    RepositoryException
Description copied from interface: OAIProvider
Get the remaining portion of a set of Sets. If the size of the returned list is over getMaxSets(), the last element is another resumptionToken (a String) which can be used to get the rest of the list.

Specified by:
getSets in interface OAIProvider
Parameters:
resumptionToken - a string that can be used to get the rest of the list.
Returns:
the remaining portion of a set of Sets.
Throws:
BadResumptionTokenException
NoSetHierarchyException
RepositoryException - if an error has occurred.

getMetadataFormats

public Set getMetadataFormats(String id)
                       throws NoMetadataFormatsException,
                              IDDoesNotExistException,
                              RepositoryException
Description copied from interface: OAIProvider
Get the MetadataFormats supported across the repository or for an individual item in the repository.

Specified by:
getMetadataFormats in interface OAIProvider
Parameters:
id - The item identifier, or null, meaning "the entire repository"
Returns:
the set of metadata formats supported by the repository.
Throws:
NoMetadataFormatsException
IDDoesNotExistException
RepositoryException - if an error has occurred.

getMaxSets

public long getMaxSets()
                throws RepositoryException
Description copied from interface: OAIProvider
Get the maximum number of sets that are returned at a time. A negative value signifies no maximum.

Specified by:
getMaxSets in interface OAIProvider
Returns:
the maximum number of sets that are returned at a time.
Throws:
RepositoryException - if an error has occurred.

getMaxRecords

public long getMaxRecords()
                   throws RepositoryException
Description copied from interface: OAIProvider
Get the maximum number of records that are returned at a time. A negative value signifies no maximum.

Specified by:
getMaxRecords in interface OAIProvider
Returns:
the maximum number of records that are returned at a time.
Throws:
RepositoryException - if an error has occurred.

getMaxHeaders

public long getMaxHeaders()
                   throws RepositoryException
Description copied from interface: OAIProvider
Get the maximum number of headers that are returned at a time. A negative value signifies no maximum.

Specified by:
getMaxHeaders in interface OAIProvider
Returns:
the maximum number of headers that are returned at a time.
Throws:
RepositoryException - if an error has occurred.


Copyright © 2012 DuraSpace. All Rights Reserved.