se.kb.oai.pmh
Class ListBase<T>
java.lang.Object
se.kb.oai.pmh.ResponseBase
se.kb.oai.pmh.ListBase<T>
- Direct Known Subclasses:
- IdentifiersList, MetadataFormatsList, RecordsList, SetsList
public abstract class ListBase<T>
- extends ResponseBase
Abstract base class that holds common functionality for the responses that
return lists. Can be used to get the size of the list and the actual list
of objects. For responses that don't return all of their results in one response,
the ResumptionToken
to get the next set of data can also be
retrieved.
- Author:
- Oskar Grenholm, National Library of Sweden
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
list
protected List<T> list
ListBase
public ListBase(Document document)
throws ErrorResponseException
- Constructor.
- Parameters:
document
- the response
- Throws:
ErrorResponseException
size
public int size()
- Get the size of the list.
- Returns:
- the size
asList
public List<T> asList()
- Get the content of the response as a list with objects of type
T
.
- Returns:
- the list
getResumptionToken
public ResumptionToken getResumptionToken()
- Get the
ResumptionToken
, if any, for this response.
- Returns:
- the
ResumptionToken
, or null
if none available
Copyright © 2008. All Rights Reserved.