com.penguinwerks.jodene.managers
Class InputDataManager

java.lang.Object
  extended bycom.penguinwerks.jodene.managers.InputDataManager

public class InputDataManager
extends java.lang.Object

Stores and retrieves input data files. These are raw files of data.

Author:
Paul Hoehne

Method Summary
 void addInputData(java.util.List data, DataStorageTag tag, java.lang.String name)
          Adds data to the manager.
 void addInputData(java.util.List data, java.lang.String name)
          Adds data to the data manager.
 void cleanVault()
          Cleans the vault.
 java.util.List getInputData(java.lang.String name)
          Returns the data set.
static InputDataManager getManager()
          Returns the input data manager.
 DataStorageTag getStorageTag(java.lang.String name)
          Returns the data storage tag.
 java.lang.String getVaultDirectory()
          Returns the vault directory.
 java.util.List listDataSets()
          Lists the data sets in the vault.
 void setVaultDirectory(java.lang.String directory)
          Sets the vault directory.
 void updateDataSet(java.util.List data, DataStorageTag tag, java.lang.String name)
          Updates the given data set and the storage tag.
 void updateDataSet(java.util.List data, java.lang.String name)
          Saving the data set without modifying the storage tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getManager

public static InputDataManager getManager()
Returns the input data manager.

Returns:
The input data manager.

addInputData

public void addInputData(java.util.List data,
                         DataStorageTag tag,
                         java.lang.String name)
                  throws java.io.IOException
Adds data to the manager.

Parameters:
data - The data to store.
tag - The data storage tag.
name - The name of the data file.
Throws:
IOException - Thrown if there is a problem adding the data.

addInputData

public void addInputData(java.util.List data,
                         java.lang.String name)
                  throws java.io.FileNotFoundException,
                         java.io.IOException,
                         java.lang.ClassNotFoundException
Adds data to the data manager.

Parameters:
data - The data to manage.
name - The name of the data file
Throws:
FileNotFoundException - Thrown if there is a problem saving the data.
java.lang.ClassNotFoundException - Thrown if there is a problem saving the data.
IOException - Thrown if there is a problem saving the data.

cleanVault

public void cleanVault()
Cleans the vault.


getInputData

public java.util.List getInputData(java.lang.String name)
                            throws java.io.IOException,
                                   java.lang.ClassNotFoundException
Returns the data set.

Parameters:
name - The name of the data set.
Returns:
The data set.
Throws:
IOException - Thrown if there is a problem with the data set.
java.lang.ClassNotFoundException - Thrown if there is a problem with the data set.

getStorageTag

public DataStorageTag getStorageTag(java.lang.String name)
                             throws java.io.FileNotFoundException,
                                    java.io.IOException,
                                    java.lang.ClassNotFoundException
Returns the data storage tag.

Parameters:
name - The name of the data set.
Returns:
The data storage tag.
Throws:
FileNotFoundException - Thrown if there is a problem getting the storage tag.
IOException - Thrown if there is a problem getting the storage tag.
java.lang.ClassNotFoundException - Thrown if there is a problem getting the storage tag.

getVaultDirectory

public java.lang.String getVaultDirectory()
Returns the vault directory.

Returns:
The vault directory name.

setVaultDirectory

public void setVaultDirectory(java.lang.String directory)
Sets the vault directory.

Parameters:
directory - The vault directory.

listDataSets

public java.util.List listDataSets()
Lists the data sets in the vault.

Returns:
The data sets in the vault.

updateDataSet

public void updateDataSet(java.util.List data,
                          DataStorageTag tag,
                          java.lang.String name)
                   throws java.io.IOException
Updates the given data set and the storage tag.

Parameters:
data - The data set.
tag - The data storage tag.
name - The name of the data set.
Throws:
IOException - Thrown if there is a problem saving the data set.

updateDataSet

public void updateDataSet(java.util.List data,
                          java.lang.String name)
                   throws java.io.FileNotFoundException,
                          java.io.IOException,
                          java.lang.ClassNotFoundException
Saving the data set without modifying the storage tag.

Parameters:
data - The data.
name - The name of the data set.
Throws:
FileNotFoundException - Thrown if there is a problem writing the file.
IOException - If there is a problem saving the data set.
java.lang.ClassNotFoundException - Thrown of the problem saving the data set.