|
DLESE Tools v1.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.action.Action org.dlese.dpc.repository.action.RepositoryAction
Implementation of Action that handles all OAI-PMH and ODL requests.
Field Summary |
---|
Fields inherited from class org.apache.struts.action.Action |
---|
ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY |
Constructor Summary | |
---|---|
RepositoryAction()
|
Method Summary | |
---|---|
protected org.apache.struts.action.ActionForward |
doGetRecord(HttpServletRequest request,
org.apache.struts.action.ActionMapping mapping,
int num_args,
RepositoryManager rm,
RepositoryForm rf)
Handles the OAI GetRecord request. |
protected org.apache.struts.action.ActionForward |
doIdentify(HttpServletRequest request,
org.apache.struts.action.ActionMapping mapping,
int num_args,
RepositoryManager rm,
RepositoryForm rf)
Handles the OAI Identify request. |
protected org.apache.struts.action.ActionForward |
doListMetadataFormats(HttpServletRequest request,
org.apache.struts.action.ActionMapping mapping,
int num_args,
RepositoryManager rm,
RepositoryForm rf)
Handles the OAI ListMetadataFormats request. |
protected org.apache.struts.action.ActionForward |
doListRecordsOrIdentifiers(HttpServletRequest request,
org.apache.struts.action.ActionMapping mapping,
int num_args,
RepositoryManager rm,
RepositoryForm rf,
String requestType,
int numResults)
Handles the OAI ListRecords or ListIdentifiers requests. |
protected org.apache.struts.action.ActionForward |
doListSets(HttpServletRequest request,
org.apache.struts.action.ActionMapping mapping,
int num_args,
RepositoryManager rm,
RepositoryForm rf)
Handles the OAI ListSets request. |
org.apache.struts.action.ActionForward |
execute(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
Processes the OAI-PMH request and creates the corresponding HTTP response by forwarding to a JSP page for rendering. |
protected static String |
getDateStamp()
Return a string for the current time and date, sutiable for display in log files and output to standout: |
protected void |
prtln(String s)
Output a line of text to standard out, with datestamp, if debug is set to true. |
protected void |
prtlnErr(String s)
Output a line of text to error out, with datestamp. |
static void |
setDebug(boolean db)
Sets the debug attribute of the object |
Methods inherited from class org.apache.struts.action.Action |
---|
execute, generateToken, getDataSource, getDataSource, getLocale, getResources, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, perform, perform, resetToken, saveErrors, saveMessages, saveToken, setLocale, setServlet, toHex |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RepositoryAction()
Method Detail |
public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
mapping
- The ActionMapping used to select this instancerequest
- The HTTP request we are processingresponse
- The HTTP response we are creatingform
- The ActionForm for the given page
Exception
- If error.protected org.apache.struts.action.ActionForward doIdentify(HttpServletRequest request, org.apache.struts.action.ActionMapping mapping, int num_args, RepositoryManager rm, RepositoryForm rf)
Arguments: None
Error Exception Conditions:
badArgument - The request includes illegal arguments.
request
- The HTTP request.mapping
- The Struts ActionMapping used for forwarding.num_args
- The number of arguments other than the OAI verb or rt.rm
- The model used to fetch OAI data.rf
- The bean used to handle the response.
protected org.apache.struts.action.ActionForward doGetRecord(HttpServletRequest request, org.apache.struts.action.ActionMapping mapping, int num_args, RepositoryManager rm, RepositoryForm rf)
Arguments:
identifier - a required argument that specifies the unique identifier of
the item in the repository from which the record must be disseminated.
metadataPrefix - a required argument that specifies the metadataPrefix of
the format that should be included in the metadata part of the returned
record . A record should only be returned if the format specified by the
metadataPrefix can be disseminated from the item identified by the value of
the identifier argument. The metadata formats supported by a repository and
for a particular record can be retrieved using the ListMetadataFormats
request.
Error and Exception Conditions:
badArgument - The request includes illegal arguments or is missing required
arguments.
cannotDisseminateFormat - The value of the metadataPrefix argument is not
supported by the item identified by the value of the identifier argument
idDoesNotExist - The value of the identifier argument is unknown or illegal
in this repository.
request
- The HTTP request.mapping
- The Struts ActionMapping used for forwarding.num_args
- The number of arguments other than the OAI verb or rt.rm
- The model used to fetch OAI data.rf
- The bean used to handle the response.
protected org.apache.struts.action.ActionForward doListMetadataFormats(HttpServletRequest request, org.apache.struts.action.ActionMapping mapping, int num_args, RepositoryManager rm, RepositoryForm rf)
Arguments:
identifier - an optional argument that specifies the unique identifier of
the item for which available metadata formats are being requested. If this
argument is omitted, then the response includes all metadata formats
supported by this repository. Note that the fact that a metadata format is
supported by a repository does not mean that it can be disseminated from
all items in the repository.
Error and Exception Conditions:
badArgument - The request includes illegal arguments or is missing required
arguments.
idDoesNotExist - The value of the identifier argument is unknown or illegal
in this repository.
noMetadataFormats - There are no metadata formats available for the
specified item.
request
- The HTTP request.mapping
- The Struts ActionMapping used for forwarding.num_args
- The number of arguments other than the OAI verb or rt.rm
- The model used to fetch OAI data.rf
- The bean used to handle the response.
protected org.apache.struts.action.ActionForward doListRecordsOrIdentifiers(HttpServletRequest request, org.apache.struts.action.ActionMapping mapping, int num_args, RepositoryManager rm, RepositoryForm rf, String requestType, int numResults)
Arguments:
from - an optional argument with a UTCdatetime value , which specifies a
lower bound for datestamp-based selective harvesting.
until - an optional argument with a UTCdatetime value , which specifies a
upper bound for datestamp-based selective harvesting.
metadataPrefix - a required argument, which specifies that headers should
be returned only if the metadata format matching the supplied
metadataPrefix is available or, depending on the repository's support for
deletions, has been deleted. The metadata formats supported by a repository
and for a particular item can be retrieved using the ListMetadataFormats
request.
set - an optional argument with a setSpec value , which specifies set
criteria for selective harvesting.
resumptionToken - an exclusive argument with a value that is the flow
control token returned by a previous ListIdentifiers request that issued an
incomplete list.
Error and Exception Conditions:
badArgument - The request includes illegal arguments or is missing required
arguments.
badResumptionToken - The value of the resumptionToken argument is invalid
or expired.
cannotDisseminateFormat - The value of the metadataPrefix argument is not
supported by the repository.
noRecordsMatch- The combination of the values of the from, until , and set
arguments results in an empty list.
noSetHierarchy - The repository does not support sets.
request
- The HTTP request.mapping
- The Struts ActionMapping used for forwarding.num_args
- The number of arguments other than the OAI verb or rt.rm
- The model used to fetch OAI data.rf
- The bean used to handle the response.numResults
- The number of results to provide in the response before
returning a resumptionToken.requestType
- The requestType, which must be either ListIdentifiers
or ListRecords.
protected org.apache.struts.action.ActionForward doListSets(HttpServletRequest request, org.apache.struts.action.ActionMapping mapping, int num_args, RepositoryManager rm, RepositoryForm rf)
Arguments
resumptionToken - an exclusive argument with a value that is the flow
control token returned by a previous ListSets request that issued an
incomplete list
Error and Exception Conditions
badArgument - The request includes illegal arguments or is missing required
arguments.
badResumptionToken - The value of the resumptionToken argument is invalid
or expired.
noSetHierarchy - The repository does not support sets.
request
- The HTTP request.mapping
- The Struts ActionMapping used for forwarding.num_args
- The number of arguments other than the OAI verb or rt.rm
- The model used to fetch OAI data.rf
- The bean used to handle the response.
protected static final String getDateStamp()
protected final void prtlnErr(String s)
s
- The text that will be output to error out.protected final void prtln(String s)
s
- The String that will be output.public static void setDebug(boolean db)
db
- The new debug value
|
DLESE Tools v1.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |