org.fcrepo.oai
Interface OAIProvider

All Known Implementing Classes:
FedoraOAIProvider, FedoraOAIProviderModule, SampleOAIProvider

public interface OAIProvider

Author:
Chris Wilper

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.
 

Method Detail

getRepositoryName

String getRepositoryName()
                         throws RepositoryException
Get a human readable name for the repository.

Returns:
the repository name.
Throws:
RepositoryException - if an error has occurred.

getBaseURL

String getBaseURL(String protocol,
                  String port)
                  throws RepositoryException
Get the HTTP endpoint for the OAI-PMH interface.

Returns:
the base URL.
Throws:
RepositoryException - if an error has occurred.

getProtocolVersion

String getProtocolVersion()
                          throws RepositoryException
Get the version of the OAI-PMH supported by the repository.

Returns:
the protocol version number.
Throws:
RepositoryException - if an error has occurred.

getEarliestDatestamp

Date getEarliestDatestamp()
                          throws RepositoryException
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.

Returns:
the earliest datetime stamp.
Throws:
RepositoryException - if an error has occurred.

getDeletedRecordSupport

DeletedRecordSupport getDeletedRecordSupport()
                                             throws RepositoryException
Get the manner in which the repository supports the notion of deleted records.

Returns:
manner in which repository supports the notion of deletion.
Throws:
RepositoryException - if an error has occurred.

getDateGranularitySupport

DateGranularitySupport getDateGranularitySupport()
                                                 throws RepositoryException
Get the finest harvesting granularity supported by the repository.

Returns:
the finest harvesting granularity supported by the repository.
Throws:
RepositoryException - if an error has occurred.

getAdminEmails

Set getAdminEmails()
                   throws RepositoryException
Get the email addresses of administrators of the repository. This set must contain at least one item.

Returns:
the email addresses of administrators of the repository.
Throws:
RepositoryException - if an error has occurred.

getSupportedCompressionEncodings

Set getSupportedCompressionEncodings()
                                     throws RepositoryException
Get the compression encodings supported by the repository. This set may be empty. Recommended values are those in RFC 2616 Section 14.11

Returns:
the compression encodings supported by the repository.
Throws:
RepositoryException - if an error has occurred.

getDescriptions

Set getDescriptions()
                    throws RepositoryException
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.

Returns:
XML descriptions of the repository.
Throws:
RepositoryException - if an error has occurred.

getRecord

Record getRecord(String identifier,
                 String metadataPrefix)
                 throws CannotDisseminateFormatException,
                        IDDoesNotExistException,
                        RepositoryException
Get an individual metadata record from the repository.

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

List getRecords(Date from,
                Date until,
                String metadataPrefix,
                String set)
                throws CannotDisseminateFormatException,
                       NoRecordsMatchException,
                       NoSetHierarchyException,
                       RepositoryException
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.

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

List getRecords(String resumptionToken)
                throws CannotDisseminateFormatException,
                       NoRecordsMatchException,
                       NoSetHierarchyException,
                       BadResumptionTokenException,
                       RepositoryException
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.

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

List getHeaders(Date from,
                Date until,
                String metadataPrefix,
                String set)
                throws CannotDisseminateFormatException,
                       NoRecordsMatchException,
                       NoSetHierarchyException,
                       RepositoryException
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.

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

List getHeaders(String resumptionToken)
                throws CannotDisseminateFormatException,
                       NoRecordsMatchException,
                       NoSetHierarchyException,
                       BadResumptionTokenException,
                       RepositoryException
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.

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

List getSets()
             throws NoSetHierarchyException,
                    RepositoryException
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.

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

getSets

List getSets(String resumptionToken)
             throws BadResumptionTokenException,
                    NoSetHierarchyException,
                    RepositoryException
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.

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

Set getMetadataFormats(String id)
                       throws IDDoesNotExistException,
                              NoMetadataFormatsException,
                              RepositoryException
Get the MetadataFormats supported across the repository or for an individual item in the repository.

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

getMaxSets

long getMaxSets()
                throws RepositoryException
Get the maximum number of sets that are returned at a time. A negative value signifies no maximum.

Returns:
the maximum number of sets that are returned at a time.
Throws:
RepositoryException - if an error has occurred.

getMaxRecords

long getMaxRecords()
                   throws RepositoryException
Get the maximum number of records that are returned at a time. A negative value signifies no maximum.

Returns:
the maximum number of records that are returned at a time.
Throws:
RepositoryException - if an error has occurred.

getMaxHeaders

long getMaxHeaders()
                   throws RepositoryException
Get the maximum number of headers that are returned at a time. A negative value signifies no maximum.

Returns:
the maximum number of headers that are returned at a time.
Throws:
RepositoryException - if an error has occurred.


Copyright © 2011 DuraSpace. All Rights Reserved.