|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OAIDriver
An interface to a repository. Note that an OAIDriver *must* implement a public no-arg constructor, and will be initialized via a call to init(Properties).
Method Summary | |
---|---|
void |
close()
Release any resources held by the driver. |
java.util.Date |
getLatestDate()
Get the latest date that something changed in the remote repository. |
void |
init(java.util.Properties props)
Initialize from properties. |
RemoteIterator<? extends MetadataFormat> |
listMetadataFormats()
Get an iterator over a list of MetadataFormat objects representing all OAI metadata formats currently supported by the repository. |
RemoteIterator<? extends Record> |
listRecords(java.util.Date from,
java.util.Date until,
java.lang.String mdPrefix)
Get an iterator of Record objects representing all records
in the format indicated by mdPrefix, which have changed in the given date
range. |
RemoteIterator<? extends SetInfo> |
listSetInfo()
Get an iterator over a list of SetInfo objects representing all OAI sets currently supported by the repository. |
void |
write(java.io.PrintWriter out)
Write information about the repository to the given PrintWriter. |
void |
writeRecordXML(java.lang.String itemID,
java.lang.String mdPrefix,
java.lang.String sourceInfo,
java.io.PrintWriter writer)
Write the XML of the record whose source info is given. |
Method Detail |
---|
void init(java.util.Properties props) throws RepositoryException
props
- the implementation-specific initialization properties.
RepositoryException
- if required properties are missing/bad,
or initialization failed for any reason.void write(java.io.PrintWriter out) throws RepositoryException
This will be a well-formed XML chunk beginning with an
Identify
element, as described in
section
4.2 of the OAI-PMH 2.0 specification.
write
in interface Writable
RepositoryException
- if there is a problem reading from the repository.java.util.Date getLatestDate() throws RepositoryException
If this is greater than the previously-aquired latestDate, the formats, setInfos, and identity will be retrieved again, and it will be used as the "until" date for the next record query.
RepositoryException
RemoteIterator<? extends MetadataFormat> listMetadataFormats() throws RepositoryException
RepositoryException
MetadataFormat
RemoteIterator<? extends SetInfo> listSetInfo() throws RepositoryException
The content will be a well-formed XML chunk beginning with a
set
element, as described in
section
4.6 of the OAI-PMH 2.0 specification.
RepositoryException
SetInfo
RemoteIterator<? extends Record> listRecords(java.util.Date from, java.util.Date until, java.lang.String mdPrefix) throws RepositoryException
Record
objects representing all records
in the format indicated by mdPrefix, which have changed in the given date
range.
Regarding dates: If from is not null, the date is greater than (non-inclusive) Until must be specified, and it is less than or equal to (inclusive).
RepositoryException
Record
void writeRecordXML(java.lang.String itemID, java.lang.String mdPrefix, java.lang.String sourceInfo, java.io.PrintWriter writer) throws RepositoryException
record
element, as described in
section
4.1 of the OAI-PMH 2.0 specification.
RepositoryException
void close() throws RepositoryException
RepositoryException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |