gate
Class DataStoreRegister

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.HashSet<DataStore>
              extended by gate.DataStoreRegister
All Implemented Interfaces:
Serializable, Cloneable, Iterable<DataStore>, Collection<DataStore>, Set<DataStore>

public class DataStoreRegister
extends HashSet<DataStore>

Records all the open DataStores.

See Also:
Serialized Form

Constructor Summary
DataStoreRegister()
           
 
Method Summary
 boolean add(DataStore o)
          Adds the specified element to this set if it is not already present.
static void addConfig(Map configData)
          Adds configuration data (e.g. from gate.xml files) to the register.
 void addCreoleListener(CreoleListener l)
          Registers a new CreoleListener with this DataStoreRegister.
static void addSecurityData(DataStore ds, Map secData)
          Adds security data for this datastore
 void clear()
          Removes all of the elements from this set.
protected  void fireDatastoreClosed(CreoleEvent e)
          Notifies all registered CreoleListeners that a DataStore has been closed.
protected  void fireDatastoreCreated(CreoleEvent e)
          Notifies all registered CreoleListeners that a new DataStore has been created.
protected  void fireDatastoreOpened(CreoleEvent e)
          Notifies all registered CreoleListeners that a DataStore has been opened.
static Map getConfigData()
          Get the configuration data map.
static Map<String,String> getDataStoreClassNames()
          All the DataStore classes available.
static Map getSecurityData(DataStore ds)
          Returns the security data for this datastore
 boolean remove(Object o)
          Removes the given element from this set if it is present.
 void removeCreoleListener(CreoleListener l)
          Removes a previously registered CreoleListener from the list of listeners for this DataStoreRegister.
static void removeSecurityData(DataStore ds)
          Removes the security data for this datastore
 
Methods inherited from class java.util.HashSet
clone, contains, isEmpty, iterator, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

DataStoreRegister

public DataStoreRegister()
Method Detail

getDataStoreClassNames

public static Map<String,String> getDataStoreClassNames()
All the DataStore classes available. This is a map of class name to descriptive text.


add

public boolean add(DataStore o)
Adds the specified element to this set if it is not already present. Overriden here for event registration code.

Specified by:
add in interface Collection<DataStore>
Specified by:
add in interface Set<DataStore>
Overrides:
add in class HashSet<DataStore>

remove

public boolean remove(Object o)
Removes the given element from this set if it is present. Overriden here for event registration code.

Specified by:
remove in interface Collection<DataStore>
Specified by:
remove in interface Set<DataStore>
Overrides:
remove in class HashSet<DataStore>

clear

public void clear()
Removes all of the elements from this set. Overriden here for event registration code.

Specified by:
clear in interface Collection<DataStore>
Specified by:
clear in interface Set<DataStore>
Overrides:
clear in class HashSet<DataStore>

getConfigData

public static Map getConfigData()
Get the configuration data map.


addConfig

public static void addConfig(Map configData)
Adds configuration data (e.g. from gate.xml files) to the register. New key/value pairs are added to the existing set (this will overwrite existing pairs whose keys match new ones).


getSecurityData

public static Map getSecurityData(DataStore ds)
Returns the security data for this datastore


addSecurityData

public static void addSecurityData(DataStore ds,
                                   Map secData)
Adds security data for this datastore


removeSecurityData

public static void removeSecurityData(DataStore ds)
Removes the security data for this datastore


removeCreoleListener

public void removeCreoleListener(CreoleListener l)
Removes a previously registered CreoleListener from the list of listeners for this DataStoreRegister. Normally the only listener that is registered with the DataStoreRegister is the CreoleRegister which can be obtained through Gate.getCreoleRegister()


addCreoleListener

public void addCreoleListener(CreoleListener l)
Registers a new CreoleListener with this DataStoreRegister. Normally the only listener that is registered with the DataStoreRegister is the CreoleRegister which can be obtained through Gate.getCreoleRegister()


fireDatastoreOpened

protected void fireDatastoreOpened(CreoleEvent e)
Notifies all registered CreoleListeners that a DataStore has been opened. Normally the only listener that is registered with the DataStoreRegister is the CreoleRegister which can be obtained through Gate.getCreoleRegister()


fireDatastoreCreated

protected void fireDatastoreCreated(CreoleEvent e)
Notifies all registered CreoleListeners that a new DataStore has been created. Normally the only listener that is registered with the DataStoreRegister is the CreoleRegister which can be obtained through Gate.getCreoleRegister()


fireDatastoreClosed

protected void fireDatastoreClosed(CreoleEvent e)
Notifies all registered CreoleListeners that a DataStore has been closed. Normally the only listener that is registered with the DataStoreRegister is the CreoleRegister which can be obtained through Gate.getCreoleRegister()