org.foray.app
Class CommandLineOptions

java.lang.Object
  extended by org.foray.app.CommandLineOptions

public class CommandLineOptions
extends Object

Parses the commandline arguments.


Field Summary
static int INPUT_FO
          Constant indicating that the input is XSL-FO.
static int INPUT_NOT_SET
          Constant indicating that the input mode has not been set.
static int INPUT_XSLT
          Constant indicating that the input is XML + XSLT.
 
Constructor Summary
CommandLineOptions(org.apache.commons.cli.CommandLine parsedCommandLine)
          Constructor.
 
Method Summary
 URL getFOFile()
          Returns the parsed FO file location.
 int getInputMode()
          Returns the parsed input mode.
 String getLanguage()
          Returns the parsed language.
 File getOutputFile()
          Returns the parsed output file location.
 OutputTargetType getOutputMode()
          Returns the output type specified on the command-line.
 OutputConfig getRendererOptions()
          Returns the renderer options.
 SessionConfig getSessionConfig()
          Returns the session configuration.
 Starter getStarter()
          Returns the starter to use for starting the application.
 URL getUserConfigFile()
          Returns the parsed user configuration file location.
 URL getXMLFile()
          Returns the parsed XML file location.
 URL getXSLFile()
          Returns the parsed XSLT stylesheet file location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUT_NOT_SET

public static final int INPUT_NOT_SET
Constant indicating that the input mode has not been set.

See Also:
Constant Field Values

INPUT_FO

public static final int INPUT_FO
Constant indicating that the input is XSL-FO.

See Also:
Constant Field Values

INPUT_XSLT

public static final int INPUT_XSLT
Constant indicating that the input is XML + XSLT.

See Also:
Constant Field Values
Constructor Detail

CommandLineOptions

public CommandLineOptions(org.apache.commons.cli.CommandLine parsedCommandLine)
                   throws ConfigurationException
Constructor.

Parameters:
parsedCommandLine - The command line parsed by Commons CLI. This class assumes that these options are consistent with the command-line API. If they are not, the results are undefined. Any testing for consistency should be done upstream. This does NOT mean, for example, that all URLs are valid, only that they are specified in the right place.
Throws:
ConfigurationException - For errors parsing options.
Method Detail

getOutputMode

public OutputTargetType getOutputMode()
Returns the output type specified on the command-line.

Returns:
The output type.

getRendererOptions

public OutputConfig getRendererOptions()
Returns the renderer options.

Returns:
The renderer options.

getSessionConfig

public SessionConfig getSessionConfig()
Returns the session configuration.

Returns:
The session configuration.

getStarter

public Starter getStarter()
                   throws FOrayException
Returns the starter to use for starting the application.

Returns:
The starter to use to start the application.
Throws:
FOrayException - For errors creating the starter.

getInputMode

public int getInputMode()
Returns the parsed input mode.

Returns:
The parsed inlput mode.

getFOFile

public URL getFOFile()
Returns the parsed FO file location.

Returns:
The parsed FO file location.

getXMLFile

public URL getXMLFile()
Returns the parsed XML file location.

Returns:
The parsed XML file location.

getXSLFile

public URL getXSLFile()
Returns the parsed XSLT stylesheet file location.

Returns:
The parsed XSLT stylesheet file location.

getOutputFile

public File getOutputFile()
Returns the parsed output file location.

Returns:
The parsed output file location.

getUserConfigFile

public URL getUserConfigFile()
Returns the parsed user configuration file location.

Returns:
The parsed user configuration file location.

getLanguage

public String getLanguage()
Returns the parsed language.

Returns:
The parsed language.


Copyright © 2017. All rights reserved.