Package eu.clarin.sru.client
Class SRUExplainRequest
- java.lang.Object
- 
- eu.clarin.sru.client.SRUExplainRequest
 
- 
 public class SRUExplainRequest extends Object An object for performing a explain operation.- See Also:
- SRUExplainHandler, SRU Explain Operation
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected Map<String,String>authenticationContextA map of extra authentication context data.protected URIbaseURIThe baseURI of the SRU server.protected Map<String,String>extraRequestDataA map of extra request data parameters.static StringMALFORMED_OMITfor end-point conformance testing only. never use in production.protected static StringOP_EXPLAINprotected static StringOP_SCANprotected static StringOP_SEARCH_RETRIEVEprotected static StringPARAM_EXTENSION_PREFIXprotected static StringPARAM_HTTP_ACCEPTprotected static StringPARAM_MAXIMUM_RECORDSprotected static StringPARAM_MAXIMUM_TERMSprotected static StringPARAM_OPERATIONprotected static StringPARAM_QUERYprotected static StringPARAM_QUERY_TYPEprotected static StringPARAM_RECORD_PACKINGprotected static StringPARAM_RECORD_SCHEMAprotected static StringPARAM_RECORD_X_PATHprotected static StringPARAM_RECORD_XML_ESCAPINGprotected static StringPARAM_RENDER_BYprotected static StringPARAM_RESPONSE_POSITIONprotected static StringPARAM_RESPONSE_TYPEprotected static StringPARAM_RESULT_SET_TTLprotected static StringPARAM_SCAN_CLAUSEprotected static StringPARAM_SORT_KEYSprotected static StringPARAM_START_RECORDprotected static StringPARAM_STYLESHEETprotected static StringPARAM_VERSIONprotected static StringRECORD_PACKING_PACKEDprotected static StringRECORD_PACKING_UNPACKEDprotected static StringRECORD_XML_ESCAPING_XMLprotected static StringRECORD_XML_ESCPAING_STRINGprotected static StringRENDER_BY_CLIENTprotected static StringRENDER_BY_SERVERprotected SRUVersionversionThe version to be used for this request.protected static StringVERSION_1_1protected static StringVERSION_1_2static StringX_MALFORMED_OPERATIONfor end-point conformance testing only. never use in production.static StringX_MALFORMED_VERSIONfor end-point conformance testing only. never use in production.
 - 
Constructor SummaryConstructors Constructor Description SRUExplainRequest(String baseURI)Constructor.SRUExplainRequest(URI baseURI)Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getAuthenticationContext()Returns a nullable read-only map of authentication context data.URIgetBaseURI()Get the baseURI of the SRU server.StringgetExtraRequestData(String name)Set the value of extra request parameter for this request.SRUOperationgetOperation()Note: this method is not a part of public API.SRURecordXmlEscapinggetRecordXmlEscaping()Get the recordXmlEscpaing (SRU 2.0) or recordPacking (SRU 1.1 and SRU 1.2) parameter of this request.URIgetRequestedURI()Get the URI that was used to perform the request.SRUVersiongetRequestedVersion()Get the version that was used to carry out this request.SRUVersiongetVersion()Get the version for this request.booleanisParseRecordDataEnabled()Check, whether the record data of a explain response (ZeeRex record) shall be parsed or not.booleanisSendAuthentication()Get the authentication mode for this requestbooleanisStrictMode()Get the SRU protocol conformance mode for this requestprotected URImakeURI(SRUVersion defaultVersion)voidsetAuthenticationContext(String name, String value)Set an authentication context entry for this request.voidsetExtraRequestData(String name, String value)Set an extra request parameter for this request.voidsetParseRecordDataEnabled(boolean enabled)Enable or disable parsing of explain record data (ZeeRex record) of the explain response.voidsetRecordXmlEscaping(SRURecordXmlEscaping getRecordXmlEscaping)Set the recordXmlEscpaing (SRU 2.0) or recordPacking (SRU 1.1 and SRU 1.2) parameter of this request.voidsetSendAuthentication(boolean sendAuthentication)Set whether authentication information should be sent for this requestvoidsetStrictMode(boolean strictMode)Set the SRU protocol conformance mode for this requestvoidsetVersion(SRUVersion version)Set the version for this request.
 
- 
- 
- 
Field Detail- 
PARAM_OPERATIONprotected static final String PARAM_OPERATION - See Also:
- Constant Field Values
 
 - 
PARAM_VERSIONprotected static final String PARAM_VERSION - See Also:
- Constant Field Values
 
 - 
PARAM_STYLESHEETprotected static final String PARAM_STYLESHEET - See Also:
- Constant Field Values
 
 - 
PARAM_RENDER_BYprotected static final String PARAM_RENDER_BY - See Also:
- Constant Field Values
 
 - 
PARAM_HTTP_ACCEPTprotected static final String PARAM_HTTP_ACCEPT - See Also:
- Constant Field Values
 
 - 
PARAM_RESPONSE_TYPEprotected static final String PARAM_RESPONSE_TYPE - See Also:
- Constant Field Values
 
 - 
PARAM_QUERYprotected static final String PARAM_QUERY - See Also:
- Constant Field Values
 
 - 
PARAM_QUERY_TYPEprotected static final String PARAM_QUERY_TYPE - See Also:
- Constant Field Values
 
 - 
PARAM_START_RECORDprotected static final String PARAM_START_RECORD - See Also:
- Constant Field Values
 
 - 
PARAM_MAXIMUM_RECORDSprotected static final String PARAM_MAXIMUM_RECORDS - See Also:
- Constant Field Values
 
 - 
PARAM_RECORD_XML_ESCAPINGprotected static final String PARAM_RECORD_XML_ESCAPING - See Also:
- Constant Field Values
 
 - 
PARAM_RECORD_PACKINGprotected static final String PARAM_RECORD_PACKING - See Also:
- Constant Field Values
 
 - 
PARAM_RECORD_SCHEMAprotected static final String PARAM_RECORD_SCHEMA - See Also:
- Constant Field Values
 
 - 
PARAM_RECORD_X_PATHprotected static final String PARAM_RECORD_X_PATH - See Also:
- Constant Field Values
 
 - 
PARAM_RESULT_SET_TTLprotected static final String PARAM_RESULT_SET_TTL - See Also:
- Constant Field Values
 
 - 
PARAM_SORT_KEYSprotected static final String PARAM_SORT_KEYS - See Also:
- Constant Field Values
 
 - 
PARAM_SCAN_CLAUSEprotected static final String PARAM_SCAN_CLAUSE - See Also:
- Constant Field Values
 
 - 
PARAM_RESPONSE_POSITIONprotected static final String PARAM_RESPONSE_POSITION - See Also:
- Constant Field Values
 
 - 
PARAM_MAXIMUM_TERMSprotected static final String PARAM_MAXIMUM_TERMS - See Also:
- Constant Field Values
 
 - 
OP_EXPLAINprotected static final String OP_EXPLAIN - See Also:
- Constant Field Values
 
 - 
OP_SCANprotected static final String OP_SCAN - See Also:
- Constant Field Values
 
 - 
OP_SEARCH_RETRIEVEprotected static final String OP_SEARCH_RETRIEVE - See Also:
- Constant Field Values
 
 - 
VERSION_1_1protected static final String VERSION_1_1 - See Also:
- Constant Field Values
 
 - 
VERSION_1_2protected static final String VERSION_1_2 - See Also:
- Constant Field Values
 
 - 
RECORD_XML_ESCAPING_XMLprotected static final String RECORD_XML_ESCAPING_XML - See Also:
- Constant Field Values
 
 - 
RECORD_XML_ESCPAING_STRINGprotected static final String RECORD_XML_ESCPAING_STRING - See Also:
- Constant Field Values
 
 - 
RECORD_PACKING_PACKEDprotected static final String RECORD_PACKING_PACKED - See Also:
- Constant Field Values
 
 - 
RECORD_PACKING_UNPACKEDprotected static final String RECORD_PACKING_UNPACKED - See Also:
- Constant Field Values
 
 - 
RENDER_BY_CLIENTprotected static final String RENDER_BY_CLIENT - See Also:
- Constant Field Values
 
 - 
RENDER_BY_SERVERprotected static final String RENDER_BY_SERVER - See Also:
- Constant Field Values
 
 - 
PARAM_EXTENSION_PREFIXprotected static final String PARAM_EXTENSION_PREFIX - See Also:
- Constant Field Values
 
 - 
X_MALFORMED_OPERATIONpublic static final String X_MALFORMED_OPERATION for end-point conformance testing only. never use in production.- See Also:
- Constant Field Values
 
 - 
X_MALFORMED_VERSIONpublic static final String X_MALFORMED_VERSION for end-point conformance testing only. never use in production.- See Also:
- Constant Field Values
 
 - 
MALFORMED_OMITpublic static final String MALFORMED_OMIT for end-point conformance testing only. never use in production.- See Also:
- Constant Field Values
 
 - 
baseURIprotected final URI baseURI The baseURI of the SRU server.
 - 
versionprotected SRUVersion version The version to be used for this request.
 - 
extraRequestDataprotected Map<String,String> extraRequestData A map of extra request data parameters.
 
- 
 - 
Method Detail- 
getRecordXmlEscapingpublic SRURecordXmlEscaping getRecordXmlEscaping() Get the recordXmlEscpaing (SRU 2.0) or recordPacking (SRU 1.1 and SRU 1.2) parameter of this request.- Returns:
- the requested record packing
- See Also:
- SRURecordXmlEscaping
 
 - 
setRecordXmlEscapingpublic void setRecordXmlEscaping(SRURecordXmlEscaping getRecordXmlEscaping) Set the recordXmlEscpaing (SRU 2.0) or recordPacking (SRU 1.1 and SRU 1.2) parameter of this request.- Parameters:
- getRecordXmlEscaping- the requested record XML escaping
- See Also:
- SRURecordXmlEscaping
 
 - 
isParseRecordDataEnabledpublic boolean isParseRecordDataEnabled() Check, whether the record data of a explain response (ZeeRex record) shall be parsed or not.- Returns:
- trueif parsing is enabled,- falseotherwise
 
 - 
setParseRecordDataEnabledpublic void setParseRecordDataEnabled(boolean enabled) Enable or disable parsing of explain record data (ZeeRex record) of the explain response.- Parameters:
- enabled-- trueenabled parsing,- falsedisables parsing
 
 - 
getOperationpublic SRUOperation getOperation() Note: this method is not a part of public API.- Returns:
- a operation constant for this request
 
 - 
getBaseURIpublic URI getBaseURI() Get the baseURI of the SRU server.- Returns:
- the baseURI of the SRU server
 
 - 
isStrictModepublic boolean isStrictMode() Get the SRU protocol conformance mode for this request- Returns:
- trueif the request will be performed in strict mode,- falseif the request will be performed in a more tolerant mode
 
 - 
setStrictModepublic void setStrictMode(boolean strictMode) Set the SRU protocol conformance mode for this request- Parameters:
- strictMode-- trueif the request should be performed in strict mode,- falseif the request should be performed client should in a more tolerant mode
 
 - 
setVersionpublic void setVersion(SRUVersion version) Set the version for this request.- Parameters:
- version- a version of- nullfor client default
 
 - 
getVersionpublic SRUVersion getVersion() Get the version for this request.- Returns:
- version for this request or nullif client default is used
 
 - 
setExtraRequestDatapublic void setExtraRequestData(String name, String value) Set an extra request parameter for this request.- Parameters:
- name- the name for the extra request data parameter
- value- the value for the extra request data parameter
- Throws:
- NullPointerException- if any required argument is- null
- IllegalArgumentException- if any argument is invalid
- See Also:
- SRU Extra Data / Extensions
 
 - 
getExtraRequestDatapublic String getExtraRequestData(String name) Set the value of extra request parameter for this request.- Parameters:
- name- the name for the extra request data parameter
- Returns:
- the value for the extra request data parameter or
         nullif parameter was not set
- Throws:
- NullPointerException- if any required argument is- null
- IllegalArgumentException- if any argument is invalid
- See Also:
- SRU Extra Data / Extensions
 
 - 
getRequestedURIpublic final URI getRequestedURI() Get the URI that was used to perform the request. This method may only be called after the request was carried out, otherwise it will throw anIllegalStateException.- Returns:
- the URI that was used to carry out this request
- Throws:
- IllegalStateException- if the request was not yet carried out
 
 - 
getRequestedVersionpublic final SRUVersion getRequestedVersion() Get the version that was used to carry out this request. This method may only be called after the request was carried out, otherwise it will throw anIllegalStateException.- Returns:
- the version that was used to carry out this request
- Throws:
- IllegalStateException- if the request was not yet carried out
 
 - 
isSendAuthenticationpublic boolean isSendAuthentication() Get the authentication mode for this request- Returns:
- trueif the request will try to send authentication data (header),- falseif the request will not send send authentication information
 
 - 
setSendAuthenticationpublic void setSendAuthentication(boolean sendAuthentication) Set whether authentication information should be sent for this request- Parameters:
- sendAuthentication-- trueif the request should try to send authentication information,- falseif sending should be suppressed
 
 - 
getAuthenticationContextpublic Map<String,String> getAuthenticationContext() Returns a nullable read-only map of authentication context data.- Returns:
- the authentication context map or nullif no entries were created
 
 - 
setAuthenticationContextpublic void setAuthenticationContext(String name, String value) Set an authentication context entry for this request.- Parameters:
- name- the name for the context entry parameter
- value- the value for the context entry parameter
- Throws:
- NullPointerException- if any required argument is- null
- IllegalArgumentException- if any argument is invalid
 
 - 
makeURIprotected final URI makeURI(SRUVersion defaultVersion) throws SRUClientException - Throws:
- SRUClientException
 
 
- 
 
-