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

## ru.biosoft.access
Class CollectionFactory

public class CollectionFactory

todo Document it.

Inner Class Summary
`public static class` | CollectionFactory.CollectionClassLoader

Field Summary
`final static String` | `PATH_DELIMITER` Path delimiter for complete names of data collections.

Method Summary
`static void` | `copyDataCollection(DataCollection source, DataCollection dest, FunctionJobControl jc, String successMessage)`
`static void` | `copyFile(String dst, String src)`
`static void` | `copyFile(File dst, File src)`
`static void` | `copyFile(File dst, File src, FunctionJobControl jc)`
`static void` | `copyFiles(File dir, File[] files, boolean copy)` Copy or move files to the specified directory.
`static void` | `copyFiles(File dir, File[] files, boolean copy, FunctionJobControl jc)` Copy or move files to the specified directory.
`static DataCollection` | `createCollection(DataCollection parent, Properties properties)` Creates DataCollection with the specified parent and properties.
`static DataCollection` | `createDerivedCollection(Repository parent, String name, Properties primary, Properties derived, String subDir)`
`static DataCollection` | `createRepository(String path)`
`static DataCollection` | `createTempMemoryCollection()`
`static DataCollection` | `createTransformedCollection(Repository parent, String name, Class transformerClass, Class dataElementType, String imgName, String childrenImage, String fileFilter, String startTag, String idTag, String endTag, String subDir)`
`static DataCollection` | `createTransformedFileCollection(LocalRepository parent, String name, String filter, Class transformerClass)`
`static CollectionClassLoader` | `getCollectionClassLoader()`
`static DataCollection` | `getDataCollection(String completeName)` Returns the data collection with the speicified complete name relative of one of the data collection from data collections registered in root hash map.
`static DataElement` | `getDataElement(String completeName)` Returns the DataElement with the specified name.
`static DataElement` | `getDataElement(String relativeName, DataCollection ancestor)` Returns the DataElement with the specified name.
`static String` | `getLastToken(String completeName)` Returns last token of complete name
`static String` | `getRelativeName(DataElement child, DataCollection ancestor)` Returns complete name of DataElement relative its ancestor.
`static void` | `registerRoot(DataCollection dc)` Register DataCollection in root HashMap.
`static void` | `releaseCollection(DataCollection dataCollection)` Releases all element of DataCollection DataCollection.
`static void` | `unregisterRoot(DataCollection dataCollection)` Unegister DataCollection in root HashMap.

Field Detail

### PATH_DELIMITER

    public final static String PATH_DELIMITER

  Path delimiter for complete names of data collections.

Method Detail

### copyDataCollection

    public static void copyDataCollection(DataCollection source, DataCollection dest, FunctionJobControl jc, String successMessage)

### copyFile

    public static void copyFile(String dst, String src)
                          throws java.io.IOException

### copyFile

    public static void copyFile(File dst, File src)
                          throws java.io.IOException

### copyFile

    public static void copyFile(File dst, File src, FunctionJobControl jc)
                          throws java.io.IOException

### copyFiles

    public static void copyFiles(File dir, File[] files, boolean copy)
                           throws java.io.IOException

  Copy or move files to the specified directory.
  Parameters:
    dir - directory where files should be moved or copied
    files - files to be moved or copied into repository
    copy - indicates whther files should be copied.

### copyFiles

    public static void copyFiles(File dir, File[] files, boolean copy, FunctionJobControl jc)
                           throws java.io.IOException

  Copy or move files to the specified directory.
  Parameters:
    dir - directory where files should be moved or copied
    files - files to be moved or copied into repository
    copy - indicates whther files should be copied.

### createCollection

    public static DataCollection createCollection(DataCollection parent, Properties properties)

  Creates DataCollection with the specified parent and properties.

### createDerivedCollection

    public static DataCollection createDerivedCollection(Repository parent, String name, Properties primary, Properties derived, String subDir)
                                                   throws java.lang.Exception

### createRepository

    public static DataCollection createRepository(String path)
                                            throws java.lang.Exception

### createTempMemoryCollection

    public static DataCollection createTempMemoryCollection()

### createTransformedCollection

    public static DataCollection createTransformedCollection(Repository parent, String name, Class transformerClass, Class dataElementType, String imgName, String childrenImage, String fileFilter, String startTag, String idTag, String endTag, String subDir)
                                                       throws java.lang.Exception

### createTransformedFileCollection

    public static DataCollection createTransformedFileCollection(LocalRepository parent, String name, String filter, Class transformerClass)
                                                           throws java.lang.Exception

### getCollectionClassLoader

    public static CollectionClassLoader getCollectionClassLoader()

### getDataCollection

    public static DataCollection getDataCollection(String completeName)

  Returns the data collection with the speicified complete name relative of one of the data collection from data collections registered in root hash map.
  Parameters:
    completeName - complete name
  Returns: named DataCollection or null otherwise

### getDataElement

    public static DataElement getDataElement(String completeName)

  Returns the DataElement with the specified name.
  Parameters:
    completeName - - complete DataElement name in CollectionFactory tree
    example: localhost/matrices/matrixlib.TransformedDataCollection/V$MYOD_01
  Returns: the DataElement with the specified name.
  See Also:
    DataElement, getDataCollection(java.lang.String), DataCollection.getCompleteName()

### getDataElement

    public static DataElement getDataElement(String relativeName, DataCollection ancestor)

  Returns the DataElement with the specified name.
  Parameters:
    relativeName - name of data element relative the ancestor
    ancestor - direct or indirect parent of requested data element
  Returns: the DataElement with the specified name.
  See Also:
    DataElement, #getRelatveName

### getLastToken

    public static String getLastToken(String completeName)

  Returns last token of complete name
  Parameters:
    completeName complete - name
  Returns: last token of complete name

### getRelativeName

    public static String getRelativeName(DataElement child, DataCollection ancestor)

  Returns complete name of DataElement relative its ancestor.

### registerRoot

    public static void registerRoot(DataCollection dc)

  Register DataCollection in root HashMap.
  See Also:
    getDataCollection(java.lang.String), unregisterRoot(ru.biosoft.access.DataCollection)

### releaseCollection

    public static void releaseCollection(DataCollection dataCollection)
                                   throws java.lang.Exception

  Releases all element of DataCollection DataCollection.

### unregisterRoot

    public static void unregisterRoot(DataCollection dataCollection)

  Unegister DataCollection in root HashMap.
  See Also:
    getDataCollection(java.lang.String), registerRoot(ru.biosoft.access.DataCollection)

Association Links

to Class org.apache.log4j.Category

to Class ru.biosoft.access.CollectionFactory.CollectionClassLoader

to Class java.lang.String

  Path delimiter for complete names of data collections.

to Class java.util.HashMap

  root DataCollections
  key is name of DataCollection (String)
  value is DataCollection

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

BOTTOM