com.novell.sentinel.uri
Class GenericURI.Query

java.lang.Object
  extended by com.novell.sentinel.uri.GenericURI.Query
Direct Known Subclasses:
GenericURI.FormQuery
Enclosing class:
GenericURI

public static class GenericURI.Query
extends Object

A class supported the generic query string specified by RFC 3986.


Field Summary
static PercentCodex QUERY_CODEX
           
 
Constructor Summary
GenericURI.Query()
          Construct an empty instance.
GenericURI.Query(GenericURI.Query src)
          Make a deep copy of the passed instance.
GenericURI.Query(String rawQuery)
          Construct a query based on the passed, encoded raw string.
 
Method Summary
 String getQuery()
          Get the decoded, literal query string, if any.
 String getRaw()
          Get the raw, unparsed, un-decoded string used to construct or set the data in this instance.
 boolean isEmpty()
          Return true if there is no data associated with this instance.
protected  void parse(String queryString)
           
 void set(String rawString)
          Set the query data based on the passed raw string.
 void setQuery(String literalString)
          Set the query data based on the passed literal (unencoded) string.
protected  void setRaw(String rawQuery)
          Set the raw string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUERY_CODEX

public static final PercentCodex QUERY_CODEX
Constructor Detail

GenericURI.Query

public GenericURI.Query()
Construct an empty instance.


GenericURI.Query

public GenericURI.Query(String rawQuery)
Construct a query based on the passed, encoded raw string.

Parameters:
rawQuery - The raw string.

GenericURI.Query

public GenericURI.Query(GenericURI.Query src)
Make a deep copy of the passed instance.

Parameters:
src - The instance to copy.
Method Detail

isEmpty

public boolean isEmpty()
Return true if there is no data associated with this instance.

Returns:
true if the query is empty.

set

public void set(String rawString)
Set the query data based on the passed raw string. The passed string will be decoded and used otherwise unchanged.

Parameters:
rawString - The raw string.

setQuery

public void setQuery(String literalString)
Set the query data based on the passed literal (unencoded) string.

Parameters:
literalString -

getQuery

public String getQuery()
Get the decoded, literal query string, if any.

Returns:
The query string, or null.

getRaw

public String getRaw()
Get the raw, unparsed, un-decoded string used to construct or set the data in this instance.

Returns:
The raw string, or null. If a structured setter has been used (i.e., any setter other than set(String)) then there is no raw data.

setRaw

protected void setRaw(String rawQuery)
Set the raw string. This is designed to be used in conjunction with the various setters. If a structured setter is used, the raw data should be set to null.

Parameters:
rawQuery - The string to set, or null.

parse

protected void parse(String queryString)