public class ServerQuery
extends java.lang.Object
The specifics of the query are handled using a set of key/value pairs specified by a map. Each key and value in the map is expected to be a string. The allowed key/values pairs are as follows:
datasetDetails
| serverStatus
swath
| mapped
yyyy-mm-dd hh:mm:ss
time stamp yyyy-mm-dd hh:mm:ss
time stamp satellite
sensor
date
time
scene_time
file_name
format
data_url
preview_url
Constructor and Description |
---|
ServerQuery(java.lang.String host,
java.lang.String path,
java.util.Map query)
Creates a new server query using the server host, query path, and
query key/value set.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHost()
Gets the host name used for the query.
|
int |
getResults()
Gets the number of query results.
|
java.lang.String |
getURL()
Gets the query URL as a string.
|
java.lang.String |
getValue(int result,
int value)
Gets a result value.
|
java.lang.String |
getValue(int result,
java.lang.String valueKey)
Gets a result value.
|
int |
getValueIndex(java.lang.String valueKey)
Gets the value index using the specified value key.
|
java.lang.String |
getValueKey(int value)
Gets the value key at the specified value index.
|
int |
getValues()
Gets the number of values in each result.
|
public ServerQuery(java.lang.String host, java.lang.String path, java.util.Map query) throws java.io.IOException
host
- the server host name to use for the query. The
host name must be a valid Internet domain name.path
- the absolute path to the query program.query
- a map containing the query key/value pairs.java.io.IOException
- if the host, path, or query were not valid or
the server responded with an error.public int getValues()
public java.lang.String getValueKey(int value)
value
- the value index.public int getResults()
public java.lang.String getValue(int result, int value)
result
- the result index.value
- the value index.public int getValueIndex(java.lang.String valueKey)
valueKey
- the value key to find.public java.lang.String getValue(int result, java.lang.String valueKey)
result
- the result index.valueKey
- the value key.public java.lang.String getHost()
public java.lang.String getURL()