edu.wisc.ssec.mcidas.adde
Class AddeDatasetURL

java.lang.Object
  extended by edu.wisc.ssec.mcidas.adde.AddeURL
      extended by edu.wisc.ssec.mcidas.adde.AddeDatasetURL
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
AddeImageURL, AddePointURL

public class AddeDatasetURL
extends AddeURL

A subclass of AddeURL to support queries on datasets.


 URLs must all have the following format:

   adde://host/request?keyword_1=value_1&keyword_2=value_2

   group=<groupname>         ADDE dataset group
   descr=<descriptor>        ADDE dataset descriptor
   user=<user_id>            ADDE user identification
   proj=<proj #>             a valid ADDE project number
   trace=<0/1>               setting to 1 tells server to write debug
                               trace file
   version=                  ADDE version number, currently 1 except for
                             griddata requests
   debug=                    set to true to watch the printlns stream by
   compress=                 set to "gzip" if you want to use the GZIP
                             compression or "compress" if you want to use
                             transfers in Unix compress format (You need to
                             have the VisAD package if you want to support
                             this.)  default = none.
   port=                     Socket port to connect on.  Overridden by
                             a port specified in the host
                             (e.g., adde.ucar.edu:500)
 


Field Summary
static String KEY_DESCRIPTOR
          Keyword for dataset descriptor
static String KEY_GROUP
          Keyword for dataset group
 
Fields inherited from class edu.wisc.ssec.mcidas.adde.AddeURL
ADDE_PROTOCOL, ALL, COMPRESS, DEFAULT_VALUE, GZIP, KEY_COMPRESS, KEY_DEBUG, KEY_PORT, KEY_PROJ, KEY_TRACE, KEY_USER, KEY_VERSION, NO, NO_COMPRESS, REQ_ADIR, REQ_AGET, REQ_DATASETINFO, REQ_GDIR, REQ_GGET, REQ_GRIDDATA, REQ_GRIDDIR, REQ_IMAGEDATA, REQ_IMAGEDIR, REQ_LWPR, REQ_MDKS, REQ_OBTEXT, REQ_OBTG, REQ_POINTDATA, REQ_TEXT, REQ_TXTG, REQ_WTXG, REQ_WXTEXT, TRACE_OFF, TRACE_ON, YES
 
Constructor Summary
AddeDatasetURL()
          Create an ADDE URL
AddeDatasetURL(String host, String requestType, String group)
          Create an ADDE Dataset URL from the given spec
AddeDatasetURL(String host, String requestType, String group, String descriptor)
          Create an ADDE Dataset URL from the given spec
AddeDatasetURL(String host, String requestType, String group, String descriptor, String extraKeys)
          Create an ADDE URL from the given spec
 
Method Summary
 String getDescriptor()
          Get the dataset descriptor for this ADDE URL
 String getGroup()
          Get the group for this ADDE URL
protected  String makeQuery()
          Make the query portion of the URL (e.g., key1=value1&key2=value2..)
protected  void parseQuery(String query)
          Parse the query string and set the values accordingly, subclasses should extend to parse their particular keywords
 void setDescriptor(String desc)
          Set the dataset descriptor for this ADDE URL
 void setGroup(String group)
          Set the group for this ADDE URL
 
Methods inherited from class edu.wisc.ssec.mcidas.adde.AddeURL
appendKeyValue, clone, equals, getCompression, getDebug, getExtraKeys, getHost, getPort, getProject, getRequestType, getTrace, getURLString, getUser, getValue, getVersion, hashCode, setCompression, setCompressionFromString, setDebug, setExtraKeys, setHost, setPort, setProject, setRequestType, setTrace, setUser, setVersion
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_GROUP

public static final String KEY_GROUP
Keyword for dataset group

See Also:
Constant Field Values

KEY_DESCRIPTOR

public static final String KEY_DESCRIPTOR
Keyword for dataset descriptor

See Also:
Constant Field Values
Constructor Detail

AddeDatasetURL

public AddeDatasetURL()
Create an ADDE URL


AddeDatasetURL

public AddeDatasetURL(String host,
                      String requestType,
                      String group)
Create an ADDE Dataset URL from the given spec

Parameters:
host - host to send to
requestType - type of request (REQ_*)
group - ADDE group

AddeDatasetURL

public AddeDatasetURL(String host,
                      String requestType,
                      String group,
                      String descriptor)
Create an ADDE Dataset URL from the given spec

Parameters:
host - host to send to
requestType - type of request (REQ_*)
group - ADDE group
descriptor - ADDE descriptor (may be null)

AddeDatasetURL

public AddeDatasetURL(String host,
                      String requestType,
                      String group,
                      String descriptor,
                      String extraKeys)
Create an ADDE URL from the given spec

Parameters:
host - host to send to
requestType - type of request (REQ_*)
group - ADDE group
descriptor - ADDE descriptor (may be null)
extraKeys - extraKeys string (key/value pairs)
Method Detail

makeQuery

protected String makeQuery()
Make the query portion of the URL (e.g., key1=value1&key2=value2..) Subclasses should override.

Overrides:
makeQuery in class AddeURL
Returns:
the query portion of the URL

getGroup

public String getGroup()
Get the group for this ADDE URL

Returns:
the group

setGroup

public void setGroup(String group)
Set the group for this ADDE URL

Parameters:
group - the group

getDescriptor

public String getDescriptor()
Get the dataset descriptor for this ADDE URL

Returns:
the dataset descriptor

setDescriptor

public void setDescriptor(String desc)
Set the dataset descriptor for this ADDE URL

Parameters:
desc - the dataset descriptor

parseQuery

protected void parseQuery(String query)
Parse the query string and set the values accordingly, subclasses should extend to parse their particular keywords

Overrides:
parseQuery in class AddeURL
Parameters:
query - query string