ru.biosoft.access
Class LocalRepository
ru.biosoft.access.DataElementSupport
|
+--ru.biosoft.access.AbstractDataCollection
|
+--ru.biosoft.access.VectorDataCollection
|
+--ru.biosoft.access.LocalRepository
- public class LocalRepository
- extends VectorDataCollection
- implements Repository
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
- See Also: java.util.Properties#load(InputStream)
- todo sorting order
| Methods inherited from class ru.biosoft.access.AbstractDataCollection |
addDataCollectionListener, contains, contains, get, getCompleteName, getInfo, init, propagateElementChanged, propagateElementWillChange, remove, removeDataCollectionListener, toString |
LocalRepository
public LocalRepository(DataCollection parent, Properties properties)
throws java.lang.Exception
- Constructs LocalRepository. Root subdirectory is defined by DataCollection#PATH_PROPERTY
- Parameters:
- parent - parent DataCollection
- properties - DataCollection properties
- Throws:
- Exception - If any error
close
public void close()
throws java.lang.Exception
- todo Document
createDataCollection
public DataCollection createDataCollection(String name, Properties properties, String subDir, String configName, File[] files, boolean copy, CreateDataCollectionController controller)
throws java.lang.Exception
- Creates new DataCollection with specified subdir (if not null) and config file name.
If config file already exists, specified controler is used. If controler
permits to override existing config file, then DataCollection is created.
- Parameters:
- name - DataCollection name
- properties - DataCollection properties
- subDir - Sub directory for new collection.
- configName - Name of configuration file
- files - Files to be moved or copied into repository
- copy - Indicates whether files should be copied.
- controller - Object for special control functions (dialogs for example).
- Returns: Created data collection, or null.
- Throws:
- Exception - If error occured.
- todo high Change processing of file overwriting!!!
getDataElementType
public Class getDataElementType()
- Returns DataCollection.class
- Returns: DataCollection.class.
getRootDirectory
public File getRootDirectory()
to Class java.io.File- Repository root subdirectory.
BOTTOM