| java.lang.Object org.vfny.geoserver.util.requests.readers.KvpRequestReader
All known Subclasses: org.vfny.geoserver.wms.requests.WmsKvpRequestReader, org.vfny.geoserver.wcs.requests.readers.GetCoverageKvpReader, org.vfny.geoserver.wcs.requests.readers.CapabilitiesKvpReader, org.vfny.geoserver.wms.requests.CapabilitiesKvpReader, org.vfny.geoserver.wcs.requests.readers.DescribeKvpReader, org.vfny.geoserver.sld.requests.PutStylesKvpReader,
KvpRequestReader | abstract public class KvpRequestReader (Code) | | Base class for all KVP readers, with some generalized convenience methods.
If you pass this utility a KVP request (everything after the '?' in the GET
request URI), it will translate this into a list of key-word value
pairs.These pairs represent every element in the KVP GET request, legal or
otherwise. This class may then be subclassed and used by request-specific
classes. Because there is no error checking for the KVPs in this class,
subclasses must check for validity of their KVPs before passing the their
requests along, but - in return - this parent class is quite flexible. For
example, native KVPs may be easily parsed in its subclasses, since they are
simply read and stored (without analysis) in the constructer in this class.
Note that all keys are translated to upper case to avoid case conflicts.
author: Rob Hranac, TOPP author: Chris Holmes, TOPP author: Gabriel Roldan version: $Id: KvpRequestReader.java 8179 2008-01-16 16:56:48Z groldan $ |
INNER_DELIMETER | final protected static String INNER_DELIMETER(Code) | | Delimeter for inner value lists in the KVPs
|
OUTER_DELIMETER | final protected static String OUTER_DELIMETER(Code) | | Delimeter for outer value lists in the KVPs
|
factory | final protected static FilterFactory factory(Code) | | Holds mappings between HTTP and ASCII encodings
|
kvpPairs | protected Map kvpPairs(Code) | | KVP pair listing; stores all data from the KVP request
|
KvpRequestReader | public KvpRequestReader(Map kvpPairs, AbstractService service)(Code) | | Creates a reader from paramters and a service.
Parameters: kvpPairs - The key-value pairs. Parameters: service - The service using the reader. |
getRequest | abstract public Request getRequest(HttpServletRequest request) throws ServiceException(Code) | | returns the propper Request subclass for the set of parameters it was
setted up and the kind of request it is specialized for
DOCUMENT ME! |
getTypesFromFids | protected List getTypesFromFids(String rawFidList)(Code) | | Attempts to parse out the proper typeNames from the FeatureId filters.
It simply uses the value before the '.' character.
Parameters: rawFidList - the strings after the FEATUREID url component. Should be foundusing kvpPairs.get("FEATUREID") in this class or one of itschildren A list of typenames, made from the featureId filters. throws: WfsException - If the structure can not be read. |
getValue | protected String getValue(String key)(Code) | | returns the value asociated with key on the set of
key/value pairs of this request reader
Parameters: key - DOCUMENT ME! DOCUMENT ME! |
keyExists | protected boolean keyExists(String key)(Code) | | DOCUMENT ME!
Parameters: key - DOCUMENT ME! DOCUMENT ME! |
parseBbox | protected Envelope parseBbox(String bboxParam) throws ServiceException(Code) | | parses the BBOX parameter, wich must be a String of the form
minx,miny,maxx,maxy and returns a corresponding
Envelope object
Parameters: bboxParam - TODO the Envelope represented by the request BBOXparameter throws: WmsException - if the value of the BBOX request parameter can't beparsed as four double 's |
parseKvpSet | public static Map parseKvpSet(String qString)(Code) | | creates a Map of key/value pairs from a HTTP style query String
Parameters: qString - DOCUMENT ME! DOCUMENT ME! |
parseXMLFilter | protected Filter parseXMLFilter(Reader rawRequest) throws ServiceException(Code) | | Reads the Filter XML request into a geotools Feature object.
Parameters: rawRequest - The plain POST text from the client. The geotools filter constructed from rawRequest. throws: WfsException - For any problems reading the request.FilterKvpParser |
readFidFilters | protected List readFidFilters(String fid)(Code) | | Parses fid filters
Parameters: fid - |
readFlat | protected static List readFlat(String rawList, String delimiter)(Code) | | Reads a tokenized string and turns it into a list. In this method, the
tokenizer is quite flexible. Note that if the list is unspecified (ie. is
null) or is unconstrained (ie. is ''), then the method returns an empty
list.
Parameters: rawList - The tokenized string. Parameters: delimiter - The delimeter for the string tokens. A list of the tokenized string. |
readNested | protected static List readNested(String rawList)(Code) | | Reads a nested tokenized string and turns it into a list. This method is
much more specific to the KVP get request syntax than the more general
readFlat method. In this case, the outer tokenizer '()' and inner
tokenizer ',' are both from the specification. Returns a list of lists.
Parameters: rawList - The tokenized string. A list of lists, containing outer and inner elements. throws: WfsException - When the string structure cannot be read. |
|
|