shared
Class FileNames

java.lang.Object
  |
  +--shared.FileNames

public class FileNames
extends java.lang.Object

The FileNames class contains functions for handling file names. Functions are provided for deriving the names of the namesfile, datafile, and testfile. The DATAFILE option is used for all derivations by determining the root and adding different extensions. If the DATAFILE contains the suffix ".all", it is assumed the datafile conntains all data. The user is allowed to selected a testfile explicitely.


Constructor Summary
FileNames()
          Creates a new instance of FileNames
 
Method Summary
 java.lang.String base_name(java.lang.String file)
          Strips all leading directories by searching for the last file separator character.
 java.lang.String data_file()
          Returns the name of the datafile.
 java.lang.String dump_stem()
          Returns the stem of the dumpfile name.
 java.lang.String names_file()
          Returns the name of the namesfile used.
 java.lang.String root_name()
          Returns the rootname of the files contianing data used for trainging.
 java.lang.String test_file()
          Returns the name of the testfile used for testing.
 java.lang.String test_file(boolean abortOnEmpty)
          Returns the name of the testfile used for testing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileNames

public FileNames()
Creates a new instance of FileNames
Method Detail

data_file

public java.lang.String data_file()
Returns the name of the datafile.
Returns:
The name of the datafile.

root_name

public java.lang.String root_name()
Returns the rootname of the files contianing data used for trainging.
Returns:
The basename of the files used for training.

names_file

public java.lang.String names_file()
Returns the name of the namesfile used. If ".names" extension is missing it is automatically added.
Returns:
The name of the namesfile.

test_file

public java.lang.String test_file(boolean abortOnEmpty)
Returns the name of the testfile used for testing. If the name does not end with ".test" it is automatically added.
Parameters:
abortOnEmpty - If TRUE, this function will display an error message if there is no testfile name specified.
Returns:
The name of the testfile.

dump_stem

public java.lang.String dump_stem()
Returns the stem of the dumpfile name.
Returns:
The stem of the dumpfile name.

base_name

public java.lang.String base_name(java.lang.String file)
Strips all leading directories by searching for the last file separator character.
Parameters:
file - The path of the file to be stripped.
Returns:
The file name without directory path.

test_file

public java.lang.String test_file()
Returns the name of the testfile used for testing. If the name does not end with ".test" it is automatically added.
Returns:
The name of the testfile.