com.isti.util.gis
Class IstiRegionMgrImpl

java.lang.Object
  extended by com.isti.util.gis.IstiRegionMgrImpl
All Implemented Interfaces:
IstiRegionMgrIntf

public class IstiRegionMgrImpl
extends java.lang.Object
implements IstiRegionMgrIntf

Class IstiRegionMgrImpl is implementation of methods for managing a collection of GIS regions. One main collection and any number of auxiliary collections are supported.


Field Summary
protected  java.util.List allRegionObjsList
          List of region objects for global and recipient alarm regions.
protected  IstiRegion[] globalRegionObjsArray
          Array of region objects for global alarm regions.
protected  java.util.Hashtable recipientRegionObjsTable
          List of region-text strings for alert recipients.
protected  java.lang.String regionsTextValueStr
          The string representation of the regions.
 
Constructor Summary
IstiRegionMgrImpl()
           
 
Method Summary
 java.lang.String checkGenerateRegionName(java.lang.String baseNameStr)
          Appends a numeric-suffix value to the given name string such that the result name does not duplicate any existing region name.
protected  void generateRegionObjects()
          Generates region objects via the regions text.
 java.util.List getAllRegionNamesList()
          Returns a list of region-name strings, with an entry for each current global and recipient region.
 int getAllRegionsCount()
          Returns a count of the total number of current global and recipient regions.
 java.util.Vector getAllRegionStrsList()
          Returns a list of region strings, with an entry for each current global and recipient region.
 IstiRegion[] getMainRegionObjs()
          Returns the main collection of regions.
 java.lang.String getMainRegionsStr()
          Returns the main collection of regions.
 void setMainRegionsStr(java.lang.String regionsStr)
          Sets the main collection of regions.
 void updateAuxRegionsEntry(java.lang.Object keyObj, IstiRegion[] regionsArr)
          Updates an auxiliary region.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regionsTextValueStr

protected java.lang.String regionsTextValueStr
The string representation of the regions.


globalRegionObjsArray

protected IstiRegion[] globalRegionObjsArray
Array of region objects for global alarm regions.


recipientRegionObjsTable

protected java.util.Hashtable recipientRegionObjsTable
List of region-text strings for alert recipients.


allRegionObjsList

protected java.util.List allRegionObjsList
List of region objects for global and recipient alarm regions.

Constructor Detail

IstiRegionMgrImpl

public IstiRegionMgrImpl()
Method Detail

setMainRegionsStr

public void setMainRegionsStr(java.lang.String regionsStr)
Sets the main collection of regions.

Specified by:
setMainRegionsStr in interface IstiRegionMgrIntf
Parameters:
regionsStr - string representation of the regions to be set.

getMainRegionsStr

public java.lang.String getMainRegionsStr()
Returns the main collection of regions.

Specified by:
getMainRegionsStr in interface IstiRegionMgrIntf
Returns:
A string representation of the regions.

getMainRegionObjs

public IstiRegion[] getMainRegionObjs()
Returns the main collection of regions.

Specified by:
getMainRegionObjs in interface IstiRegionMgrIntf
Returns:
An array containing the region objects.

updateAuxRegionsEntry

public void updateAuxRegionsEntry(java.lang.Object keyObj,
                                  IstiRegion[] regionsArr)
Updates an auxiliary region. If a region array exists for the given key then it is replaced.

Specified by:
updateAuxRegionsEntry in interface IstiRegionMgrIntf
Parameters:
keyObj - keyObj object associated with region.
regionsArr - array to region objects to be entered, or null or empty array to delete the entry for the given key.

getAllRegionsCount

public int getAllRegionsCount()
Returns a count of the total number of current global and recipient regions.

Specified by:
getAllRegionsCount in interface IstiRegionMgrIntf
Returns:
A count of the total number of current global and recipient regions.

getAllRegionStrsList

public java.util.Vector getAllRegionStrsList()
Returns a list of region strings, with an entry for each current global and recipient region.

Specified by:
getAllRegionStrsList in interface IstiRegionMgrIntf
Returns:
A new Vector object containing the region strings (empty list if no regions are available).

getAllRegionNamesList

public java.util.List getAllRegionNamesList()
Returns a list of region-name strings, with an entry for each current global and recipient region.

Specified by:
getAllRegionNamesList in interface IstiRegionMgrIntf
Returns:
A new Vector object containing the region-name strings (empty list if no regions are available).

checkGenerateRegionName

public java.lang.String checkGenerateRegionName(java.lang.String baseNameStr)
Appends a numeric-suffix value to the given name string such that the result name does not duplicate any existing region name.

Specified by:
checkGenerateRegionName in interface IstiRegionMgrIntf
Parameters:
baseNameStr - base name string to use.
Returns:
A new region-name string.

generateRegionObjects

protected void generateRegionObjects()
Generates region objects via the regions text.