at.tuwien.ifs.somtoolbox.properties
Class FileProperties

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<Object,Object>
          extended by java.util.Properties
              extended by at.tuwien.ifs.somtoolbox.properties.FileProperties
All Implemented Interfaces:
Serializable, Cloneable, Map<Object,Object>

public class FileProperties
extends Properties

Properties for I/O stuff.

Version:
$Id: FileProperties.java 3979 2010-12-16 17:11:39Z mayer $
Author:
Michael Dittenbach
See Also:
Serialized Form

Field Summary
private  String databaseName
           
private  String databasePassword
           
private  String databaseServerAddress
           
private  String databaseTableNamePrefix
           
private  String databaseUser
           
private  boolean isNormalized
           
private  String namePrefix
           
private  int numCacheBlocks
           
private  String outputDirectory
           
private  long randomSeed
           
private static long serialVersionUID
           
private  String sourceFileName
           
private  boolean sparseData
           
private  String templateFileName
           
private  boolean usingDatabase
           
private  String vectorFileName
           
private  String workingDirectory
           
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
FileProperties(Properties properties)
           
FileProperties(String fname)
          Loads and encapsulated properties related to the input data.
 
Method Summary
 String getDatabaseName()
           
 String getDatabasePassword()
           
 String getDatabaseServerAddress()
           
 String getDatabaseTableNamePrefix()
           
 String getDatabaseUser()
           
 boolean isNormalized()
          Returns true, if the vectors are normalized to unit length.
 boolean isUsingDatabase()
           
 String namePrefix(boolean withPrefix)
          Returns the name of the test run.
 int numCacheBlocks()
          Not used at the moment.
 String outputDirectory()
          Returns the name of the output directory.
private  void parse()
           
private  String prependDirectory(boolean withPrefix, String path, String dir)
           
private  String prependDirectory(String path, String dir)
           
 long randomSeed()
          Returns the random seed.
 void setUsingDatabase(boolean usedatabase)
           
 boolean sparseData()
          Returns true if the input data vectors are sparsely populated.
 String templateFileName(boolean withPrefix)
          Returns the name of the template vector file.
 String vectorFileName(boolean withPrefix)
          Returns the name of the input vector file.
 String workingDirectory()
          Returns the name of the working directory.
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

isNormalized

private boolean isNormalized

namePrefix

private String namePrefix

numCacheBlocks

private int numCacheBlocks

outputDirectory

private String outputDirectory

randomSeed

private long randomSeed

sparseData

private boolean sparseData

templateFileName

private String templateFileName

vectorFileName

private String vectorFileName

workingDirectory

private String workingDirectory

usingDatabase

private boolean usingDatabase

databaseServerAddress

private String databaseServerAddress

databaseName

private String databaseName

databaseUser

private String databaseUser

databasePassword

private String databasePassword

databaseTableNamePrefix

private String databaseTableNamePrefix

sourceFileName

private String sourceFileName
Constructor Detail

FileProperties

public FileProperties(String fname)
               throws PropertiesException
Loads and encapsulated properties related to the input data.

Parameters:
fname - Name of the properties file.
Throws:
PropertiesException

FileProperties

public FileProperties(Properties properties)
               throws PropertiesException
Throws:
PropertiesException
Method Detail

parse

private void parse()
            throws PropertiesException
Throws:
PropertiesException

isNormalized

public boolean isNormalized()
Returns true, if the vectors are normalized to unit length. This information is used for map creation to know when to normalize the units' weight vectors.

Returns:
Returns true, if the vectors are normalized to unit length.

namePrefix

public String namePrefix(boolean withPrefix)
Returns the name of the test run.

Returns:
the name of the test run.

numCacheBlocks

public int numCacheBlocks()
Not used at the moment.

Returns:
Returns the numCacheBlocks.

outputDirectory

public String outputDirectory()
Returns the name of the output directory.

Returns:
the name of the output directory.

randomSeed

public long randomSeed()
Returns the random seed.

Returns:
the random seed.

sparseData

public boolean sparseData()
Returns true if the input data vectors are sparsely populated.

Returns:
true if the input data vectors are sparsely populated.

templateFileName

public String templateFileName(boolean withPrefix)
Returns the name of the template vector file. The file name includes the working directory, if argument withPrefix is true.

Parameters:
withPrefix - determines if the file name is prefixed with the working directory.
Returns:
the name of the template vector file.

prependDirectory

private String prependDirectory(boolean withPrefix,
                                String path,
                                String dir)

prependDirectory

private String prependDirectory(String path,
                                String dir)

vectorFileName

public String vectorFileName(boolean withPrefix)
Returns the name of the input vector file. The file name includes the working directory, if argument withPrefix is true.

Parameters:
withPrefix - determines if the file name is prefixed with the working directory.
Returns:
the name of the input vector file.

workingDirectory

public String workingDirectory()
Returns the name of the working directory.

Returns:
the name of the working directory.

isUsingDatabase

public boolean isUsingDatabase()

setUsingDatabase

public void setUsingDatabase(boolean usedatabase)

getDatabaseName

public String getDatabaseName()

getDatabasePassword

public String getDatabasePassword()

getDatabaseServerAddress

public String getDatabaseServerAddress()

getDatabaseUser

public String getDatabaseUser()

getDatabaseTableNamePrefix

public String getDatabaseTableNamePrefix()