com.isti.trinetwatch.server
Class VotableGroupTable

java.lang.Object
  extended by com.isti.trinetwatch.server.VotableGroupTable
All Implemented Interfaces:
GroupTableInfo

public class VotableGroupTable
extends java.lang.Object
implements GroupTableInfo

Class VotableGroupTable manages a table of station groups that match a given votable criteria.


Constructor Summary
VotableGroupTable(StationTable mainStationsTable, java.util.Enumeration levelObjsEnum)
          Creates a manager for a table of station groups that match a given votable criteria.
 
Method Summary
 java.util.Enumeration elements()
          Returns an enumeration of the 'StationTable' objects in the table.
 java.lang.String getStationsString(int compCode, java.lang.String groupName)
          Returns a String of names of stations associated with the given group name, via the given comparison code.
 StationTable getStationsTable(int compCode, java.lang.String groupName)
          Returns the StationTable associated with the given group name, via the given comparison code.
 java.util.Enumeration keys()
          Returns an enumeration of group name keys.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VotableGroupTable

public VotableGroupTable(StationTable mainStationsTable,
                         java.util.Enumeration levelObjsEnum)
Creates a manager for a table of station groups that match a given votable criteria.

Parameters:
mainStationsTable - "main" table of all stations for server.
levelObjsEnum - Enumeration of status-level-tag objects.
Method Detail

elements

public java.util.Enumeration elements()
Returns an enumeration of the 'StationTable' objects in the table. For this class, an enumeration of all stations for the server is returned.

Specified by:
elements in interface GroupTableInfo
Returns:
an enumeration of the 'StationTable' objects in the table.

getStationsTable

public StationTable getStationsTable(int compCode,
                                     java.lang.String groupName)
Returns the StationTable associated with the given group name, via the given comparison code.

Specified by:
getStationsTable in interface GroupTableInfo
Parameters:
compCode - the comparison code associated with the group name (one of the GUIServicesDefines "PROP_CODE_..." values).
groupName - level and parameter-name string, in the form "level;name".
Returns:
The associated StationTable object; or null if none found.

getStationsString

public java.lang.String getStationsString(int compCode,
                                          java.lang.String groupName)
Returns a String of names of stations associated with the given group name, via the given comparison code.

Specified by:
getStationsString in interface GroupTableInfo
Parameters:
compCode - the comparison code associated with the group name (one of the GUIServicesDefines "PROP_CODE_..." values).
groupName - name of the group to get.
Returns:
A String of station name strings, each surrounded by double-quotes and separated by a comma; or an empty String if no station names could be generated.

keys

public java.util.Enumeration keys()
Returns an enumeration of group name keys.

Specified by:
keys in interface GroupTableInfo
Returns:
an enumeration of group name keys.