Package edu.wisc.ssec.mcidasv.chooser
Class ServerInfo
java.lang.Object
edu.wisc.ssec.mcidasv.chooser.ServerInfo
ServerInfo objects have methods for accessing the contents of
servers.xml.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringattributesstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate String[]private Listprivate ucar.unidata.idv.IntegratedDataViewerprivate static Stringprivate Listprivate Documentprivate Elementprivate ucar.unidata.xml.XmlResourceCollectionstatic final Stringstatic final Stringtagsstatic final Stringprivate Listprivate static String -
Constructor Summary
ConstructorsConstructorDescriptionServerInfo(ucar.unidata.idv.IntegratedDataViewer idv, ucar.unidata.xml.XmlResourceCollection servers) Creates a newServerInfoobject. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddServers(ucar.unidata.idv.IntegratedDataViewer idv, List serverList) AddsserverListtoservers.xml.voidclear(ucar.unidata.xml.XmlResourceCollection serversXRC) Clearservers.xml.getAddeServers(String type, boolean all, boolean includeDuplicates) Get list ofAddeServersthat matchtype.Get all group names for a given datatype.getProj()Return project number, default="0"getServerNames(String type, boolean all, boolean includeDuplicates) Get list of server names that matchtype.getServers(String type, boolean all, boolean includeDuplicates) Get list ofServerDescriptorsthat match the giventype.private voidgetServersFromXml(ucar.unidata.xml.XmlResourceCollection servers) Read and parse servers.xml.Get the different "types" supported by the server.getUser()Return userId, default="idv".private booleaninit()Read servers.xml and initialize all lists.voidsetUserProj(String user, String proj) Change the user id and project number for this instance.updateAddeServers(String type, boolean all, boolean includeDuplicates) Re-readsservers.xmland re-initialize all lists.
-
Field Details
-
myIdv
-
TAG_SERVER
tags- See Also:
-
TAG_SERVERS
- See Also:
-
TAG_GROUP
- See Also:
-
ATTR_ACTIVE
attributes- See Also:
-
ATTR_NAME
- See Also:
-
ATTR_NAMES
- See Also:
-
ATTR_USER
- See Also:
-
ATTR_PROJ
- See Also:
-
ATTR_TYPE
- See Also:
-
serversXRC
-
serversDocument
-
serversRoot
-
user
-
proj
-
typeList
-
groups
-
serverDescriptors
-
defTypes
-
-
Constructor Details
-
ServerInfo
public ServerInfo(ucar.unidata.idv.IntegratedDataViewer idv, ucar.unidata.xml.XmlResourceCollection servers) Creates a newServerInfoobject.- Parameters:
idv- Reference to the main application object.servers- ADDE server definitions.
-
-
Method Details
-
getServersFromXml
Read and parse servers.xml.- Parameters:
servers- Collection of ADDE server definitions.
-
getUser
Return userId, default="idv".- Returns:
- User ID. Default value is
"idv".
-
getProj
Return project number, default="0"- Returns:
- Project number. Default value is
"0".
-
setUserProj
Change the user id and project number for this instance.- Parameters:
user- New user ID.proj- New project number.
-
getServerTypes
Get the different "types" supported by the server.- Returns:
- A list whose possible values may contain "image", "point", "grid", "text", "nav".
-
getServers
Get list ofServerDescriptorsthat match the giventype.- Parameters:
type- Data type. Should be one of "image", "point", "grid", "text", "nav".all- Includes all definitions, even duplicates.includeDuplicates- Whether or not duplicate definitions are included.- Returns:
- List of
ServerDescriptorobjects that matchtype.
-
getServerNames
Get list of server names that matchtype.- Parameters:
type- Data type. Should be one of "image", "point", "grid", "text", "nav".all- Includes all definitions, even duplicates.includeDuplicates- Whether or not duplicate definitions are included.- Returns:
- List of server name strings.
-
getAddeServers
Get list ofAddeServersthat matchtype.- Parameters:
type- Data type. Should be one of "image", "point", "grid", "text", "nav".all- Includes all definitions, even duplicates.includeDuplicates- Whether or not duplicate definitions are included.- Returns:
- List of
AddeServerobjects.
-
updateAddeServers
Re-readsservers.xmland re-initialize all lists.- Parameters:
type- Data type. Should be one of "image", "point", "grid", "text", "nav".all- Includes all definitions, even duplicates.includeDuplicates- Whether or not duplicate definitions are included.- Returns:
- List of server name strings that support
typedata.
-
init
Read servers.xml and initialize all lists.- Returns:
falseifserverDescriptorsisnull,trueotherwise.
-
getGroups
Get all group names for a given datatype.- Parameters:
type- Data type. Should be one of "image", "point", "grid", "text", "nav".- Returns:
- List of groups that support
typedata.
-
addServers
AddsserverListtoservers.xml.- Parameters:
idv- Reference to main application object.serverList- alternating strings: name1, group1, name2, group2...
-
clear
Clearservers.xml.- Parameters:
serversXRC- Collection of server definitions.
-