Package org.apache.fop.cli
Class CommandLineOptions
java.lang.Object
org.apache.fop.cli.CommandLineOptions
Options parses the commandline arguments
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
input: Area Tree XML filestatic final int
input: fo filestatic final int
input: Intermediate Format XML filestatic final int
input: Image filestatic final int
(input) not setstatic final int
Used to indicate that only the result of the XSL transformation should be outputstatic final int
input: xml+xsl file -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the XSL-FO file if set.protected FOUserAgent
Get the FOUserAgent for this Command-Line runReturns the input file.org.apache.commons.logging.Log
Get the logger.Returns the output fileprotected String
Returns the user configuration file to be used.Returns the input XML file if set.Returns the stylesheet to be used for transformation to XSL-FO.Indicates whether the XML renderer should generate coarse area XMLboolean
Indicates whether input comes from standard input (stdin).boolean
Indicates whether output is sent to standard output (stdout).boolean
Parses the command line arguments.static void
printUsage
(PrintStream out) Shows the command line syntax including a summary of all available options and some examples.
-
Field Details
-
RENDER_NONE
public static final int RENDER_NONEUsed to indicate that only the result of the XSL transformation should be output- See Also:
-
NOT_SET
public static final int NOT_SET(input) not set- See Also:
-
FO_INPUT
public static final int FO_INPUTinput: fo file- See Also:
-
XSLT_INPUT
public static final int XSLT_INPUTinput: xml+xsl file- See Also:
-
AREATREE_INPUT
public static final int AREATREE_INPUTinput: Area Tree XML file- See Also:
-
IF_INPUT
public static final int IF_INPUTinput: Intermediate Format XML file- See Also:
-
IMAGE_INPUT
public static final int IMAGE_INPUTinput: Image file- See Also:
-
-
Constructor Details
-
CommandLineOptions
public CommandLineOptions()Construct a command line option object.
-
-
Method Details
-
parse
Parses the command line arguments.- Parameters:
args
- the command line arguments.- Returns:
- true if the processing can continue, false to abort
- Throws:
FOPException
- for general errorsIOException
- if the the configuration file could not be loaded
-
getInputHandler
- Returns:
- the InputHandler instance defined by the command-line options.
-
getLogger
public org.apache.commons.logging.Log getLogger()Get the logger.- Returns:
- the logger
-
getOutputFormat
- Returns:
- the chosen output format (MIME type)
- Throws:
FOPException
- for invalid output formats
-
getFOUserAgent
Get the FOUserAgent for this Command-Line run- Returns:
- FOUserAgent instance
-
getFOFile
Returns the XSL-FO file if set.- Returns:
- the XSL-FO file, null if not set
-
getXMLFile
Returns the input XML file if set.- Returns:
- the input XML file, null if not set
-
getXSLFile
Returns the stylesheet to be used for transformation to XSL-FO.- Returns:
- stylesheet
-
getOutputFile
Returns the output file- Returns:
- the output file
-
getUserConfigFile
Returns the user configuration file to be used.- Returns:
- the userconfig.xml file
-
isCoarseAreaXml
Indicates whether the XML renderer should generate coarse area XML- Returns:
- true if coarse area XML is desired
-
isInputFromStdIn
public boolean isInputFromStdIn()Indicates whether input comes from standard input (stdin).- Returns:
- true if input comes from standard input (stdin)
-
isOutputToStdOut
public boolean isOutputToStdOut()Indicates whether output is sent to standard output (stdout).- Returns:
- true if output is sent to standard output (stdout)
-
getInputFile
Returns the input file.- Returns:
- either the fofile or the xmlfile
-
printUsage
Shows the command line syntax including a summary of all available options and some examples.- Parameters:
out
- the stream to which the message must be printed
-