|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vfny.geoserver.requests.readers.KvpRequestReader
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.
Field Summary | |
protected static java.lang.String |
INNER_DELIMETER
Delimeter for inner value lists in the KVPs |
protected java.util.Map |
kvpPairs
KVP pair listing; stores all data from the KVP request |
protected static java.lang.String |
OUTER_DELIMETER
Delimeter for outer value lists in the KVPs |
Constructor Summary | |
KvpRequestReader(java.util.Map kvpPairs)
Constructor with kvp request parameters. |
Method Summary | |
abstract Request |
getRequest(javax.servlet.http.HttpServletRequest request)
returns the propper Request subclass for the set of parameters it was setted up and the kind of request it is specialized for |
protected static java.util.List |
getTypesFromFids(java.lang.String rawFidList)
Attempts to parse out the proper typeNames from the FeatureId filters. |
protected java.lang.String |
getValue(java.lang.String key)
returns the value asociated with key on the set of
key/value pairs of this request reader |
protected boolean |
keyExists(java.lang.String key)
DOCUMENT ME! |
static java.util.Map |
parseKvpSet(java.lang.String qString)
creates a Map of key/value pairs from a HTTP style query String |
protected static java.util.List |
readFilters(java.lang.String fid,
java.lang.String filter,
java.lang.String bbox)
Reads in three strings, representing some sort of feature constraints, and translates them into filters. |
protected static java.util.List |
readFlat(java.lang.String rawList,
java.lang.String delimiter)
Reads a tokenized string and turns it into a list. |
protected static java.util.List |
readNested(java.lang.String rawList)
Reads a nested tokenized string and turns it into a list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String OUTER_DELIMETER
protected static final java.lang.String INNER_DELIMETER
protected java.util.Map kvpPairs
Constructor Detail |
public KvpRequestReader(java.util.Map kvpPairs)
kvpPairs
- map of key/value pairsMethod Detail |
protected java.lang.String getValue(java.lang.String key)
key
on the set of
key/value pairs of this request reader
key
- DOCUMENT ME!
protected boolean keyExists(java.lang.String key)
key
- DOCUMENT ME!
public abstract Request getRequest(javax.servlet.http.HttpServletRequest request) throws ServiceException
ServiceException
protected static java.util.List getTypesFromFids(java.lang.String rawFidList) throws WfsException
rawFidList
- the strings after the FEATUREID url component. Should
be found using kvpPairs.get("FEATUREID") in this class or one of
its children
WfsException
- If the structure can not be read.protected static java.util.List readFlat(java.lang.String rawList, java.lang.String delimiter)
rawList
- The tokenized string.delimiter
- The delimeter for the string tokens.
protected static java.util.List readNested(java.lang.String rawList) throws WfsException
rawList
- The tokenized string.
WfsException
- When the string structure cannot be read.protected static java.util.List readFilters(java.lang.String fid, java.lang.String filter, java.lang.String bbox) throws WfsException
fid
- A group of feature IDs, as a String.filter
- A group of filters, as a String.bbox
- A group of boxes, as a String.
WfsException
- When the string structure cannot be read.public static java.util.Map parseKvpSet(java.lang.String qString)
qString
- DOCUMENT ME!
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |