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 DerivedDataCollection

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

All Implemented Interfaces:
  DataCollection, DataElement

Direct Known Subclasses:
  FilteredDataCollection, Module, TransformedDataCollection, VariablesDataCollection

public class DerivedDataCollection
extends AbstractDataCollection

General class for derived data collection.

Subclasses should provide the difference of derived data collection from primary one.

Derived data collection is listener of primary data collection. This implementation provides delegation primary data collection events to listeners of derived data collection.

Pendung:
  high we do not close primry collection. It is subclasses responcibility.

Field Summary
`protected DataCollection` | `primaryCollection` Primary collection.

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
`DerivedDataCollection(DataCollection parent, java.util.Properties properties)` Constructor to be used by `CollectionFactory`.
`DerivedDataCollection(DataCollection parent, java.lang.String name, DataCollection primaryDC, java.util.Properties properties)` Constructs DerivedDataCollection with the parent, name and primary data collection.

Method Summary
`boolean` | `contains(DataElement de)` Calls `DataCollection.contains(DataElement)` method of primary data collection.
`boolean` | `contains(java.lang.String name)` Calls `DataCollection.contains(String)` method of primary data collection.
`DataElement` | `doGet(java.lang.String name)` Calls `DataCollection.get(String)` method of primary collection
`protected void` | `doPut(DataElement element, boolean isNew)` Calls `DataCollection.put(DataElement)` of primary collection Puts the specified data element into the primary collection.
`protected void` | `doRemove(java.lang.String name)` Calls `DataCollection.remove(String)` of primary collection.
`java.lang.Class` | `getDataElementType()` Calls `DataCollection.getDataElementType()` method of primary data collection.
`java.util.List` | `getNameList()` Calls `DataCollection.getNameList()` method of primary data collection
`DataCollection` | `getPrimaryCollection()`
`int` | `getSize()` Calls `DataCollection.getSize()` method of primary data collection.
`protected void` | `init()`
`boolean` | `isMutable()` Calls `DataCollection.isMutable()` method of primary data collection.
`java.util.Iterator` | `iterator()` Calls `DataCollection.iterator()` method of primary data collection
`java.lang.String` | `toString()` Returns a string representation of the derived data collection

Methods inherited from class ru.biosoft.access.AbstractDataCollection
`addDataCollectionListener, cachePut, checkMutable, close, doAddPostNotify, doAddPreNotify, doRemovePostNotify, doRemovePreNotify, finalize, fireElementAdded, fireElementChanged, fireElementRemoved, fireElementWillAdd, fireElementWillChange, fireElementWillRemove, get, getCompleteName, getDescription, getInfo, initLog, isNotificationEnabled, isPropagationEnabled, makeInfo, propagateElementChanged, propagateElementWillChange, put, registerRoot, release, 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

### primaryCollection

    protected DataCollection primaryCollection

  Primary collection.

Constructor Detail

### DerivedDataCollection

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

  Constructor to be used by `CollectionFactory`. Obligatory properties are
  - `#NAME`
  - `DataCollection.PRIMARY_COLLECTION`
  - `DataCollection.FILTER_PROPERTY`

Parameters:
  `parent` -
  `properties` - Properties for creating data parent .

### DerivedDataCollection

    public DerivedDataCollection(DataCollection parent,
                                 java.lang.String name,
                                 DataCollection primaryDC,
                                 java.util.Properties properties)

  Constructs DerivedDataCollection with the parent, name and primary data collection.

Parameters:
  `parent` - parent for this data collection.
  `primaryDC` - primary data collection.
  `properties` - Properties to initialise `DataCollectionInfo`. Can be null.

Method Detail

### init

    protected void init()

### getSize

    public int getSize()

  Calls `DataCollection.getSize()` method of primary data collection.

  Specified by:
    `getSize` in interface `DataCollection`
  Overrides:
    `getSize` in class `AbstractDataCollection`
  Returns:
    Number of data element in primary data collection.

### getDataElementType

    public java.lang.Class getDataElementType()

  Calls `DataCollection.getDataElementType()` method of primary data collection.

  Specified by:
    `getDataElementType` in interface `DataCollection`
  Overrides:
    `getDataElementType` in class `AbstractDataCollection`
  Returns:
    Type of data elements stored in the primary data collection.

### isMutable

    public boolean isMutable()

  Calls `DataCollection.isMutable()` method of primary data collection.

  Specified by:
    `isMutable` in interface `DataCollection`
  Overrides:
    `isMutable` in class `AbstractDataCollection`
  Returns:
    true if primary data collection is mutable,
    false otherwise..

### contains

    public boolean contains(java.lang.String name)

  Calls `DataCollection.contains(String)` method of primary data collection.

  Specified by:
    `contains` in interface `DataCollection`
  Overrides:
    `contains` in class `AbstractDataCollection`
  Parameters:
    `name` - specified name of data element
  Returns:
    true if primary data collection contains element with specified name,
    false otherwise..
  See Also:
    `AbstractDataCollection.contains(ru.biosoft.access.DataElement)`

### getPrimaryCollection

    public DataCollection getPrimaryCollection()

### contains

    public boolean contains(DataElement de)

  Calls `DataCollection.contains(DataElement)` method of primary data collection.

  Specified by:
    `contains` in interface `DataCollection`
  Overrides:
    `contains` in class `AbstractDataCollection`
  Parameters:
    `de` - specified data element
  Returns:
    true if primary data collection contains specified element ,
    false otherwise..
  See Also:
    `AbstractDataCollection.contains(String)`

### iterator

    public java.util.Iterator iterator()

  Calls `DataCollection.iterator()` method of primary data collection

  Returns:
    an iterator over the data elements in primary collection.

### getNameList

    public java.util.List getNameList()

  Calls `DataCollection.getNameList()` method of primary data collection

  Specified by:
    `getNameList` in interface `DataCollection`
  Overrides:
    `getNameList` in class `AbstractDataCollection`
  Returns:
    primary data collection name list.

### doPut

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

  Calls `DataCollection.put(DataElement)` of primary collection Puts the specified data element into the primary collection.

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

### doRemove

    protected void doRemove(java.lang.String name)
                     throws java.lang.Exception

  Calls `DataCollection.remove(String)` of primary collection. Remove the specified data element from the primary collection.

  Overrides:
    `doRemove` in class `AbstractDataCollection`
  Throws:
    `java.lang.Exception` - If any errors
  See Also:
    `AbstractDataCollection.remove(String)`
  To do:
    close() in this method is misplaced. It is not cool solution !!!

### doGet

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

  Calls `DataCollection.get(String)` method of primary collection

  Overrides:
    `doGet` in class `AbstractDataCollection`
  Parameters:
    `name` - Name of specified data element.
  Returns:
    the specified data element from the primary collection.
  Throws:
    `java.lang.Exception` - If any error
  See Also:
    `AbstractDataCollection.get(String)`, `DataCollection.iterator()`

### toString

    public java.lang.String toString()

  Returns a string representation of the derived data collection

  Overrides:
    `toString` in class `AbstractDataCollection`
  Returns:
    string representation of the derived data collection

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.