public class OAIRequestImpl extends OAIObjectImpl implements OAIRequest
OAIObject.Node
Modifier and Type | Field and Description |
---|---|
protected org.apache.cocoon.environment.Request |
cocoonRequest
The request object from cocoon
|
protected java.lang.String |
from
Request param
|
protected java.lang.String |
granularity
Request param, default granularity is second
|
protected java.lang.String |
identifier
Request param
|
protected java.lang.String |
metadataPrefix
Request param
|
protected java.lang.String |
repoURL
The repository's url
|
protected java.lang.String |
requestURL
The full request url
|
protected java.lang.String |
resumptionToken
Request param
|
protected java.lang.String |
setIdentifier
Request param
|
protected java.lang.String |
until
Request param
|
protected boolean |
useLastHarvestDate
Request param
|
protected int |
verb
The
int verb action representation |
protected java.lang.String |
verbString
The
String verb action representation |
_context, logger
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
PARAM_NAME_GRANULARITY, PARAM_NAME_USE_OAI_LAST_HARVEST_DATE, URL_CHARACTER_AMPERSAND, URL_CHARACTER_EQUALS, URL_CHARACTER_QUESTION_MARK, URL_PARAM_NAME_FROM, URL_PARAM_NAME_IDENTIFIER, URL_PARAM_NAME_METADATA_PREFIX, URL_PARAM_NAME_RESUMPTION_TOKEN, URL_PARAM_NAME_SET, URL_PARAM_NAME_UNTIL, URL_PARAM_NAME_VERB, VERB_GET_RECORD, VERB_IDENTIFY, VERB_LIST_IDENTIFIERS, VERB_LIST_METADATA_FORMATS, VERB_LIST_RECORDS, VERB_LIST_SETS, VERB_STRING_GET_RECORD, VERB_STRING_IDENTIFY, VERB_STRING_LIST_IDENTIFIERS, VERB_STRING_LIST_METADATA_FORMATS, VERB_STRING_LIST_RECORDS, VERB_STRING_LIST_SETS, VERB_UNKNOWN
HTTP_HEADER_NAME_FROM, HTTP_HEADER_NAME_USER_AGENT, NUMBER_RECORDS_PER_RESPONSE, STRING_DATEFORMAT_GRANULARITY_DAY, STRING_DATEFORMAT_GRANULARITY_SECOND
Constructor and Description |
---|
OAIRequestImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFrom()
Retrieves the request param
|
java.lang.String |
getGranularity()
Gets the parameter of the request
|
java.lang.String |
getIdentifier()
Retrieves the request param
|
java.lang.String |
getMetadataPrefix()
Retrieves the request param
|
protected org.apache.avalon.framework.parameters.Parameters |
getParameters()
Returns the request parameters in a populated Avalon Parameters object
|
java.lang.String |
getRepositoryURL()
Retrieves the repository url
|
org.apache.cocoon.environment.Request |
getRequest()
Retrives the underlying cocoon request object
|
java.lang.String |
getRequestURL()
Retrieves the request url
|
java.lang.String |
getResumptionToken()
Retrieves the request param
|
java.lang.String |
getSetIdentifier()
Retrieves the request param
|
java.lang.String |
getUntil()
Retrieves the request param
|
boolean |
getUseLastHarvestDate()
Gets the parameter of the request
|
int |
getVerb()
Retrieves the
int representation of the "verb" request paraameter |
java.lang.String |
getVerbId()
Retrieves the request param
|
java.lang.String |
getVerbString()
Retrieves the
String representation of the "verb" request paraameter |
void |
setFrom(java.lang.String fromDate)
Establishes the request param
|
void |
setGranularity(java.lang.String granularity)
Sets the parameter of the request
|
void |
setIdentifier(java.lang.String identifier)
Establishes the request param
|
void |
setMetadataPrefix(java.lang.String metadataPrefix)
Establishes the request param
|
protected void |
setParameters()
Sets the request parameter class fields from the cocoon request object
|
void |
setRepositoryURL(java.lang.String url)
Establishes the repository url
|
void |
setRequest(org.apache.cocoon.environment.Request coocoonRequest)
Establishes the underlying cocoon request object
|
void |
setRequestURL(java.lang.String requestURL)
Establishes the request url
|
void |
setResumptionToken(java.lang.String resumptionToken)
Establishes the request param
|
void |
setSetIdentifier(java.lang.String setIdentifier)
Establishes the request param
|
void |
setUntil(java.lang.String until)
Establishes the request param
|
void |
setUseLastHarvestDate(boolean useLastHarvestDate)
Sets the parameter of the request
|
void |
setVerb(int verb)
Establishes the
int representation of the "verb" request parameter |
void |
setVerbId(java.lang.String verbId)
Establishes the request param
|
void |
setVerbString(java.lang.String verbString)
Establishes the
String representation of the "verb" request paraameter |
void |
toSAX(org.xml.sax.ContentHandler contentHandler) |
void |
toSAX(org.xml.sax.ContentHandler handler,
boolean sendRequestParams)
Sends the appropriate SAX event reprensentation
of the request for an oai response to the
provide handler
|
contextualize, enableLogging, endElement, getContext, sendElement, sendElementContent, startElement
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping
recycle, setConsumer, setContentHandler, setLexicalHandler
getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
protected java.lang.String requestURL
protected java.lang.String repoURL
protected int verb
int
verb action representationprotected java.lang.String verbString
String
verb action representationprotected java.lang.String identifier
protected java.lang.String metadataPrefix
protected boolean useLastHarvestDate
protected java.lang.String granularity
protected java.lang.String from
protected java.lang.String until
protected java.lang.String setIdentifier
protected java.lang.String resumptionToken
protected org.apache.cocoon.environment.Request cocoonRequest
public int getVerb()
int
representation of the "verb" request paraametergetVerb
in interface OAIRequest
public void setVerb(int verb)
int
representation of the "verb" request parametersetVerb
in interface OAIRequest
public java.lang.String getIdentifier()
getIdentifier
in interface OAIRequest
public void setIdentifier(java.lang.String identifier)
setIdentifier
in interface OAIRequest
public java.lang.String getVerbId()
getVerbId
in interface OAIRequest
public void setVerbId(java.lang.String verbId)
setVerbId
in interface OAIRequest
public java.lang.String getMetadataPrefix()
getMetadataPrefix
in interface OAIRequest
public void setMetadataPrefix(java.lang.String metadataPrefix)
setMetadataPrefix
in interface OAIRequest
public boolean getUseLastHarvestDate()
getUseLastHarvestDate
in interface OAIRequest
public void setUseLastHarvestDate(boolean useLastHarvestDate)
setUseLastHarvestDate
in interface OAIRequest
public java.lang.String getGranularity()
getGranularity
in interface OAIRequest
public void setGranularity(java.lang.String granularity)
setGranularity
in interface OAIRequest
public java.lang.String getFrom()
getFrom
in interface OAIRequest
public void setFrom(java.lang.String fromDate)
setFrom
in interface OAIRequest
public java.lang.String getUntil()
getUntil
in interface OAIRequest
public void setUntil(java.lang.String until)
setUntil
in interface OAIRequest
public java.lang.String getSetIdentifier()
getSetIdentifier
in interface OAIRequest
public void setSetIdentifier(java.lang.String setIdentifier)
setSetIdentifier
in interface OAIRequest
public java.lang.String getResumptionToken()
getResumptionToken
in interface OAIRequest
public void setResumptionToken(java.lang.String resumptionToken)
setResumptionToken
in interface OAIRequest
public java.lang.String getRequestURL()
getRequestURL
in interface OAIRequest
public void setRequestURL(java.lang.String requestURL)
setRequestURL
in interface OAIRequest
public java.lang.String getVerbString()
String
representation of the "verb" request paraametergetVerbString
in interface OAIRequest
public void setVerbString(java.lang.String verbString)
String
representation of the "verb" request paraametersetVerbString
in interface OAIRequest
public java.lang.String getRepositoryURL()
getRepositoryURL
in interface OAIRequest
public void setRepositoryURL(java.lang.String url)
setRepositoryURL
in interface OAIRequest
public org.apache.cocoon.environment.Request getRequest()
getRequest
in interface OAIRequest
public void setRequest(org.apache.cocoon.environment.Request coocoonRequest)
setRequest
in interface OAIRequest
protected void setParameters()
public void toSAX(org.xml.sax.ContentHandler contentHandler) throws org.xml.sax.SAXException
toSAX
in interface org.apache.excalibur.xml.sax.XMLizable
org.xml.sax.SAXException
public void toSAX(org.xml.sax.ContentHandler handler, boolean sendRequestParams) throws org.xml.sax.SAXException
toSAX
in interface OAIRequest
handler
- The handler to feedsendRequestParams
- Whether or not the request params should be sent as attributes (according to error state)org.xml.sax.SAXException
protected org.apache.avalon.framework.parameters.Parameters getParameters()
Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.