Package ucar.unidata.idv.chooser.adde
Class AddeServer
java.lang.Object
ucar.unidata.util.NamedThing
ucar.unidata.idv.chooser.adde.AddeServer
- All Implemented Interfaces:
NamedObject
Holds information about the available adde servers
- Version:
- $Revision: 1.4 $Date: 2007/07/19 18:11:33 $
- Author:
- IDV development team
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass Group represents an adde group -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionctorAddeServer(String name) ctorAddeServer(String name, String description) ctor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGroup(AddeServer.Group group) Add the group to mevoidAdd the list of groupsstatic ListMerge all of the similarly named servers in the listbooleanequalsFind the group with the given namestatic AddeServerfindServer(List servers, String name) Find the server with the given name in the given listbooleanGet the Active property.Get the Groups property.getGroupsWithType(String type) Get the groups with the given typegetGroupsWithType(String type, boolean onlyActive) Get the groups with the given typebooleanGet the IsLocal property.static ListgetServersWithType(String type, List servers) Find the list of servers that have at least one group with the given typebooleanDoes this server have a group with the given typestatic voidteststatic ListprocessXml(Element root) process the xml rootvoidsetActive(boolean value) Set the Active property.voidSet the Groups property.voidsetIsLocal(boolean value) Set the IsLocal property.static ElementCreate the xml tree for all of the given serversMethods inherited from class ucar.unidata.util.NamedThing
getDescription, getName, hashCode, setDescription, setName, toString
-
Field Details
-
TYPE_NONE
group type- See Also:
-
TYPE_ANY
group type- See Also:
-
TYPE_IMAGE
image type- See Also:
-
TYPE_RADAR
radar type- See Also:
-
TYPE_POINT
point type- See Also:
-
TYPE_WXTEXT
text type- See Also:
-
-
Constructor Details
-
AddeServer
public AddeServer()ctor -
AddeServer
ctor- Parameters:
name- my name
-
AddeServer
ctor- Parameters:
name- my namedescription- my description
-
-
Method Details
-
toXml
Create the xml tree for all of the given servers- Parameters:
servers- List of serverslocalOnly- Only include servers and groups that are marked as local- Returns:
- xml root
- Throws:
Exception- On badness
-
coalesce
Merge all of the similarly named servers in the list- Parameters:
servers- list of servers- Returns:
- merged servers
-
processXml
process the xml root- Parameters:
root- The xml node- Returns:
- List of servers
-
findServer
Find the server with the given name in the given list- Parameters:
servers- List of serversname- name- Returns:
- The found server or null
-
getServersWithType
Find the list of servers that have at least one group with the given type- Parameters:
type- group typeservers- servers- Returns:
- servers with group of type type
-
setIsLocal
public void setIsLocal(boolean value) Set the IsLocal property.- Parameters:
value- The new value for IsLocal
-
getIsLocal
public boolean getIsLocal()Get the IsLocal property.- Returns:
- The IsLocal
-
setActive
public void setActive(boolean value) Set the Active property.- Parameters:
value- The new value for Active
-
getActive
public boolean getActive()Get the Active property.- Returns:
- The Active
-
hasType
Does this server have a group with the given type- Parameters:
type- group type- Returns:
- has type
-
addGroup
Add the group to me- Parameters:
group- new group
-
addGroups
Add the list of groups- Parameters:
groupsToAdd- list of groups
-
setGroups
Set the Groups property.- Parameters:
value- The new value for Groups
-
getGroups
Get the Groups property.- Returns:
- The Groups
-
findGroup
Find the group with the given name- Parameters:
name- group name- Returns:
- The group with name or null
-
getGroupsWithType
Get the groups with the given type- Parameters:
type- group type- Returns:
- List of groups
-
getGroupsWithType
Get the groups with the given type- Parameters:
type- group typeonlyActive- If true then only get the active groups- Returns:
- List of groups
-
equals
equals- Overrides:
equalsin classNamedThing- Parameters:
o- object- Returns:
- equals
-
main
test- Parameters:
args- args
-