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 CollectionFactory

    java.lang.Object
      ru.biosoft.access.CollectionFactory

public class CollectionFactory
extends java.lang.Object

To do:
  Document it.

Nested Class Summary
`static class` | `CollectionFactory.CollectionClassLoader`

Field Summary
`protected static org.apache.log4j.Category` | `cat`
`static java.lang.String` | `PATH_DELIMITER` Path delimiter for complete names of data collections.

Constructor Summary
`CollectionFactory()`

Method Summary
`static void` | `copyDataCollection(DataCollection source, DataCollection dest, FunctionJobControl jc, java.lang.String successMessage)`
`static void` | `copyFile(java.io.File dst, java.io.File src)`
`static void` | `copyFile(java.io.File dst, java.io.File src, FunctionJobControl jc)`
`static void` | `copyFile(java.lang.String dst, java.lang.String src)`
`static void` | `copyFiles(java.io.File dir, java.io.File[] files, boolean copy)` Copy or move files to the specified directory.
`static void` | `copyFiles(java.io.File dir, java.io.File[] files, boolean copy, FunctionJobControl jc)` Copy or move files to the specified directory.
`static DataCollection` | `createCollection(DataCollection parent, java.util.Properties properties)` Creates `DataCollection` with the specified parent and properties.
`static DataCollection` | `createDerivedCollection(Repository parent, java.lang.String name, java.util.Properties primary, java.util.Properties derived, java.lang.String subDir)`
`static DataCollection` | `createRepository(java.lang.String path)`
`static DataCollection` | `createTempMemoryCollection()`
`static DataCollection` | `createTransformedCollection(Repository parent, java.lang.String name, java.lang.Class transformerClass, java.lang.Class dataElementType, java.lang.String imgName, java.lang.String childrenImage, java.lang.String fileFilter, java.lang.String startTag, java.lang.String idTag, java.lang.String endTag, java.lang.String subDir)`
`static DataCollection` | `createTransformedFileCollection(LocalRepository parent, java.lang.String name, java.lang.String filter, java.lang.Class transformerClass)`
`static CollectionFactory.CollectionClassLoader` | `getCollectionClassLoader()`
`static DataCollection` | `getDataCollection(java.lang.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(java.lang.String completeName)` Returns the DataElement with the specified name.
`static DataElement` | `getDataElement(java.lang.String relativeName, DataCollection ancestor)` Returns the DataElement with the specified name.
`static java.lang.String` | `getLastToken(java.lang.String completeName)` Returns last token of complete name
`static java.lang.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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### cat

    protected static org.apache.log4j.Category cat

### PATH_DELIMITER

    public static final java.lang.String PATH_DELIMITER

  Path delimiter for complete names of data collections.

  See Also:
    Constant Field Values

Constructor Detail

### CollectionFactory

    public CollectionFactory()

Method Detail

### getCollectionClassLoader

    public static CollectionFactory.CollectionClassLoader getCollectionClassLoader()

### createCollection

    public static DataCollection createCollection(DataCollection parent,
                                                  java.util.Properties properties)

  Creates `DataCollection` with the specified parent and properties.

### releaseCollection

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

  Releases all element of DataCollection `DataCollection`.

  Throws:
    `java.lang.Exception`

### registerRoot

    public static void registerRoot(DataCollection dc)

  Register DataCollection in root HashMap.

  See Also:
    `getDataCollection(java.lang.String)`, `unregisterRoot(ru.biosoft.access.DataCollection)`

### unregisterRoot

    public static void unregisterRoot(DataCollection dataCollection)

  Unegister DataCollection in root HashMap.

  See Also:
    `getDataCollection(java.lang.String)`, `registerRoot(ru.biosoft.access.DataCollection)`

### getDataElement

    public static DataElement getDataElement(java.lang.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(String)`, `DataCollection.getCompleteName()`

### getDataCollection

    public static DataCollection getDataCollection(java.lang.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(java.lang.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`

### getRelativeName

    public static java.lang.String getRelativeName(DataElement child,
                                                   DataCollection ancestor)

  Returns complete name of DataElement relative its ancestor.

### getLastToken

    public static java.lang.String getLastToken(java.lang.String completeName)

  Returns last token of complete name

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

### copyFiles

    public static void copyFiles(java.io.File dir,
                                 java.io.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.
  Throws:
    `java.io.IOException`

### copyFiles

    public static void copyFiles(java.io.File dir,
                                 java.io.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.
  Throws:
    `java.io.IOException`

### copyFile

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

  Throws:
    `java.io.IOException`

### copyFile

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

  Throws:
    `java.io.IOException`

### copyFile

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

  Throws:
    `java.io.IOException`

### createRepository

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

  Throws:
    `java.lang.Exception`

### createTempMemoryCollection

    public static DataCollection createTempMemoryCollection()

### copyDataCollection

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

### createTransformedCollection

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

  Throws:
    `java.lang.Exception`

### createDerivedCollection

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

  Throws:
    `java.lang.Exception`

### createTransformedFileCollection

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

  Throws:
    `java.lang.Exception`

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.