edu.wisc.ssec.mcidasv.chooser
Class ServerInfo

java.lang.Object
  extended by edu.wisc.ssec.mcidasv.chooser.ServerInfo

public class ServerInfo
extends Object

Class ServerInfo Holds has methods for accessing the contents of servers.xml


Field Summary
static String ATTR_ACTIVE
          attributes
static String ATTR_NAME
           
static String ATTR_NAMES
           
static String ATTR_PROJ
           
static String ATTR_TYPE
           
static String ATTR_USER
           
private  String[] defTypes
           
private  List groups
           
private  IntegratedDataViewer myIdv
           
private static String proj
           
private  List serverDescriptors
           
private  Document serversDocument
           
private  Element serversRoot
           
private  XmlResourceCollection serversXRC
           
static String TAG_GROUP
           
static String TAG_SERVER
          tags
static String TAG_SERVERS
           
private  List typeList
           
private static String user
           
 
Constructor Summary
ServerInfo(IntegratedDataViewer idv, XmlResourceCollection servers)
          Constructor
 
Method Summary
 void addServers(IntegratedDataViewer idv, List serverList)
          addServers to servers.xml input: type = data type serverList = alternating strings: name1, group1, name2, group2, etc.
 void clear(XmlResourceCollection serversXRC)
          Clear servers.xml
 List getAddeServers(String type, boolean all, boolean includeDuplicates)
          getAddeServers input: type = data type all = boolean flag includeDuplicates = boolean flag return List of server name strings
 List getGroups(String type)
          getGroups - return all groups for a given data type return List of group name Strings
 String getProj()
          getProj return project number, default="0"
 List getServerNames(String type, boolean all, boolean includeDuplicates)
          getServerNames input: type = data type all = boolean flag includeDuplicates = boolean flag return List of server name strings
 List getServers(String type, boolean all, boolean includeDuplicates)
          getServers input: type = data type all = boolean flag includeDuplicates = boolean flag return List of ServerDescriptors
private  void getServersFromXml(XmlResourceCollection servers)
          getServersFromXml Read and parse servers.xml fill lists: typeList - type name Strings
 List getServerTypes()
          getServerTypes return List of type Strings
 String getUser()
          getUser return userId, default="idv"
private  boolean init()
          init read servers.xml and initialize all Lists
 void setUserProj(String user, String proj)
           
 List updateAddeServers(String type, boolean all, boolean includeDuplicates)
          updateAddeServers(String type, boolean all, boolean includeDuplicates) { input: type = data type all = boolean flag includeDuplicates = boolean flag return List of server name strings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myIdv

private IntegratedDataViewer myIdv

TAG_SERVER

public static final String TAG_SERVER
tags

See Also:
Constant Field Values

TAG_SERVERS

public static final String TAG_SERVERS
See Also:
Constant Field Values

TAG_GROUP

public static final String TAG_GROUP
See Also:
Constant Field Values

ATTR_ACTIVE

public static final String ATTR_ACTIVE
attributes

See Also:
Constant Field Values

ATTR_NAME

public static final String ATTR_NAME
See Also:
Constant Field Values

ATTR_NAMES

public static final String ATTR_NAMES
See Also:
Constant Field Values

ATTR_USER

public static final String ATTR_USER
See Also:
Constant Field Values

ATTR_PROJ

public static final String ATTR_PROJ
See Also:
Constant Field Values

ATTR_TYPE

public static final String ATTR_TYPE
See Also:
Constant Field Values

serversXRC

private XmlResourceCollection serversXRC

serversDocument

private Document serversDocument

serversRoot

private Element serversRoot

user

private static String user

proj

private static String proj

typeList

private List typeList

groups

private List groups

serverDescriptors

private List serverDescriptors

defTypes

private String[] defTypes
Constructor Detail

ServerInfo

public ServerInfo(IntegratedDataViewer idv,
                  XmlResourceCollection servers)
Constructor

Method Detail

getServersFromXml

private void getServersFromXml(XmlResourceCollection servers)
getServersFromXml Read and parse servers.xml fill lists: typeList - type name Strings


getUser

public String getUser()
getUser return userId, default="idv"


getProj

public String getProj()
getProj return project number, default="0"


setUserProj

public void setUserProj(String user,
                        String proj)

getServerTypes

public List getServerTypes()
getServerTypes return List of type Strings


getServers

public List getServers(String type,
                       boolean all,
                       boolean includeDuplicates)
getServers input: type = data type all = boolean flag includeDuplicates = boolean flag return List of ServerDescriptors


getServerNames

public List getServerNames(String type,
                           boolean all,
                           boolean includeDuplicates)
getServerNames input: type = data type all = boolean flag includeDuplicates = boolean flag return List of server name strings


getAddeServers

public List getAddeServers(String type,
                           boolean all,
                           boolean includeDuplicates)
getAddeServers input: type = data type all = boolean flag includeDuplicates = boolean flag return List of server name strings


updateAddeServers

public List updateAddeServers(String type,
                              boolean all,
                              boolean includeDuplicates)
updateAddeServers(String type, boolean all, boolean includeDuplicates) { input: type = data type all = boolean flag includeDuplicates = boolean flag return List of server name strings


init

private boolean init()
init read servers.xml and initialize all Lists


getGroups

public List getGroups(String type)
getGroups - return all groups for a given data type return List of group name Strings


addServers

public void addServers(IntegratedDataViewer idv,
                       List serverList)
addServers to servers.xml input: type = data type serverList = alternating strings: name1, group1, name2, group2, etc.


clear

public void clear(XmlResourceCollection serversXRC)
Clear servers.xml