public class ResumptionToken
extends java.util.TreeMap<java.lang.String,java.lang.String>
Modifier and Type | Class and Description |
---|---|
private class |
ResumptionToken.Parser |
Modifier and Type | Field and Description |
---|---|
private static java.text.Collator |
insensitiveCollator |
private int |
recordCounter |
private static long |
serialVersionUID |
private DigestURL |
source |
private static java.lang.ThreadLocal<javax.xml.parsers.SAXParser> |
tlSax |
Constructor and Description |
---|
ResumptionToken(DigestURL source,
byte[] b) |
Modifier and Type | Method and Description |
---|---|
private java.lang.StringBuilder |
escape(java.lang.String s) |
int |
getCompleteListSize()
The completeListSize attribute provides a place where the estimated number of results
in the complete list response may be announced.
|
int |
getCursor()
The cursor attribute is the number of results returned so far in the complete list response,
thus it is always "0" in the first incomplete list response.
|
java.util.Date |
getExpirationDate()
an expiration date of a resumption token that addresses how long a cached set will
stay in the cache of the oai-pmh server.
|
private static javax.xml.parsers.SAXParser |
getParser() |
int |
getRecordCounter()
while parsing the resumption token, also all records are counted
|
java.lang.String |
getToken()
get a token of the stateless transfer in case that no expiration date is given
see:
http://www.openarchives.org/OAI/2.0/guidelines-repository.htm#StateInResumptionToken
|
DigestURL |
resumptionURL()
compute a url that can be used to resume the retrieval from the OAI-PMH resource
|
java.lang.String |
toString() |
static java.lang.String |
truncatedURL(DigestURL url)
truncate the given url at the '?'
|
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, size, subMap, subMap, tailMap, tailMap, values
private static final long serialVersionUID
private static final java.text.Collator insensitiveCollator
private int recordCounter
private final DigestURL source
private static final java.lang.ThreadLocal<javax.xml.parsers.SAXParser> tlSax
public ResumptionToken(DigestURL source, byte[] b) throws java.io.IOException
java.io.IOException
public static java.lang.String truncatedURL(DigestURL url)
url
- public int getRecordCounter()
public DigestURL resumptionURL() throws java.io.IOException
givenURL
- java.io.IOException
- in case that no follow-up url can be generated; i.e. if the expiration date is exceededprivate java.lang.StringBuilder escape(java.lang.String s)
public java.util.Date getExpirationDate()
public int getCompleteListSize()
public int getCursor()
public java.lang.String getToken()
public java.lang.String toString()
toString
in class java.util.AbstractMap<java.lang.String,java.lang.String>
private static javax.xml.parsers.SAXParser getParser() throws org.xml.sax.SAXException
org.xml.sax.SAXException