edu.wisc.ssec.mcidas.adde
Class AddeServerInfo
- java.lang.Object
-
- edu.wisc.ssec.mcidas.adde.AddeServerInfo
-
public class AddeServerInfo extends java.lang.ObjectAll things related to ADDE servers, groups and datasets Certain requests are dependent on appropriate prior requests. E.g., must set server, then group, before you can request File Format.
-
-
Constructor Summary
Constructors Constructor and Description AddeServerInfo()Creates new AddeServerInfo.AddeServerInfo(java.lang.String[] l)The non-default parameter is a list of of ADDE servers
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetArchiveDate()AreaDirectory[][]getAreaDirectories()get the sorted list of AreaDirectory objectsjava.lang.String[]getBandNames()return the bandNames textjava.lang.String[]getDatasetList()get a list of all datasets valid for this server and the designated group.java.lang.String[]getDatasetListDescriptions()get a list of all dataset descriptions for this server and the designated groupjava.lang.String[]getDateTimeList()get the valid date-time list for the selected server/group/dataset.java.lang.StringgetFileFormat()Get the File Format (AREA, TEXT, NEXR, etc.) for the currently selected group.java.lang.String[]getGroupList()get a list of all groups valid for this serverbooleangetIsArchive()java.lang.StringgetRequestString(int reqestType)Not used??java.lang.StringgetSelectedServer()get name of the server that has been selected and for which all group and dataset info is currently valid forjava.lang.String[]getServerList()get a list of serversjava.lang.StringgetStatus()get the status of the last requeststatic voidmain(java.lang.String[] args)For testing purposes.voidsetArchiveDate(java.lang.String d)voidsetIsArchive(boolean flag)voidsetSelectedDataset(java.lang.String d)identify the selected datasetvoidsetSelectedGroup(java.lang.String g)identify the selected groupintsetSelectedServer(java.lang.String s, java.lang.String type)define which server to select, and the type of ADDE data group (image, point, grid, text) to get group and descriptor info for This is the workhorse of the code.voidsetUserIDandProjString(java.lang.String up)set the userID and proj number if required for transactions, as required by servers that use accounting.
-
-
-
Constructor Detail
-
AddeServerInfo
public AddeServerInfo()
Creates new AddeServerInfo. This collects information about ADDE server(s) -- their groups, datasets, and date-times (right now only image date-time implemented). This is a helper class for anything else that needs to get these information. The candidate list of ADDE servers should be obtained from a yet-to-be-identified "well-known list", and made available in this class.
-
AddeServerInfo
public AddeServerInfo(java.lang.String[] l)
The non-default parameter is a list of of ADDE servers- Parameters:
l- a list of ADDE servers that can be used in lieu of automatically obtaining it.
-
-
Method Detail
-
getServerList
public java.lang.String[] getServerList()
get a list of servers- Returns:
- names of server hosts
-
getSelectedServer
public java.lang.String getSelectedServer()
get name of the server that has been selected and for which all group and dataset info is currently valid for- Returns:
- name of server host
-
setSelectedServer
public int setSelectedServer(java.lang.String s, java.lang.String type)define which server to select, and the type of ADDE data group (image, point, grid, text) to get group and descriptor info for This is the workhorse of the code.- Parameters:
s- the name of the ADDE server to be selectedtype- the type of data to select.- Returns:
- status code: 0=ok, -1=invalid accounting, -2=didn't get metadata
-
getGroupList
public java.lang.String[] getGroupList()
get a list of all groups valid for this server- Returns:
- array of group ids
-
getDatasetList
public java.lang.String[] getDatasetList()
get a list of all datasets valid for this server and the designated group.- Returns:
- array of dataset tags
-
getDatasetListDescriptions
public java.lang.String[] getDatasetListDescriptions()
get a list of all dataset descriptions for this server and the designated group- Returns:
- array of dataset descriptors
-
getDateTimeList
public java.lang.String[] getDateTimeList()
get the valid date-time list for the selected server/group/dataset. Note that you must 'setSelectedGroup()' and 'setSelectedDataset()' prior to using this method. [Also, Don Murray at Unidata wrote the original - thanks!]- Returns:
- list of date-times ("yy-MM-dd / hh:mm:ss" format) or the string "No data available"
-
getFileFormat
public java.lang.String getFileFormat()
Get the File Format (AREA, TEXT, NEXR, etc.) for the currently selected group.- Returns:
- file format for currently selected group
-
getAreaDirectories
public AreaDirectory[][] getAreaDirectories()
get the sorted list of AreaDirectory objects- Returns:
- list of directories
-
setSelectedGroup
public void setSelectedGroup(java.lang.String g)
identify the selected group- Parameters:
g- the name of the group to select
-
setSelectedDataset
public void setSelectedDataset(java.lang.String d)
identify the selected dataset- Parameters:
d- the name of the dataset/descr to select
-
setIsArchive
public void setIsArchive(boolean flag)
-
getIsArchive
public boolean getIsArchive()
-
setArchiveDate
public void setArchiveDate(java.lang.String d)
-
getArchiveDate
public java.lang.String getArchiveDate()
-
getBandNames
public java.lang.String[] getBandNames()
return the bandNames text- Returns:
- array of text of the SATBAND data fetched from selectedServer
-
getRequestString
public java.lang.String getRequestString(int reqestType)
Not used??
-
setUserIDandProjString
public void setUserIDandProjString(java.lang.String up)
set the userID and proj number if required for transactions, as required by servers that use accounting.- Parameters:
up- the user/project number request string in the form "user=tom&proj=1234"
-
getStatus
public java.lang.String getStatus()
get the status of the last request- Returns:
- words describing last transaction
-
main
public static void main(java.lang.String[] args)
For testing purposes. Edit server, and run the class as if it were an application.
-
-
DMelt 3.0 © DataMelt by jWork.ORG