public class DDSServicesAction
extends org.apache.struts.action.Action
DDSServicesForm
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GET_RECORD_VERB
The GetRecord request verb
|
static java.lang.String |
LIST_COLLECTIONS
The list collections request verb
|
static java.lang.String |
LIST_CONTENT_STANDARDS
The list content standards request verb
|
static java.lang.String |
LIST_FIELDS
The list fields request verb
|
static java.lang.String |
LIST_GRADE_RANGES
The list grade ranges request verb
|
static java.lang.String |
LIST_RESOURCE_TYPES
The list resource types request verb
|
static java.lang.String |
LIST_SUBJECTS
The list subjects request verb
|
static java.lang.String |
LIST_TERMS
The list terms request verb
|
static java.lang.String |
LIST_XML_FORMATS
The list xml formats request verb
|
static java.lang.String |
SEARCH_VERB
The search request verb
|
static java.lang.String |
SERVICE_INFO
The ServiceInfo request verb
|
static java.lang.String |
URL_CHECK_VERB
The UrlCheck request verb
|
static java.lang.String |
USER_SEARCH_VERB
The seach all request verb
|
Constructor and Description |
---|
DDSServicesAction() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.struts.action.ActionForward |
doGetRecord(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
RepositoryManager rm,
DDSServicesForm df,
org.apache.struts.action.ActionMapping mapping)
Handles a request to get a given record from the repository.
|
protected org.apache.struts.action.ActionForward |
doListCollections(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
RepositoryManager rm,
DDSServicesForm df,
org.apache.struts.action.ActionMapping mapping)
Handles a request to get a the available collections.
|
protected org.apache.struts.action.ActionForward |
doListFields(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
RepositoryManager rm,
DDSServicesForm df,
org.apache.struts.action.ActionMapping mapping)
Handles a request to get a list of the fields in the index.
|
protected org.apache.struts.action.ActionForward |
doListTerms(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
RepositoryManager rm,
DDSServicesForm df,
org.apache.struts.action.ActionMapping mapping)
Handles a request to get a list of terms for given field(s) in the index.
|
protected org.apache.struts.action.ActionForward |
doListVocabEntries(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
RepositoryManager rm,
DDSServicesForm df,
org.apache.struts.action.ActionMapping mapping,
java.lang.String verb)
Handles a request to list a vocab and it's values including GradeRanges, Subjects, ResourceTypes and
ContentStandards.
|
protected org.apache.struts.action.ActionForward |
doListXmlFormats(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
RepositoryManager rm,
DDSServicesForm df,
org.apache.struts.action.ActionMapping mapping)
Handles a request to get a the available XML formats.
|
protected org.apache.struts.action.ActionForward |
doSearch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
RepositoryManager rm,
DDSServicesForm df,
org.apache.struts.action.ActionMapping mapping)
Handles a request to perform a search over all records using the Lucene Query Language.
|
protected org.apache.struts.action.ActionForward |
doServiceInfo(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
RepositoryManager rm,
DDSServicesForm df,
org.apache.struts.action.ActionMapping mapping)
Handles a request to get a the service information.
|
protected org.apache.struts.action.ActionForward |
doUrlCheck(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
RepositoryManager rm,
DDSServicesForm df,
org.apache.struts.action.ActionMapping mapping)
Handles a request to check the repository for the existence of a given URL.
|
protected org.apache.struts.action.ActionForward |
doUserSearch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
RepositoryManager rm,
DDSServicesForm df,
org.apache.struts.action.ActionMapping mapping)
Handles a request to perform a search over item-level records using the User Query Language.
|
org.apache.struts.action.ActionForward |
execute(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Processes the DDS web service request by forwarding to the appropriate corresponding JSP page for
rendering.
|
protected static java.lang.String |
getDateStamp()
Return a string for the current time and date, sutiable for display in log files and output to standout:
|
protected java.lang.String |
getListCollectionsCacheKey()
Gets the key used for caching the ListCollections response in the application scope.
|
static int |
getNumRecords(RepositoryManager rm)
Gets the number of records that have been indexed inclucing adn, collection, anno and other metadata
types regardless of status.
|
protected void |
prtln(java.lang.String s)
Output a line of text to standard out, with datestamp, if debug is set to true.
|
protected void |
prtlnErr(java.lang.String s)
Output a line of text to error out, with datestamp.
|
static void |
setDebug(boolean db)
Sets the debug attribute of the object
|
static void |
setMaxSearchResults(int maxResults)
Sets the maximum number of search results that can be returned by the service.
|
protected void |
setRecordXml(DDSServicesForm df,
ResultDoc resultDoc)
Sets the record XML in the form bean using the localized version of XML.
|
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
public static java.lang.String URL_CHECK_VERB
public static java.lang.String GET_RECORD_VERB
public static java.lang.String SEARCH_VERB
public static java.lang.String USER_SEARCH_VERB
public static java.lang.String SERVICE_INFO
public static java.lang.String LIST_XML_FORMATS
public static java.lang.String LIST_COLLECTIONS
public static java.lang.String LIST_GRADE_RANGES
public static java.lang.String LIST_SUBJECTS
public static java.lang.String LIST_CONTENT_STANDARDS
public static java.lang.String LIST_RESOURCE_TYPES
public static java.lang.String LIST_FIELDS
public static java.lang.String LIST_TERMS
protected java.lang.String getListCollectionsCacheKey()
public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
execute
in class org.apache.struts.action.Action
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 pagejava.lang.Exception
- If error.protected org.apache.struts.action.ActionForward doGetRecord(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RepositoryManager rm, DDSServicesForm df, org.apache.struts.action.ActionMapping mapping) throws java.lang.Exception
Arguments: identifier, metadataPrefix.
Error Exception Conditions:
badArgument - The request includes illegal arguments.
request
- The HTTP requestresponse
- The HTTP responserm
- The RepositoryManager useddf
- The beanmapping
- ActionMapping usedjava.lang.Exception
- If error.protected void setRecordXml(DDSServicesForm df, ResultDoc resultDoc)
df
- The formresultDoc
- The resultDocprotected org.apache.struts.action.ActionForward doUserSearch(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RepositoryManager rm, DDSServicesForm df, org.apache.struts.action.ActionMapping mapping) throws java.lang.Exception
Arguments: identifier, metadataPrefix.
Error Exception Conditions:
badArgument - The request includes illegal arguments.
request
- The HTTP requestresponse
- The HTTP responserm
- The RepositoryManager useddf
- The beanmapping
- ActionMapping usedjava.lang.Exception
- If error.protected org.apache.struts.action.ActionForward doSearch(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RepositoryManager rm, DDSServicesForm df, org.apache.struts.action.ActionMapping mapping) throws java.lang.Exception
Arguments: identifier, metadataPrefix.
Error Exception Conditions:
badArgument - The request includes illegal arguments.
request
- The HTTP requestresponse
- The HTTP responserm
- The RepositoryManager useddf
- The beanmapping
- ActionMapping usedjava.lang.Exception
- If error.protected org.apache.struts.action.ActionForward doUrlCheck(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RepositoryManager rm, DDSServicesForm df, org.apache.struts.action.ActionMapping mapping)
Arguments: url (one or more}
Error Exception Conditions:
badArgument - The request includes illegal arguments.
request
- The HTTP requestresponse
- The HTTP responserm
- The RepositoryManager useddf
- The beanmapping
- ActionMapping usedprotected org.apache.struts.action.ActionForward doListXmlFormats(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RepositoryManager rm, DDSServicesForm df, org.apache.struts.action.ActionMapping mapping) throws java.lang.Exception
Error Exception Conditions:
badArgument - The request includes illegal arguments.
request
- The HTTP requestresponse
- The HTTP responserm
- The RepositoryManager useddf
- The beanmapping
- ActionMapping usedjava.lang.Exception
- If error.protected org.apache.struts.action.ActionForward doListCollections(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RepositoryManager rm, DDSServicesForm df, org.apache.struts.action.ActionMapping mapping) throws java.lang.Exception
Error Exception Conditions:
badArgument - The request includes illegal arguments.
request
- The HTTP requestresponse
- The HTTP responserm
- The RepositoryManager useddf
- The beanmapping
- ActionMapping usedjava.lang.Exception
- If error.protected org.apache.struts.action.ActionForward doListFields(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RepositoryManager rm, DDSServicesForm df, org.apache.struts.action.ActionMapping mapping) throws java.lang.Exception
Error Exception Conditions:
badArgument - The request includes illegal arguments.
request
- The HTTP requestresponse
- The HTTP responserm
- The RepositoryManager useddf
- The beanmapping
- ActionMapping usedjava.lang.Exception
- If error.protected org.apache.struts.action.ActionForward doListTerms(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RepositoryManager rm, DDSServicesForm df, org.apache.struts.action.ActionMapping mapping) throws java.lang.Exception
Error Exception Conditions:
badArgument - The request includes illegal arguments.
request
- The HTTP requestresponse
- The HTTP responserm
- The RepositoryManager useddf
- The beanmapping
- ActionMapping usedjava.lang.Exception
- If error.protected org.apache.struts.action.ActionForward doListVocabEntries(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RepositoryManager rm, DDSServicesForm df, org.apache.struts.action.ActionMapping mapping, java.lang.String verb) throws java.lang.Exception
Error Exception Conditions:
badArgument - The request includes illegal arguments.
request
- The HTTP requestresponse
- The HTTP responserm
- The RepositoryManager useddf
- The beanmapping
- ActionMapping usedverb
- The verb requestedjava.lang.Exception
- If error.protected org.apache.struts.action.ActionForward doServiceInfo(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RepositoryManager rm, DDSServicesForm df, org.apache.struts.action.ActionMapping mapping) throws java.lang.Exception
Error Exception Conditions:
badArgument - The request includes illegal arguments.
request
- The HTTP requestresponse
- The HTTP responserm
- The RepositoryManager useddf
- The beanmapping
- ActionMapping usedjava.lang.Exception
- If error.public static final int getNumRecords(RepositoryManager rm)
rm
- The RepositoryManager being used.public static void setMaxSearchResults(int maxResults)
maxResults
- The new maxSearchResults valueprotected static final java.lang.String getDateStamp()
protected final void prtlnErr(java.lang.String s)
s
- The text that will be output to error out.protected final void prtln(java.lang.String s)
s
- The String that will be output.public static void setDebug(boolean db)
db
- The new debug value