de.uni_tuebingen.sfb.lichtenstein.main
Class MonaSearch

java.lang.Object
  extended by de.uni_tuebingen.sfb.lichtenstein.main.MonaSearch

public final class MonaSearch
extends Object

This class takes care of launching the program.

Author:
Hendrik Maryns

Field Summary
static String COPYRIGHT
          Copyright information for the program.
static String PROGRAM_NAME
          The name of the program.
static boolean quiet
          Switch wether no output is wanted on the command line.
static boolean verbose
          Switch wether verbose output is wanted on the command line.
static String VERSION
          The version of the program.
 
Constructor Summary
MonaSearch()
           
 
Method Summary
static void convertTreebank(File treebankFile)
          Convert the given tree bank.
static File getBaseFileDir()
          Get the directory where temporary files are stored for this execution.
static File getCorporaDirectory()
          Get the directory where precompiled corpora are stored.
static String getLogFile()
          Get the log file.
static File getMonaFileDirectory()
          Get the directory where where mona files and automata are stored.
static void main(String[] args)
          Run MonaSearch.
static void setBaseFileDir(File baseFileDir)
           
static void setLogFile(String logFile)
          Set the log file.
static String stripExtension(String corps)
          Get the base name of the tree bank, removing file extensions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROGRAM_NAME

public static final String PROGRAM_NAME
The name of the program.

See Also:
Constant Field Values

VERSION

public static final String VERSION
The version of the program.

See Also:
Constant Field Values

COPYRIGHT

public static final String COPYRIGHT
Copyright information for the program.

See Also:
Constant Field Values

verbose

public static boolean verbose
Switch wether verbose output is wanted on the command line.


quiet

public static boolean quiet
Switch wether no output is wanted on the command line.

Constructor Detail

MonaSearch

public MonaSearch()
Method Detail

getBaseFileDir

public static File getBaseFileDir()
Get the directory where temporary files are stored for this execution.

Returns:
The temporary file directory.

setBaseFileDir

public static void setBaseFileDir(File baseFileDir)
Parameters:
baseFileDir - the baseFileDir to set

getLogFile

public static String getLogFile()
Get the log file.

Returns:
the logFile

setLogFile

public static void setLogFile(String logFile)
Set the log file.

Parameters:
logFile - the logFile to set

getCorporaDirectory

public static File getCorporaDirectory()
Get the directory where precompiled corpora are stored.

Returns:
The subdirectory of the temporary directory where corpora are stored.

getMonaFileDirectory

public static File getMonaFileDirectory()
Get the directory where where mona files and automata are stored.

Returns:
The directory where mona files and automata are stored.

main

public static void main(String[] args)
                 throws ParseException
Run MonaSearch. If there are no arguments on the command line, the GUI is shown, otherwise, the command line is parsed and acted upon.

Parameters:
args - The arguments given on the command line.
Postconditions:
  • If there were no arguments, the GUI is shown.
  • Otherwise, the sole argument should be the query to be executed.
  • Throws:
    ParseException - [CAN] If the input formula could not be parsed successfully.

    convertTreebank

    public static void convertTreebank(File treebankFile)
                                throws IOException,
                                       FormatException
    Convert the given tree bank. First check whether it is already converted by looking in the corpora directory for a file with the appropriate ending.

    Parameters:
    treebankFile - The tree bank file to convert.
    Throws:
    IOException - [CAN] Either the given file is corrupted, could not be read or the binary object file could not be written.
    FormatException - [CAN] If the format could not be detected, or this is not a NEGRA tree bank.

    stripExtension

    public static String stripExtension(String corps)
    Get the base name of the tree bank, removing file extensions.

    Parameters:
    corps - The tree bank name.
    Returns:
    The name without file extensions, i.e. with .export and .tobj removed.


    © Copyright 2008 Hendrik Maryns   Creative Commons License