HEADER

ru.biosoft.access
Interface DataCollection

All Known Subinterfaces:
CollectionUnion
All Known Implementing Classes:
Compartment, Reaction, AbstractDataCollection

public interface DataCollection
extends DataElement

DataCollection is a set of homogeneous DataElements. Every DataElement can be unambiguously accessed from the collection by its name.
Method names in DataCollection whether it reasonable follows to convention for Java beans methods, otherwise to convention used by java.utils.Collection.

See Also: DataElement

Field Summary
 final static StringCHILDREN_NODE_IMAGE
          Property for storing of image file names used for nodes of DataElement elements stored in LocalRepository collection
 final static StringCHILDREN_NODE_VISIBLE
          Property for storing of visible state.
 final static StringCLASS_PROPERTY
          Property for storing class of data collection.
 final static StringCLASSPATH_JAR_PROPERTY
          Property for storing class of data collection.
 final static StringCOMPARATOR_OBJECT
           
 final static StringCONFIG_FILE_PROPERTY
          Property for storing config file name.
 final static StringCONFIG_PATH_PROPERTY
          Property for storing path to data collection config file.
 final static StringDATA_ELEMENT_CLASS_PROPERTY
          Property for storing class name of data elements stored in this data collection.
 final static StringDEFAULT_CONFIG_FILE
          Property for storing name of default data collection's config file.
 final static StringDEFAULT_CONFIG_SUFFIX
          Property for storing default suffix of data collection's config file.
 final static StringDEFAULT_FILTER_CONFIG_SUFFIX
          Property for storing suffix of FilteredDataCollection data collections
 final static StringDEFAULT_FORMAT_CONFIG_SUFFIX
          Property for storing suffix of FileEntryCollection data collections
 final static StringDEFAULT_NODE_CONFIG_SUFFIX
          Property for storing suffix of LocalRepository data collections
 final static StringDEFAULT_REPOSITORY
          Property for storing name of default repository file.
 final static StringDESCRIPTION_PROPERTY
          Property for storing data collection description.
 final static StringDISPLAY_NAME_PROPERTY
          Property for storing display name of data collection.
 final static StringFILE_PATH_PROPERTY
          Property for storing path to data collection file.
 final static StringFILE_PROPERTY
          Property for storing name of data collection's file.
 final static StringFILTER_PROPERTY
          Property for storing filter of data collection's file.
 final static StringID_FORMAT
          Format for automatical name (identifier) generation.
 final static StringIS_ROOT
          Indicates whether this data collection should be registered as root by CollectionFactory.registerRoot(ru.biosoft.access.DataCollection).
 final static StringJOB_CONTROL_PROPERTY
           
 final static StringLATE_CHILDREN_INITIALIZATION
          Property for storing of
 final static StringMUTABLE
          Property for checking whether the data collection is mutable
 final static StringNAME_PROPERTY
          Property for storing name of data collection.
 final static StringNEXT_CONFIG
          Property for storing name of primary data collection config file.
 final static StringNODE_IMAGE
          Property for storing of image file names used for nodes of LocalRepository collections
 final static StringNODE_VISIBLE
          Property for storing of visible flag.
 final static StringPRIMARY_COLLECTION
           
 final static StringREMOVE_CHILDREN
          When removing data element from this DC, whether to remove its children
 final static StringTRANSFORMER_CLASS
          Property for storing class of transformer for TransformedDataCollection collections

Method Summary
 voidaddDataCollectionListener(DataCollectionListener l)
          Add a listener to the list that's notified each time a change to the data collection occurs.
 voidclose()
          Closes data collection, releases all resources.
 booleancontains(String name)
          Returns true if this data collection contains the element with the specified name, false otherwise
 booleancontains(DataElement element)
          Returns true if this data collection contains the specified element, false otherwise
 DataElementget(String name)
          Returns the DataElement with the specified name.
 StringgetCompleteName()
          Returns complete name of data collection.
 ClassgetDataElementType()
          Returns the type of DataElements stored in the data collection.
 DataCollectionInfogetInfo()
          Returns additional info for this data collection.
 ListgetNameList()
          Returns an unmodifiable view of the data element name list.
 intgetSize()
          Returns the number of elements in this data collection.
 booleanisMutable()
          Returns true if this data collection is mutable, false otherwise.
 booleanisNotificationEnabled()
           
 booleanisPropagationEnabled()
           
 Iteratoriterator()
          Returns an iterator over the data elements in this collection.
 voidpropagateElementChanged(DataCollection source, DataCollectionEvent primaryEvent)
           
 voidpropagateElementWillChange(DataCollection source, DataCollectionEvent primaryEvent)
           
 DataElementput(DataElement obj)
          Adds the specified data element to the collection.
 voidrelease(String dataElementName)
          Release DataElement with the specified name from the DataCollection cache.
 voidremove(String name)
          Removes the specified data element from the collection, if present.
 voidremoveDataCollectionListener(DataCollectionListener l)
          Remove a listener from the list that's notified each time a change to the data collection occurs.
 voidsetNotificationEnabled(boolean isEnabled)
           
 voidsetPropagationEnabled(boolean isEnabled)
           

Methods inherited from interface ru.biosoft.access.DataElement
getName, getOrigin

Field Detail

CHILDREN_NODE_IMAGE

public final static String CHILDREN_NODE_IMAGE
Property for storing of image file names used for nodes of DataElement elements stored in LocalRepository collection

CHILDREN_NODE_VISIBLE

public final static String CHILDREN_NODE_VISIBLE
Property for storing of visible state. This flag is used for defining whether DataElement leafs of current node will be displayed in a Repository tree

CLASS_PROPERTY

public final static String CLASS_PROPERTY
Property for storing class of data collection.

CLASSPATH_JAR_PROPERTY

public final static String CLASSPATH_JAR_PROPERTY
Property for storing class of data collection.

COMPARATOR_OBJECT

public final static String COMPARATOR_OBJECT

CONFIG_FILE_PROPERTY

public final static String CONFIG_FILE_PROPERTY
Property for storing config file name.

CONFIG_PATH_PROPERTY

public final static String CONFIG_PATH_PROPERTY
Property for storing path to data collection config file.

DATA_ELEMENT_CLASS_PROPERTY

public final static String DATA_ELEMENT_CLASS_PROPERTY
Property for storing class name of data elements stored in this data collection.

DEFAULT_CONFIG_FILE

public final static String DEFAULT_CONFIG_FILE
Property for storing name of default data collection's config file.

DEFAULT_CONFIG_SUFFIX

public final static String DEFAULT_CONFIG_SUFFIX
Property for storing default suffix of data collection's config file.

DEFAULT_FILTER_CONFIG_SUFFIX

public final static String DEFAULT_FILTER_CONFIG_SUFFIX
Property for storing suffix of FilteredDataCollection data collections

DEFAULT_FORMAT_CONFIG_SUFFIX

public final static String DEFAULT_FORMAT_CONFIG_SUFFIX
Property for storing suffix of FileEntryCollection data collections

DEFAULT_NODE_CONFIG_SUFFIX

public final static String DEFAULT_NODE_CONFIG_SUFFIX
Property for storing suffix of LocalRepository data collections

DEFAULT_REPOSITORY

public final static String DEFAULT_REPOSITORY
Property for storing name of default repository file.

DESCRIPTION_PROPERTY

public final static String DESCRIPTION_PROPERTY
Property for storing data collection description. Can be in HTML format.

DISPLAY_NAME_PROPERTY

public final static String DISPLAY_NAME_PROPERTY
Property for storing display name of data collection.

FILE_PATH_PROPERTY

public final static String FILE_PATH_PROPERTY
Property for storing path to data collection file.

FILE_PROPERTY

public final static String FILE_PROPERTY
Property for storing name of data collection's file.

FILTER_PROPERTY

public final static String FILTER_PROPERTY
Property for storing filter of data collection's file.

ID_FORMAT

public final static String ID_FORMAT
Format for automatical name (identifier) generation.

IS_ROOT

public final static String IS_ROOT
Indicates whether this data collection should be registered as root by CollectionFactory.registerRoot(ru.biosoft.access.DataCollection).

JOB_CONTROL_PROPERTY

public final static String JOB_CONTROL_PROPERTY

LATE_CHILDREN_INITIALIZATION

public final static String LATE_CHILDREN_INITIALIZATION
Property for storing of

MUTABLE

public final static String MUTABLE
Property for checking whether the data collection is mutable

NAME_PROPERTY

public final static String NAME_PROPERTY
Property for storing name of data collection.

NEXT_CONFIG

public final static String NEXT_CONFIG
Property for storing name of primary data collection config file. It is used for TransformedDataCollection's to specify primary data collection

NODE_IMAGE

public final static String NODE_IMAGE
Property for storing of image file names used for nodes of LocalRepository collections

NODE_VISIBLE

public final static String NODE_VISIBLE
Property for storing of visible flag. This flag is used for defining whether current node will be displayed in a Repository tree

PRIMARY_COLLECTION

public final static String PRIMARY_COLLECTION

REMOVE_CHILDREN

public final static String REMOVE_CHILDREN
When removing data element from this DC, whether to remove its children

TRANSFORMER_CLASS

public final static String TRANSFORMER_CLASS
Property for storing class of transformer for TransformedDataCollection collections
Method Detail

addDataCollectionListener

public void addDataCollectionListener(DataCollectionListener l)
Add a listener to the list that's notified each time a change to the data collection occurs.
Parameters:
l - the DataCollectionListener

close

public void close()
throws java.lang.Exception
Closes data collection, releases all resources. This method invalidates DataCollection instance.
Throws:
java.lang.Exception - If error occured.

contains

public boolean contains(String name)
Returns true if this data collection contains the element with the specified name, false otherwise
Parameters:
name - name of data element
Returns: true if this data collection contains the element with specified name,
false otherwise

contains

public boolean contains(DataElement element)
Returns true if this data collection contains the specified element, false otherwise
Parameters:
element - specified data element
Returns: true if this data collection contains the element wit specified name,
false otherwise

get

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

getCompleteName

public String getCompleteName()
Returns complete name of data collection.
Returns: Full name of DataCollection in the tree hierarchy.

getDataElementType

public Class getDataElementType()
Returns the type of DataElements stored in the data collection.
Returns: Type of DataElements stored in the data collection.

getInfo

public DataCollectionInfo getInfo()
Returns additional info for this data collection. Can return null.
Returns: Additional info for this data collection.
See Also:
DataCollectionInfo

getNameList

public List getNameList()
Returns an unmodifiable view of the data element name list. Query operations on the returned list "read through" to the internal name list, and attempts to modify the returned list, whether direct or via its iterator, result in an UnsupportedOperationException. The returned list is backed by the data collection, so changes to the data collection are reflected in the returned list. The name list can be sorted or unsorted depending on the DataCollection implementing class.
Returns: list of names

getSize

public int getSize()
Returns the number of elements in this data collection.
Returns: Size of this data collection.

isMutable

public boolean isMutable()
Returns true if this data collection is mutable, false otherwise.
Returns: true if primary data collection is mutable,
false otherwise..

isNotificationEnabled

public boolean isNotificationEnabled()

isPropagationEnabled

public boolean isPropagationEnabled()

iterator

public Iterator iterator()
Returns an iterator over the data elements in this collection. There are no guarantees concerning the order in which the elements are returned. If the data collection is modified while an iteration over it is in progress, the results of the iteration are undefined.

propagateElementChanged

public void propagateElementChanged(DataCollection source, DataCollectionEvent primaryEvent)
todo comment

propagateElementWillChange

public void propagateElementWillChange(DataCollection source, DataCollectionEvent primaryEvent)
todo comment

put

public DataElement put(DataElement obj)
throws java.lang.Exception
Adds the specified data element to the collection. If the data collection previously contained the specified element, the old value is replaced.
Returns: previous version of the data element, or null if there was no one.
Throws:
java.util.UnsupportedOperationException - if the data collection is unmutable.
See Also:
isMutable()

release

public void release(String dataElementName)
Release DataElement with the specified name from the DataCollection cache.
pending whether this operation should be called by close operation.

remove

public void remove(String name)
throws java.lang.Exception
Removes the specified data element from the collection, if present. Notifies all listeners if the data element was removed.
Returns: the removed data element.
Throws:
java.util.UnsupportedOperationException - if the data collection is unmutable.
java.lang.Exception - If error occured.
See Also:
isMutable()

removeDataCollectionListener

public void removeDataCollectionListener(DataCollectionListener l)
Remove a listener from the list that's notified each time a change to the data collection occurs.
Parameters:
l - the DataCollectionListener

setNotificationEnabled

public void setNotificationEnabled(boolean isEnabled)

setPropagationEnabled

public void setPropagationEnabled(boolean isEnabled)

Association Links

to Class java.lang.String

Property for storing name of data collection.

to Class java.lang.String

Property for storing display name of data collection.

to Class java.lang.String

Property for storing class of data collection.

to Class java.lang.String

Property for storing class name of data elements stored in this data collection.

to Class java.lang.String

Property for storing data collection description. Can be in HTML format.

to Class java.lang.String

Property for storing class of data collection.

to Class java.lang.String

Property for storing path to data collection config file.

to Class java.lang.String

Property for storing config file name.

to Class java.lang.String

Property for storing path to data collection file.

to Class java.lang.String

Property for storing name of data collection's file.

to Class java.lang.String

Property for storing filter of data collection's file.

to Class java.lang.String

Property for storing name of default data collection's config file.

to Class java.lang.String

Property for storing name of default repository file.

to Class java.lang.String

Property for storing default suffix of data collection's config file.

to Class java.lang.String

Property for storing suffix of {@link ru.biosoft.access.LocalRepository} data collections

to Class java.lang.String

Property for storing suffix of {@link ru.biosoft.access.FileEntryCollection} data collections

to Class java.lang.String

Property for storing suffix of {@link ru.biosoft.access.FilteredDataCollection} data collections

to Class java.lang.String

Property for storing of image file names used for nodes of {@link ru.biosoft.access.LocalRepository} collections

to Class java.lang.String

Property for storing of image file names used for nodes of DataElement elements stored in {@link ru.biosoft.access.LocalRepository} collection

to Class java.lang.String

Property for storing of visible flag. This flag is used for defining whether current node will be displayed in a Repository tree

to Class java.lang.String

Property for storing of visible state. This flag is used for defining whether DataElement leafs of current node will be displayed in a Repository tree

to Class java.lang.String

Property for storing of

to Class java.lang.String

to Class java.lang.String

Property for storing class of transformer for {@link ru.biosoft.access.TransformedDataCollection} collections

to Class java.lang.String

Property for checking whether the data collection is mutable

to Class java.lang.String

to Class java.lang.String

Property for storing name of primary data collection config file. It is used for {@link ru.biosoft.access.TransformedDataCollection}'s to specify primary data collection

to Class java.lang.String

to Class java.lang.String

When removing data element from this DC, whether to remove its children

to Class java.lang.String

Indicates whether this data collection should be registered as root by {@link CollectionFactory#registerRoot}.

to Class java.lang.String

Format for automatical name (identifier) generation.

FOOTER

BOTTOM