public class FileProperties
extends java.util.Properties
Modifier and Type | Field and Description |
---|---|
static com.martiansoftware.jsap.FlaggedOption[] |
DATABASE_OPTIONS |
private java.lang.String |
databaseName |
private java.lang.String |
databasePassword |
private java.lang.String |
databaseServerAddress |
private java.lang.String |
databaseTableNamePrefix |
private java.lang.String |
databaseUser |
static com.martiansoftware.jsap.FlaggedOption[] |
FILE_OPTIONS |
private boolean |
isNormalized |
private java.lang.String |
namePrefix |
private int |
numCacheBlocks |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_DB_NAME |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_DB_PASSWORD |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_DB_SERVER |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_DB_TABLE_PREFIX |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_DB_USER |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_INPUT_VECTOR |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_NAME_PREFIX |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_NORMALIZED |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_NUM_CACHE_BLOCKS |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_OUTPUT_DIRECTORY |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_RANDOM_SEED |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_SPARSE_DATA |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_TEMPLATE_VECTOR |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_USE_DB |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_WORKING_DIRECTORY |
private java.lang.String |
outputDirectory |
private long |
randomSeed |
private static long |
serialVersionUID |
private java.lang.String |
sourceFileName |
private boolean |
sparseData |
private java.lang.String |
templateFileName |
private boolean |
usingDatabase |
private java.lang.String |
vectorFileName |
private java.lang.String |
workingDirectory |
Constructor and Description |
---|
FileProperties(java.util.Properties properties) |
FileProperties(java.lang.String fname)
Loads and encapsulated properties related to the input data.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDatabaseName() |
java.lang.String |
getDatabasePassword() |
java.lang.String |
getDatabaseServerAddress() |
java.lang.String |
getDatabaseTableNamePrefix() |
java.lang.String |
getDatabaseUser() |
boolean |
isNormalized()
Returns
true , if the vectors are normalized to unit length. |
boolean |
isUsingDatabase() |
java.lang.String |
namePrefix(boolean withPrefix)
Returns the name of the test run.
|
int |
numCacheBlocks()
Not used at the moment.
|
java.lang.String |
outputDirectory()
Returns the name of the output directory.
|
private void |
parse() |
private java.lang.String |
prependDirectory(boolean withPrefix,
java.lang.String path,
java.lang.String dir) |
private java.lang.String |
prependDirectory(java.lang.String path,
java.lang.String dir) |
long |
randomSeed()
Returns the random seed.
|
void |
setUsingDatabase(boolean usedatabase) |
boolean |
sparseData()
Returns
true if the input data vectors are sparsely populated. |
java.lang.String |
templateFileName(boolean withPrefix)
Returns the name of the template vector file.
|
java.lang.String |
vectorFileName(boolean withPrefix)
Returns the name of the input vector file.
|
java.lang.String |
workingDirectory()
Returns the name of the working directory.
|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values
public static final com.martiansoftware.jsap.FlaggedOption OPTION_WORKING_DIRECTORY
public static final com.martiansoftware.jsap.FlaggedOption OPTION_OUTPUT_DIRECTORY
public static final com.martiansoftware.jsap.FlaggedOption OPTION_NAME_PREFIX
public static final com.martiansoftware.jsap.FlaggedOption OPTION_INPUT_VECTOR
public static final com.martiansoftware.jsap.FlaggedOption OPTION_TEMPLATE_VECTOR
public static final com.martiansoftware.jsap.FlaggedOption OPTION_SPARSE_DATA
public static final com.martiansoftware.jsap.FlaggedOption OPTION_NORMALIZED
public static final com.martiansoftware.jsap.FlaggedOption OPTION_RANDOM_SEED
public static final com.martiansoftware.jsap.FlaggedOption OPTION_NUM_CACHE_BLOCKS
public static final com.martiansoftware.jsap.FlaggedOption OPTION_USE_DB
public static final com.martiansoftware.jsap.FlaggedOption OPTION_DB_SERVER
public static final com.martiansoftware.jsap.FlaggedOption OPTION_DB_NAME
public static final com.martiansoftware.jsap.FlaggedOption OPTION_DB_USER
public static final com.martiansoftware.jsap.FlaggedOption OPTION_DB_PASSWORD
public static final com.martiansoftware.jsap.FlaggedOption OPTION_DB_TABLE_PREFIX
public static final com.martiansoftware.jsap.FlaggedOption[] FILE_OPTIONS
public static final com.martiansoftware.jsap.FlaggedOption[] DATABASE_OPTIONS
private static final long serialVersionUID
private boolean isNormalized
private java.lang.String namePrefix
private int numCacheBlocks
private java.lang.String outputDirectory
private long randomSeed
private boolean sparseData
private java.lang.String templateFileName
private java.lang.String vectorFileName
private java.lang.String workingDirectory
private boolean usingDatabase
private java.lang.String databaseServerAddress
private java.lang.String databaseName
private java.lang.String databaseUser
private java.lang.String databasePassword
private java.lang.String databaseTableNamePrefix
private java.lang.String sourceFileName
public FileProperties(java.lang.String fname) throws PropertiesException
fname
- Name of the properties file.PropertiesException
public FileProperties(java.util.Properties properties) throws PropertiesException
PropertiesException
private void parse() throws PropertiesException
PropertiesException
public boolean isNormalized()
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.true
, if the vectors are normalized to unit length.public java.lang.String namePrefix(boolean withPrefix)
public int numCacheBlocks()
public java.lang.String outputDirectory()
public long randomSeed()
public boolean sparseData()
true
if the input data vectors are sparsely populated.true
if the input data vectors are sparsely populated.public java.lang.String templateFileName(boolean withPrefix)
withPrefix
is true.withPrefix
- determines if the file name is prefixed with the working directory.private java.lang.String prependDirectory(boolean withPrefix, java.lang.String path, java.lang.String dir)
private java.lang.String prependDirectory(java.lang.String path, java.lang.String dir)
public java.lang.String vectorFileName(boolean withPrefix)
withPrefix
is true.withPrefix
- determines if the file name is prefixed with the working directory.public java.lang.String workingDirectory()
public boolean isUsingDatabase()
public void setUsingDatabase(boolean usedatabase)
public java.lang.String getDatabaseName()
public java.lang.String getDatabasePassword()
public java.lang.String getDatabaseServerAddress()
public java.lang.String getDatabaseUser()
public java.lang.String getDatabaseTableNamePrefix()