Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ru.biosoft.access
Class TransformedDataCollection

    java.lang.Object
      ru.biosoft.access.DataElementSupport
          ru.biosoft.access.AbstractDataCollection
              ru.biosoft.access.DerivedDataCollection
                  ru.biosoft.access.TransformedDataCollection

All Implemented Interfaces:
  DataCollection, DataCollectionListener, DataElement, java.util.EventListener

public class TransformedDataCollection
extends DerivedDataCollection
implements DataCollectionListener

Implemnation note: we are not propagate DataCollectionEvents, because this work is done by primary DataCollection (it has the same parent).

To do:
  check DataElement type for Transformer

Field Summary
`protected DataElement` | `current` Used to optimise doPut function.

Fields inherited from class ru.biosoft.access.DerivedDataCollection
`primaryCollection`

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
`TransformedDataCollection(DataCollection parent, java.util.Properties properties)` Constructs transformed data collection with parent.

Method Summary
`void` | `close()` Additinally closes primary data collection
`protected void` | `doAddPostNotify(java.lang.String name, boolean bNew)` TransformedDataCollection should not throw notification (fire methods) during put() operation.
`protected void` | `doAddPreNotify(java.lang.String name, boolean bNew)` TransformedDataCollection should not throw notification (fire methods) during put() operation.
`DataElement` | `doGet(java.lang.String name)` Implements specific get action for transformed data collection to get the specified by name data element from the collection.
`void` | `doPut(DataElement element, boolean isNew)` Implements specific put action for transformed data collection to put the specified data element into the primary collection.
`protected void` | `doRemovePostNotify(java.lang.String name)`
`protected void` | `doRemovePreNotify(java.lang.String name)`
`void` | `elementAdded(DataCollectionEvent dce)` Called after data element was added.
`void` | `elementChanged(DataCollectionEvent dce)` Called after data element was changed.
`void` | `elementRemoved(DataCollectionEvent dce)` Called after data element was removed.
`void` | `elementWillAdd(DataCollectionEvent e)` Called before data element will be added.
`void` | `elementWillChange(DataCollectionEvent e)` Called before data element will be changed.
`void` | `elementWillRemove(DataCollectionEvent e)` Called before data element will be removed.
`protected void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`java.lang.Class` | `getDataElementType()` Gets class of output data element.
`Transformer` | `getTransformer()`
`java.util.Iterator` | `iterator()` Calls `DataCollection.iterator()` method of primary data collection
`void` | `release(java.lang.String name)` Release the DataElement specified by its name from the cache.
`java.lang.String` | `toString()` Returns a string representation of the derived data collection

Methods inherited from class ru.biosoft.access.DerivedDataCollection
`contains, contains, doRemove, getNameList, getPrimaryCollection, getSize, init, isMutable`

Methods inherited from class ru.biosoft.access.AbstractDataCollection
`addDataCollectionListener, cachePut, checkMutable, fireElementAdded, fireElementChanged, fireElementRemoved, fireElementWillAdd, fireElementWillChange, fireElementWillRemove, get, getCompleteName, getDescription, getInfo, initLog, isNotificationEnabled, isPropagationEnabled, makeInfo, propagateElementChanged, propagateElementWillChange, put, registerRoot, remove, removeDataCollectionListener, setNotificationEnabled, setPropagationEnabled`

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.DataElement
`getName, getOrigin`

Field Detail

### current

    protected DataElement current

  Used to optimise doPut function.

Constructor Detail

### TransformedDataCollection

    public TransformedDataCollection(DataCollection parent,
                                     java.util.Properties properties)
                              throws java.lang.Exception

  Constructs transformed data collection with parent.

Parameters:
  `parent` - Parent data collection.
  `properties` - Properties for creating data collection (may be changed).
  Obligatory properties:
  - `DataCollection.NAME_PROPERTY`
  - `DataCollection.TRANSFORMER_CLASS`
  - `DataCollection.NEXT_CONFIG`
  Optional properties:
  - `DataCollection.NODE_IMAGE`
  - `DataCollection.CHILDREN_NODE_IMAGE`
  - `DataCollection.CHILDREN_NODE_VISIBLE`
Throws:
  `java.lang.Exception` - any errors

Method Detail

### doAddPreNotify

    protected void doAddPreNotify(java.lang.String name,
                                  boolean bNew)
                           throws java.lang.Exception,
                                  DataCollectionVetoException

  TransformedDataCollection should not throw notification (fire methods) during put() operation. This method makes it.

  Overrides:
    `doAddPreNotify` in class `AbstractDataCollection`
  Parameters:
    `name` - name of added/changed DataElement.
    `bNew` - is it new?
  Throws:
    `java.lang.Exception`
    `DataCollectionVetoException`

### doRemovePreNotify

    protected void doRemovePreNotify(java.lang.String name)
                              throws java.lang.Exception,
                                     DataCollectionVetoException

  Overrides:
    `doRemovePreNotify` in class `AbstractDataCollection`
  Throws:
    `java.lang.Exception`
    `DataCollectionVetoException`

### doAddPostNotify

    protected void doAddPostNotify(java.lang.String name,
                                   boolean bNew)
                            throws java.lang.Exception,
                                   DataCollectionVetoException

  TransformedDataCollection should not throw notification (fire methods) during put() operation. This method makes it.

  Overrides:
    `doAddPostNotify` in class `AbstractDataCollection`
  Parameters:
    `name` - name of added/changed DataElement.
    `bNew` - is it new?
  Throws:
    `java.lang.Exception`
    `DataCollectionVetoException`

### doRemovePostNotify

    protected void doRemovePostNotify(java.lang.String name)
                               throws java.lang.Exception,
                                      DataCollectionVetoException

  Overrides:
    `doRemovePostNotify` in class `AbstractDataCollection`
  Throws:
    `java.lang.Exception`
    `DataCollectionVetoException`

### getDataElementType

    public java.lang.Class getDataElementType()

  Gets class of output data element.

  Specified by:
    `getDataElementType` in interface `DataCollection`
  Overrides:
    `getDataElementType` in class `DerivedDataCollection`
  Returns:
    transformer output element

### doPut

    public void doPut(DataElement element,
                      boolean isNew)
               throws java.lang.Exception

  Implements specific put action for transformed data collection to put the specified data element into the primary collection.

  Overrides:
    `doPut` in class `DerivedDataCollection`
  Parameters:
    `element` - The put DataElement
  Throws:
    `java.lang.Exception` - If any errors.
  See Also:
    `AbstractDataCollection.put(DataElement)`

### doGet

    public DataElement doGet(java.lang.String name)
                      throws java.lang.Exception

  Implements specific get action for transformed data collection to get the specified by name data element from the collection.

  Overrides:
    `doGet` in class `DerivedDataCollection`
  Parameters:
    `name` - The name of data element
  Returns:
    the specified data element from the primary collection.
  Throws:
    `java.lang.Exception` - If any errors.
  See Also:
    `AbstractDataCollection.put(DataElement)`

### release

    public void release(java.lang.String name)

  Description copied from class: `AbstractDataCollection`
  Release the DataElement specified by its name from the cache.

  Specified by:
    `release` in interface `DataCollection`
  Overrides:
    `release` in class `AbstractDataCollection`

### close

    public void close()
               throws java.lang.Exception

  Additinally closes primary data collection

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

### finalize

    protected void finalize()
                     throws java.lang.Throwable

  Description copied from class: `AbstractDataCollection`
  Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. Calls ``AbstractDataCollection.close()`` method

  Overrides:
    `finalize` in class `AbstractDataCollection`
  Throws:
    `java.lang.Throwable` - the `Exception` raised by this method

### iterator

    public java.util.Iterator iterator()

  Description copied from class: `DerivedDataCollection`
  Calls `DataCollection.iterator()` method of primary data collection

  Specified by:
    `iterator` in interface `DataCollection`
  Overrides:
    `iterator` in class `DerivedDataCollection`
  Returns:
    an iterator over the data elements in primary collection.

### elementWillAdd

    public void elementWillAdd(DataCollectionEvent e)
                        throws DataCollectionVetoException,
                               java.lang.Exception

  Description copied from interface: `DataCollectionListener`
  Called before data element will be added.

  Specified by:
    `elementWillAdd` in interface `DataCollectionListener`
  Parameters:
    `e` - 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 dce)
                      throws java.lang.Exception

  Description copied from interface: `DataCollectionListener`
  Called after data element was added.

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

### elementWillChange

    public void elementWillChange(DataCollectionEvent e)
                           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:
    `e` - 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 dce)
                        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:
    `dce` - DataCollectionEvent information about changed data element.
  Throws:
    `java.lang.Exception` - If error occured.

### elementWillRemove

    public void elementWillRemove(DataCollectionEvent e)
                           throws DataCollectionVetoException,
                                  java.lang.Exception

  Description copied from interface: `DataCollectionListener`
  Called before data element will be removed.

  Specified by:
    `elementWillRemove` in interface `DataCollectionListener`
  Parameters:
    `e` - 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 dce)
                        throws java.lang.Exception

  Description copied from interface: `DataCollectionListener`
  Called after data element was removed.

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

### getTransformer

    public final Transformer getTransformer()

### toString

    public java.lang.String toString()

  Description copied from class: `DerivedDataCollection`
  Returns a string representation of the derived data collection

  Overrides:
    `toString` in class `DerivedDataCollection`
  Returns:
    string representation of the derived data collection
  To do:
    Temp implementation

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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