org.foray.hyphen
Class PatternSerializer

java.lang.Object
  extended by org.foray.hyphen.PatternSerializer

public class PatternSerializer
extends Object

Parse and serialize hyphenation patterns so that they can be packaged for runtime use without the need to parse them then.


Constructor Summary
PatternSerializer(File sourceDir, org.apache.commons.io.filefilter.IOFileFilter fileFilter, File targetDir)
          Constructor.
 
Method Summary
 org.apache.commons.logging.Log getLogger()
          Returns the logger.
static void main(String[] args)
          Command-line interface.
static org.apache.commons.cli.CommandLine parseCommandLine(org.apache.commons.cli.Options commandLineOptions, String[] args)
          Parses a command-line.
 void process()
          Serialize the selected files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternSerializer

public PatternSerializer(File sourceDir,
                         org.apache.commons.io.filefilter.IOFileFilter fileFilter,
                         File targetDir)
                  throws IOException
Constructor.

Parameters:
sourceDir - The directory containing the files to be processed.
fileFilter - The filter, if any, that should be applied to the files in @code{sourceDir}. This can be null.
targetDir - The directory into which the output files should be written.
Throws:
IOException - For invalid @code{sourceDir} or @code{targetDir}.
Method Detail

process

public void process()
Serialize the selected files.


getLogger

public org.apache.commons.logging.Log getLogger()
Returns the logger.

Returns:
The logger.

parseCommandLine

public static org.apache.commons.cli.CommandLine parseCommandLine(org.apache.commons.cli.Options commandLineOptions,
                                                                  String[] args)
                                                           throws org.apache.commons.cli.ParseException
Parses a command-line.

Parameters:
commandLineOptions - The command-line options controlling the parsing.
args - The command-line arguments to be parsed.
Returns:
The results of the parsing.
Throws:
org.apache.commons.cli.ParseException - For errors in args.

main

public static void main(String[] args)
Command-line interface.

Parameters:
args - The command-line arguments.


Copyright © 2017. All rights reserved.