edu.wisc.ssec.mcidas.adde
Class DataSetInfo
- java.lang.Object
-
- edu.wisc.ssec.mcidas.adde.DataSetInfo
-
public class DataSetInfo extends java.lang.ObjectDataSetInfo interface for McIDAS ADDE data sets. Simulates a McIDAS DSINFO request using an ADDE URL.URLs must all have the following format adde://host/datasetinfo?keyword_1=value_1&keyword_2=value_2 there can be any valid combination of the following supported keywords: group - ADDE group name type - ADDE data type. Must be one of the following: image, point, grid, text, nav the default is the image type. the following keywords are required: group an example URL might look like: adde://viper/datasetinfo?group=gvar&type=image
-
-
Constructor Summary
Constructors Constructor and Description DataSetInfo(java.lang.String request)creates a DataSetInfo object that allows reading
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.List<java.lang.String>getCommentList()Returns the list of descriptor contents.char[]getData()Return the data sent by the serverjava.util.HashtablegetDescriptionTable()Return a hashtable of descriptive names and ADDE dataset descriptors Descriptive names are the keys.java.util.List<java.lang.String>getDescriptorList()Returns the list of descriptors.java.lang.String[]getDescriptors()Return a sorted list of the dataset descriptorsstatic voidmain(java.lang.String[] args)test by running 'java edu.wisc.ssec.mcidas.adde.DataSetInfo'java.lang.StringtoString()Return a formated string of the returned data
-
-
-
Constructor Detail
-
DataSetInfo
public DataSetInfo(java.lang.String request) throws AddeURLExceptioncreates a DataSetInfo object that allows reading- Parameters:
request- ADDE URL to read from. See class javadoc.an example URL might look like: adde://viper/datasetinfo?group=gvar&type=image
- Throws:
AddeURLException- if there are no datasets of the particular type or there is an error reading data
-
-
Method Detail
-
getDescriptorList
public java.util.List<java.lang.String> getDescriptorList()
Returns the list of descriptors.- Returns:
- Either an ArrayList or
null. Note that if anArrayListis returned, it should have the same number of elements as the results ofgetCommentList().
-
getCommentList
public java.util.List<java.lang.String> getCommentList()
Returns the list of descriptor contents.- Returns:
- Either an
ArrayListornull. Note that if anArrayListis returned, it should have the same number of elements as the results ofgetDescriptorList().
-
getData
public char[] getData() throws AddeURLExceptionReturn the data sent by the server- Returns:
- array of the data. Data is in the format of a McIDAS DSINFO (LWPR) request.
- Throws:
AddeURLException- if there was an error reading data
-
getDescriptionTable
public java.util.Hashtable getDescriptionTable() throws AddeURLExceptionReturn a hashtable of descriptive names and ADDE dataset descriptors Descriptive names are the keys. If there is no descriptive name, the dataset descriptor is used.- Returns:
- hashtable of names/desciptors
- Throws:
AddeURLException- if there was an error reading data
-
getDescriptors
public java.lang.String[] getDescriptors() throws AddeURLExceptionReturn a sorted list of the dataset descriptors- Returns:
- sorted list
- Throws:
AddeURLException- if there was an error reading data
-
toString
public java.lang.String toString()
Return a formated string of the returned data- Overrides:
toStringin classjava.lang.Object- Returns:
- formatted string representing the data.
-
main
public static void main(java.lang.String[] args) throws java.lang.Exceptiontest by running 'java edu.wisc.ssec.mcidas.adde.DataSetInfo'- Throws:
java.lang.Exception
-
-
DMelt 3.0 © DataMelt by jWork.ORG