|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.wisc.ssec.mcidas.adde.AddeURL
public class AddeURL
A class for holding information about an ADDE URL.
URLs must all have the following format: adde://host/request?keyword_1=value_1&keyword_2=value_2 where request can be one of the following: datasetinfo - request for data set information (LWPR) griddirectory - request for grid directory information (GDIR) griddata - request for grid data (GGET) imagedata - request for data in AreaFile format (AGET) imagedirectory - request for image directory information (ADIR) pointdata - request for point data (MDKS) textdata - request to read a text file (TXTG) wxtext - request to read a weather text file (WTXG) obtext - request to read a observation text file (OBTG) There can be any valid combination of the following supported keywords: -------for any request group=<groupname> ADDE group name 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 |
ADDE_PROTOCOL
The protocol |
static String |
ALL
Value for ALL |
static int |
COMPRESS
Flag for "compress" compression. |
static String |
DEFAULT_VALUE
Default value for key/value pairs (X) |
static int |
GZIP
Flag for GZip compression. |
static String |
KEY_COMPRESS
Keyword for compress |
static String |
KEY_DEBUG
Keyword for debug |
static String |
KEY_PORT
Keyword for port |
static String |
KEY_PROJ
Keyword for project |
static String |
KEY_TRACE
Keyword for trace |
static String |
KEY_USER
Keyword for user |
static String |
KEY_VERSION
Keyword for version |
static String |
NO
Value for no |
static int |
NO_COMPRESS
Flag for "no compress" compression. |
static String |
REQ_ADIR
ADIR request type |
static String |
REQ_AGET
AGET request type |
static String |
REQ_DATASETINFO
Data set info request type |
static String |
REQ_GDIR
GDIR request type |
static String |
REQ_GGET
GGET request type |
static String |
REQ_GRIDDATA
Grid data request type |
static String |
REQ_GRIDDIR
Grid directory request type |
static String |
REQ_IMAGEDATA
Image data request type |
static String |
REQ_IMAGEDIR
Image directory request type |
static String |
REQ_LWPR
LWPR request type |
static String |
REQ_MDKS
MDKS request type |
static String |
REQ_OBTEXT
obs text request type |
static String |
REQ_OBTG
OBTG request type |
static String |
REQ_POINTDATA
Point data request type |
static String |
REQ_TEXT
Text request type |
static String |
REQ_TXTG
TXTG request type |
static String |
REQ_WTXG
WTXG request type |
static String |
REQ_WXTEXT
weather text request type |
static int |
TRACE_OFF
flag for trace off |
static int |
TRACE_ON
flag for trace on |
static String |
YES
Value for yes |
Constructor Summary | |
---|---|
AddeURL()
Create an ADDE URL |
|
AddeURL(String host,
String requestType)
Create an ADDE URL from the given spec |
|
AddeURL(String host,
String requestType,
String extraKeys)
Create an ADDE URL from the given spec |
Method Summary | |
---|---|
protected void |
appendKeyValue(StringBuffer buf,
String name,
String value)
A utility method to make a name=value part of the adde request string |
Object |
clone()
Clones this instance. |
boolean |
equals(Object o)
Compare two AddeURLs |
int |
getCompression()
Get the compression type for this ADDE URL |
boolean |
getDebug()
Get the debug value for this ADDE URL |
String |
getExtraKeys()
Get the extraKeys string for this ADDE URL |
String |
getHost()
Get the host for this ADDE URL |
int |
getPort()
Get the port for this ADDE URL |
int |
getProject()
Get the project for this ADDE URL |
String |
getRequestType()
Get the request type for this ADDE URL |
int |
getTrace()
Get the trace value used for this ADDE URL |
String |
getURLString()
Create the ADDE URL as a String |
String |
getUser()
Get the project for this ADDE URL |
String |
getValue(String query,
String key)
Get the value for a particular key. |
String |
getVersion()
Get the version for this ADDE URL |
int |
hashCode()
Get the hashcode for this |
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 |
setCompression(int compress)
Set the compression type used for this ADDE URL |
void |
setCompressionFromString(String type)
Set the compression type from a string |
void |
setDebug(boolean debug)
Set the debug value this ADDE URL |
void |
setExtraKeys(String extraKeys)
Set the extraKeys string for this ADDE URL |
void |
setHost(String host)
Set the host for this ADDE URL |
void |
setPort(int port)
Set the port used for this ADDE URL |
void |
setProject(int project)
Set the project for this ADDE URL |
void |
setRequestType(String requestType)
Set the request type for this ADDE URL |
void |
setTrace(int trace)
Set the trace value used for this ADDE URL |
void |
setUser(String user)
Set the user for this ADDE URL |
void |
setVersion(String version)
Set the version this ADDE URL |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ADDE_PROTOCOL
public static final String REQ_AGET
public static final String REQ_ADIR
public static final String REQ_LWPR
public static final String REQ_GDIR
public static final String REQ_GGET
public static final String REQ_MDKS
public static final String REQ_TXTG
public static final String REQ_WTXG
public static final String REQ_OBTG
public static final String REQ_IMAGEDATA
public static final String REQ_IMAGEDIR
public static final String REQ_DATASETINFO
public static final String REQ_TEXT
public static final String REQ_WXTEXT
public static final String REQ_OBTEXT
public static final String REQ_GRIDDATA
public static final String REQ_GRIDDIR
public static final String REQ_POINTDATA
public static final String DEFAULT_VALUE
public static final String YES
public static final String NO
public static final String ALL
public static final String KEY_TRACE
public static final String KEY_DEBUG
public static final String KEY_PORT
public static final String KEY_PROJ
public static final String KEY_USER
public static final String KEY_COMPRESS
public static final String KEY_VERSION
public static final int COMPRESS
public static final int NO_COMPRESS
public static final int GZIP
public static final int TRACE_ON
public static final int TRACE_OFF
Constructor Detail |
---|
public AddeURL()
public AddeURL(String host, String requestType)
host
- host to send torequestType
- type of request (REQ_*)public AddeURL(String host, String requestType, String extraKeys)
host
- host to send torequestType
- type of request (REQ_*)extraKeys
- extra key/value argumentsMethod Detail |
---|
public String getURLString()
protected String makeQuery()
protected void parseQuery(String query)
query
- query stringpublic String getValue(String query, String key)
query
- the query stringkey
- the key to search
protected void appendKeyValue(StringBuffer buf, String name, String value)
buf
- The buffer to append toname
- The property namevalue
- The valuepublic boolean equals(Object o)
equals
in class Object
o
- Object in question
public int hashCode()
hashCode
in class Object
public String getHost()
public void setHost(String host)
host
- the hostpublic String getRequestType()
public void setRequestType(String requestType)
requestType
- the request Typepublic String getExtraKeys()
public void setExtraKeys(String extraKeys)
extraKeys
- the extraKeyspublic String getUser()
public void setUser(String user)
user
- the userpublic int getProject()
public void setProject(int project)
project
- the projectpublic String getVersion()
public void setVersion(String version)
version
- the versionpublic boolean getDebug()
public void setDebug(boolean debug)
debug
- the debug value (true or false);public int getPort()
public void setPort(int port)
port
- the portpublic int getCompression()
public void setCompression(int compress)
compress
- the compression type (GZIP, NO_COMPRESS, COMPRESS)public int getTrace()
public void setTrace(int trace)
trace
- the trace value (TRACE_ON, TRACE_OFF)public void setCompressionFromString(String type)
type
- the string typepublic Object clone() throws CloneNotSupportedException
This implementation never throws CloneNotSupportException
clone
in class Object
CloneNotSupportedException
- if cloning isn't supported.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |