morfologik.tools
Class FSABuildTool

java.lang.Object
  extended by morfologik.tools.FSABuildTool

public final class FSABuildTool
extends java.lang.Object

Convert from plain text input to a serialized FSA in any of the available FSABuildTool.Formats.


Nested Class Summary
static class FSABuildTool.Format
          The serialization format to use for the binary output.
 
Field Summary
protected  org.apache.commons.cli.Options options
          Command line options.
 
Constructor Summary
FSABuildTool()
           
 
Method Summary
static void checkSingleByte(java.lang.String chr)
          Check if the argument is a single byte after conversion using platform-default encoding.
protected  java.lang.String dumpLine(byte[] line, int length)
          Dump input line, byte-by-byte.
protected  void go(org.apache.commons.cli.CommandLine line)
          Command line entry point after parsing arguments.
protected  void go(java.lang.String[] args)
          Initializes application context.
protected  void initializeOptions(org.apache.commons.cli.Options options)
          Override and initialize options.
protected  boolean isAvailable()
          Is the tool available?
static void main(java.lang.String[] args)
          Command line entry point.
protected  void printError(java.lang.String msg)
          Print an error without an exception.
protected  void printError(java.lang.String msg, java.lang.Throwable t)
          Print an error and an associated exception.
protected  void printUsage()
          Prints usage (options).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

protected final org.apache.commons.cli.Options options
Command line options.

Constructor Detail

FSABuildTool

public FSABuildTool()
Method Detail

go

protected void go(org.apache.commons.cli.CommandLine line)
           throws java.lang.Exception
Command line entry point after parsing arguments.

Throws:
java.lang.Exception

dumpLine

protected java.lang.String dumpLine(byte[] line,
                                    int length)
Dump input line, byte-by-byte.


checkSingleByte

public static void checkSingleByte(java.lang.String chr)
Check if the argument is a single byte after conversion using platform-default encoding.


printUsage

protected void printUsage()
Prints usage (options).


initializeOptions

protected void initializeOptions(org.apache.commons.cli.Options options)
Override and initialize options.


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Command line entry point.

Throws:
java.lang.Exception

go

protected final void go(java.lang.String[] args)
Initializes application context.


printError

protected void printError(java.lang.String msg,
                          java.lang.Throwable t)
Print an error and an associated exception.


printError

protected void printError(java.lang.String msg)
Print an error without an exception.


isAvailable

protected boolean isAvailable()
Is the tool available? true by default.