public abstract class AbstractRequestReader<RequestType extends OWSRequest> extends OWSCommonUtils implements OWSRequestReader<RequestType>
Provides methods to parse a GET or POST OWS request and create an OWSQuery object
Modifier and Type | Field and Description |
---|---|
protected static String |
noKVP |
protected static String |
noXML |
protected String |
owsVersion |
protected static String |
versionRegex |
invalidKVP, invalidReq, invalidValue, invalidXML, timeFormat
Constructor and Description |
---|
AbstractRequestReader() |
Modifier and Type | Method and Description |
---|---|
void |
addKVPExtension(String argName,
String argValue,
OWSRequest request)
Helper method to read KVP extensions
|
void |
checkParameters(OWSRequest request,
OWSExceptionReport report) |
static void |
checkParameters(OWSRequest request,
OWSExceptionReport report,
String serviceType)
Checks that OWS common mandatory parameters are present
|
void |
readCommonQueryArguments(Map<String,String> queryParameters,
OWSRequest request)
Helper method to read service, operation name and version from any OWS query string
|
static void |
readCommonXML(DOMHelper dom,
Element requestElt,
OWSRequest request)
Reads common XML request parameters and fill up the OWSQuery accordingly
|
abstract RequestType |
readURLParameters(Map<String,String> queryParameters)
Decodes URL request parameters from the given map
|
RequestType |
readURLQuery(String queryString)
Reads URL request arguments from the given query string
|
abstract RequestType |
readXMLQuery(DOMHelper domHelper,
Element requestElt)
Reads XML request parameters from the given element and using the given DOMHelper.
|
RequestType |
readXMLQuery(InputStream input) |
parseBboxArg, parseQueryParameters, parseTimeArg, parseVector
protected static final String versionRegex
protected static final String noKVP
protected static final String noXML
protected String owsVersion
public abstract RequestType readURLParameters(Map<String,String> queryParameters) throws OWSException
OWSRequestReader
readURLParameters
in interface OWSRequestReader<RequestType extends OWSRequest>
queryParameters
- map containing a key value pair for each query parameterOWSException
public abstract RequestType readXMLQuery(DOMHelper domHelper, Element requestElt) throws OWSException
OWSRequestReader
readXMLQuery
in interface OWSRequestReader<RequestType extends OWSRequest>
OWSException
public static void readCommonXML(DOMHelper dom, Element requestElt, OWSRequest request)
dom
- requestElt
- request
- public RequestType readURLQuery(String queryString) throws OWSException
OWSRequestReader
readURLQuery
in interface OWSRequestReader<RequestType extends OWSRequest>
OWSException
public RequestType readXMLQuery(InputStream input) throws OWSException
OWSException
public void readCommonQueryArguments(Map<String,String> queryParameters, OWSRequest request) throws OWSException
request
- queryParameters
- OWSException
public void addKVPExtension(String argName, String argValue, OWSRequest request) throws OWSException
argName
- argValue
- request
- OWSException
public void checkParameters(OWSRequest request, OWSExceptionReport report) throws OWSException
OWSException
public static void checkParameters(OWSRequest request, OWSExceptionReport report, String serviceType) throws OWSException
request
- report
- serviceType
- OWSException
Copyright © 2016 Sensia Software LLC. All rights reserved.