|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectru.biosoft.access.DataElementSupport
ru.biosoft.access.AbstractDataCollection
ru.biosoft.access.VectorDataCollection
ru.biosoft.access.LocalRepository
LocalRepository creates hierarchical DataCollection. The information about used
in a tree nodes is extracted from files, which are organized in a tree.
In other words each subdirectory contains one DataCollection.
DataCollection is described by the special configuration files ("default.config" and *.node.config)
It is the standard file of a java.util.Properties . This file contains key-value
lines, which describes concrete DataCollection. Key values constants are defined in
DataCollection
Properties.load(InputStream )| Field Summary | |
static java.lang.String |
PARENT_COLLECTION
|
protected java.io.File |
root
Repository root subdirectory. |
| 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 |
| Constructor Summary | |
LocalRepository(DataCollection parent,
java.util.Properties properties)
Constructs LocalRepository. |
|
| Method Summary | |
void |
close()
Removes all of the elements from this data collection. |
protected void |
createCollection(java.io.File file,
boolean isNotify,
FunctionJobControl fjc)
Creates DataCollection using specified config file and adds it to this DataCollection |
DataCollection |
createDataCollection(java.lang.String name,
java.util.Properties properties,
java.lang.String subDir,
java.lang.String configName,
java.io.File[] files,
boolean copy,
CreateDataCollectionController controller)
Creates new DataCollection with specified subdir (if not null) and config file name. |
protected DataElement |
doGet(java.lang.String name)
Returns the element with the specified name from this data collection. |
protected void |
doRemove(java.lang.String name)
Remove DataElement from data collection. |
java.lang.String |
getAbsolutePath()
|
DataElement |
getAt(int index)
Returns the element at the specified position in this data collection. |
java.lang.Class |
getDataElementType()
Returns DataCollection.class |
java.util.List |
getNameList()
Returns an unmodifiable list of the data element names contained in this data collection. |
java.io.File |
getRootDirectory()
|
int |
getSize()
Returns the number of data elements in this data collection. |
protected void |
init()
Scans files in root subdirectory.
|
java.util.Iterator |
iterator()
Returns an iterator over the elements in this list in alphabetically sorted sequence. |
| Methods inherited from class ru.biosoft.access.VectorDataCollection |
doPut, put, toArray |
| 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 |
public static final java.lang.String PARENT_COLLECTION
protected java.io.File root
| Constructor Detail |
public LocalRepository(DataCollection parent,
java.util.Properties properties)
throws java.lang.Exception
DataCollection#PATH_PROPERTY
parent - parent DataCollectionproperties - DataCollection properties
java.lang.Exception - If any error| Method Detail |
public java.io.File getRootDirectory()
public java.lang.String getAbsolutePath()
protected void init()
root subdirectory.
If the subdirectory contains other subdirectories, they are considered as the challengers
for creation nested DataCollection-s.
DataCollection is created, if in the nested subdirectory is found "default.config" file.
Also DataCollection is created, if a root subdirectory contains a file with ".node.config" suffix
All DataCollections are added to the this DataCollection
#createCollection(File file,boolean isNotify)
protected void createCollection(java.io.File file,
boolean isNotify,
FunctionJobControl fjc)
throws java.lang.Exception
file - config fileisNotify - If this flag false the listeners will not be notified of add event
java.lang.Exception - If any error
protected void doRemove(java.lang.String name)
throws java.lang.Exception
files
used by this data collection permanently deleted.
doRemove in class VectorDataCollectionjava.lang.Exception - If base version of doRemove throws Exception.mgl3.access.DataCollectionInfo#getUsedFiles(),
mgl3.access.DataCollectionpublic int getSize()
VectorDataCollectiondata elements in this data collection.
getSize in interface DataCollectiongetSize in class VectorDataCollectionprotected DataElement doGet(java.lang.String name)
VectorDataCollection
doGet in class VectorDataCollectionname - name of element to return.
AbstractDataCollection.get(String)public DataElement getAt(int index)
VectorDataCollection
getAt in class VectorDataCollectionindex - index of element to return.
public java.util.Iterator iterator()
VectorDataCollection
iterator in interface DataCollectioniterator in class VectorDataCollectionpublic java.util.List getNameList()
VectorDataCollectionUnsupportedOperationException.
The returned list is backed by the data collection,
so changes to the data collection are reflected in the returned list.
getNameList in interface DataCollectiongetNameList in class VectorDataCollectionpublic java.lang.Class getDataElementType()
getDataElementType in interface DataCollectiongetDataElementType in class AbstractDataCollection
public void close()
throws java.lang.Exception
VectorDataCollection
close in interface DataCollectionclose in class VectorDataCollectionjava.lang.Exception
public DataCollection createDataCollection(java.lang.String name,
java.util.Properties properties,
java.lang.String subDir,
java.lang.String configName,
java.io.File[] files,
boolean copy,
CreateDataCollectionController controller)
throws java.lang.Exception
createDataCollection in interface Repositoryname - DataCollection nameproperties - DataCollection propertiessubDir - Sub directory for new collection.configName - Name of configuration filefiles - Files to be moved or copied into repositorycopy - Indicates whether files should be copied.controller - Object for special control functions (dialogs for example).
java.lang.Exception - If error occured.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||