ru.biosoft.access
Class DataCollectionUnion2

java.lang.Object
  extended byru.biosoft.access.DataElementSupport
      extended byru.biosoft.access.AbstractDataCollection
          extended byru.biosoft.access.VectorDataCollection
              extended byru.biosoft.access.DataCollectionUnion2
All Implemented Interfaces:
CollectionUnion, DataCollection, DataCollectionListener, DataElement, java.util.EventListener

public class DataCollectionUnion2
extends VectorDataCollection
implements DataCollectionListener, CollectionUnion

To do:
HIGH Comment

Field Summary
protected  java.util.ArrayList children
           
 
Fields inherited from class ru.biosoft.access.VectorDataCollection
INITIAL_SIZE, vector
 
Fields inherited from class ru.biosoft.access.AbstractDataCollection
cat, info, notificationEnabled, path, propagationEnabled, v_cache
 
Fields inherited from interface ru.biosoft.access.DataCollection
CHILDREN_NODE_IMAGE, CHILDREN_NODE_VISIBLE, CLASS_PROPERTY, CLASSPATH_JAR_PROPERTY, COMPARATOR_OBJECT, CONFIG_FILE_PROPERTY, CONFIG_PATH_PROPERTY, DATA_ELEMENT_CLASS_PROPERTY, DEFAULT_CONFIG_FILE, DEFAULT_CONFIG_SUFFIX, DEFAULT_FILTER_CONFIG_SUFFIX, DEFAULT_FORMAT_CONFIG_SUFFIX, DEFAULT_NODE_CONFIG_SUFFIX, DEFAULT_REPOSITORY, DESCRIPTION_PROPERTY, DISPLAY_NAME_PROPERTY, FILE_PATH_PROPERTY, FILE_PROPERTY, FILTER_PROPERTY, ID_FORMAT, IS_ROOT, JOB_CONTROL_PROPERTY, LATE_CHILDREN_INITIALIZATION, MUTABLE, NAME_PROPERTY, NEXT_CONFIG, NODE_IMAGE, NODE_VISIBLE, PRIMARY_COLLECTION, REMOVE_CHILDREN, TRANSFORMER_CLASS
 
Constructor Summary
DataCollectionUnion2(DataCollection[] collections, java.util.Properties properties)
           
DataCollectionUnion2(DataCollection dc, java.util.Properties properties)
           
 
Method Summary
 void addCollection(DataCollection child)
          Add all elements from specified collection to union.
 void close()
          Closes data collection, releases all resources.
 void elementAdded(DataCollectionEvent event)
          Called after data element was added.
 void elementChanged(DataCollectionEvent event)
          Called after data element was changed.
 void elementRemoved(DataCollectionEvent event)
          Called after data element was removed.
 void elementWillAdd(DataCollectionEvent event)
          Called before data element will be added.
 void elementWillChange(DataCollectionEvent event)
          Called before data element will be changed.
 void elementWillRemove(DataCollectionEvent event)
          Called before data element will be removed.
 DataElement get(java.lang.String name)
          Returns the DataElement with the specified name.
 DataElement put(DataElement de)
          Adds the specified data element to the collection.
 void removeCollection(java.lang.String name)
          Removes all elements contained in collection with specified name from union.
 
Methods inherited from class ru.biosoft.access.VectorDataCollection
doGet, doPut, doRemove, getAt, getNameList, getSize, iterator, toArray
 
Methods inherited from class ru.biosoft.access.AbstractDataCollection
addDataCollectionListener, cachePut, checkMutable, contains, contains, doAddPostNotify, doAddPreNotify, doRemovePostNotify, doRemovePreNotify, finalize, fireElementAdded, fireElementChanged, fireElementRemoved, fireElementWillAdd, fireElementWillChange, fireElementWillRemove, getCompleteName, getDataElementType, getDescription, getInfo, initLog, isMutable, isNotificationEnabled, isPropagationEnabled, makeInfo, propagateElementChanged, propagateElementWillChange, registerRoot, release, remove, removeDataCollectionListener, setNotificationEnabled, setPropagationEnabled, toString
 
Methods inherited from class ru.biosoft.access.DataElementSupport
getName, getOrigin, registerConstructorWithBadEqual
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ru.biosoft.access.DataCollection
addDataCollectionListener, contains, contains, getCompleteName, getDataElementType, getInfo, getNameList, getSize, isMutable, isNotificationEnabled, isPropagationEnabled, iterator, propagateElementChanged, propagateElementWillChange, release, remove, removeDataCollectionListener, setNotificationEnabled, setPropagationEnabled
 
Methods inherited from interface ru.biosoft.access.DataElement
getName, getOrigin
 

Field Detail

children

protected java.util.ArrayList children
Constructor Detail

DataCollectionUnion2

public DataCollectionUnion2(DataCollection dc,
                            java.util.Properties properties)
                     throws java.lang.Exception
To do:
Comment

DataCollectionUnion2

public DataCollectionUnion2(DataCollection[] collections,
                            java.util.Properties properties)
Method Detail

addCollection

public void addCollection(DataCollection child)
Description copied from interface: CollectionUnion
Add all elements from specified collection to union. If specified collection already contains in union then all it elements readded again.

Specified by:
addCollection in interface CollectionUnion
Parameters:
child - Collection with data elements which will be added to union.

removeCollection

public void removeCollection(java.lang.String name)
Description copied from interface: CollectionUnion
Removes all elements contained in collection with specified name from union.

Specified by:
removeCollection in interface CollectionUnion
Parameters:
name - Simple name of data collection which contains elements to remove from union.

get

public DataElement get(java.lang.String name)
                throws java.lang.Exception
Description copied from interface: DataCollection
Returns the DataElement with the specified name. Returns null if the data collection contains no data element for this name.

Specified by:
get in interface DataCollection
Overrides:
get in class AbstractDataCollection
Parameters:
name - Name of the data element (cannot be null).
Returns:
DataElement or null if data element not found in the data collection.
Throws:
java.lang.Exception - If error raised in AbstractDataCollection.doGet(String)
See Also:
AbstractDataCollection.doGet(String), AbstractDataCollection.v_cache

put

public DataElement put(DataElement de)
Description copied from interface: DataCollection
Adds the specified data element to the collection. If the data collection previously contained the specified element, the old value is replaced.

Specified by:
put in interface DataCollection
Overrides:
put in class VectorDataCollection
Parameters:
de - element to be added to this data collection.
Returns:
the previous data element with same name, or null if it did not have one.
See Also:
AbstractDataCollection.put(DataElement)

close

public void close()
           throws java.lang.Exception
Description copied from interface: DataCollection
Closes data collection, releases all resources. This method invalidates DataCollection instance.

Specified by:
close in interface DataCollection
Overrides:
close in class VectorDataCollection
Throws:
java.lang.Exception

elementWillRemove

public void elementWillRemove(DataCollectionEvent event)
                       throws DataCollectionVetoException,
                              java.lang.Exception
Description copied from interface: DataCollectionListener
Called before data element will be removed.

Specified by:
elementWillRemove in interface DataCollectionListener
Parameters:
event - DataCollectionEvent information about will removed data element.
Throws:
DataCollectionVetoException - If listener cancel removing of data element.
java.lang.Exception - If error occured.

elementRemoved

public void elementRemoved(DataCollectionEvent event)
                    throws java.lang.Exception
Description copied from interface: DataCollectionListener
Called after data element was removed.

Specified by:
elementRemoved in interface DataCollectionListener
Parameters:
event - DataCollectionEvent information about removed data element.
Throws:
java.lang.Exception - If error occured.

elementWillAdd

public void elementWillAdd(DataCollectionEvent event)
                    throws DataCollectionVetoException,
                           java.lang.Exception
Description copied from interface: DataCollectionListener
Called before data element will be added.

Specified by:
elementWillAdd in interface DataCollectionListener
Parameters:
event - DataCollectionEvent information about will added data element.
Throws:
DataCollectionVetoException - If listener cancel adding of data element.
java.lang.Exception - If error occured.

elementAdded

public void elementAdded(DataCollectionEvent event)
                  throws java.lang.Exception
Description copied from interface: DataCollectionListener
Called after data element was added.

Specified by:
elementAdded in interface DataCollectionListener
Parameters:
event - DataCollectionEvent information about added data element.
Throws:
java.lang.Exception - If error occured.

elementWillChange

public void elementWillChange(DataCollectionEvent event)
                       throws DataCollectionVetoException,
                              java.lang.Exception
Description copied from interface: DataCollectionListener
Called before data element will be changed. e contains old data element (which will be changed).

Specified by:
elementWillChange in interface DataCollectionListener
Parameters:
event - DataCollectionEvent information about will change data element.
Throws:
DataCollectionVetoException - If listener cancel changing of data element.
java.lang.Exception - If error occured.

elementChanged

public void elementChanged(DataCollectionEvent event)
                    throws java.lang.Exception
Description copied from interface: DataCollectionListener
Called after data element was changed. e contains old data element (which already changed).

Specified by:
elementChanged in interface DataCollectionListener
Parameters:
event - DataCollectionEvent information about changed data element.
Throws:
java.lang.Exception - If error occured.


Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.