| java.lang.Object org.geoserver.ows.util.KvpUtils
KvpUtils | public class KvpUtils (Code) | | Utility class for reading Key Value Pairs from a http query string.
author: Rob Hranac, TOPP author: Chris Holmes, TOPP author: Gabriel Rold?n, Axios author: Justin Deoliveira, TOPP version: $Id: KvpUtils.java 8488 2008-02-29 19:32:41Z arneke $ |
Inner Class :public static class Tokenizer | |
CQL_DELIMITER | final public static Tokenizer CQL_DELIMITER(Code) | | Delimeter for multiple filters in a CQL filter list (";" )
|
INNER_DELIMETER | final public static Tokenizer INNER_DELIMETER(Code) | | Delimeter for inner value lists in the KVPs
|
KEYWORD_DELIMITER | final public static Tokenizer KEYWORD_DELIMITER(Code) | | Delimeter for KVPs in the raw string
|
OUTER_DELIMETER | final public static Tokenizer OUTER_DELIMETER(Code) | | Delimeter for outer value lists in the KVPs
|
VALUE_DELIMITER | final public static Tokenizer VALUE_DELIMITER(Code) | | Delimeter that seperates keywords from values
|
clean | public static String clean(String raw)(Code) | | Cleans an HTTP string and returns pure ASCII as a string.
Parameters: raw - The HTTP-encoded string. The string with the url escape characters replaced. |
getTypesFromFids | public static 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. Shouldbe found using kvpPairs.get("FEATUREID") in this class or one ofits children A list of typenames, made from the featureId filters. throws: WfsException - If the structure can not be read. |
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! |
readFlat | public static List readFlat(String rawList, Tokenizer tokenizer)(Code) | | Reads a tokenized string and turns it into a list.
In this method, the tokenizer is actually responsible to scan the string,
so this method is just a convenience to maintain backwards compatibility
with the old
KvpUtils.readFlat(String,String) and to easy the use of the
default tokenizers
KvpUtils.KEYWORD_DELIMITER ,
KvpUtils.INNER_DELIMETER ,
KvpUtils.OUTER_DELIMETER and
.
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: tokenizer - The delimeter for the string tokens. A list of the tokenized string. See Also: Tokenizer |
readFlat | public 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.
If possible, use the method version that receives a well known
KvpUtils.readFlat(String,org.geoserver.ows.util.KvpUtils.Tokenizer) Tokenizer ,
as there might be special cases to catch out, like for the
KvpUtils.OUTER_DELIMETER outer delimiter "()" . If this method delimiter
argument does not match a well known Tokenizer, it'll use a simple string
tokenization based on splitting out the strings with the raw passed in
delimiter.
Parameters: rawList - The tokenized string. Parameters: delimiter - The delimeter for the string tokens. A list of the tokenized string. See Also: KvpUtils.readFlat(String,org.geoserver.ows.util.KvpUtils.Tokenizer) |
readNested | public 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. |
|
|