public class App extends Object
Modifier and Type | Field and Description |
---|---|
static String |
OASIS_DTD |
static String |
OASIS_PUBLIC_ID |
static String |
SAX_DRIVER_DEFAULT |
static String |
SAX_DRIVER_PROPERTY |
static String |
TRANSFORMER_FACTORY_DEFAULT |
static String |
TRANSFORMER_FACTORY_PROPERTY |
Constructor and Description |
---|
App(String[] _args,
String[] _optList,
OptionHandler _optHandler,
HashMap _customOpts,
boolean _wantOutput,
int _numDtds,
String _cmdLineSyntax,
String _usageHeader)
Constructor.
|
App(String[] _args,
String[] _optList,
OptionHandler _optHandler,
HashMap _customOpts,
boolean _wantOutput,
String _cmdLineSyntax,
String _usageHeader)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.apache.commons.cli.Options |
getActiveOpts()
Get the currently active Options
|
boolean |
getDebug()
If --debug was given, this returns true, otherwise false.
|
DtdSpecifier |
getDtdSpec()
Get the DtdSpecifier.
|
DtdSpecifier |
getDtdSpec(int i)
Same, but use this when there are multiple dtds allowed.
|
int |
getDtdSpecType()
Gets the DTD specification type, either 'd', 's', or 'p'.
|
int |
getDtdSpecType(int i)
Same, but use this one when there are multiple dtds allowed.
|
String |
getDtdSpecValue()
Gets the DTD specification value, either a filename ('d'), a
system identifier, or a public identifier.
|
String |
getDtdSpecValue(int i)
Same, but use this one when there are multiple dtds allowed.
|
String |
getDtdTitle()
If --title was given, this returns the value, otherwise null.
|
String |
getDtdTitle(int i)
Same, but use this when there are multiple dtds allowed.
|
InputSource |
getDummyXml()
If -s or -p were used, this should hold the dummy XML file
|
InputSource |
getDummyXml(int i)
Same, but use this one when there are multiple dtds allowed.
|
File |
getHome()
Get the home directory.
|
org.apache.commons.cli.CommandLine |
getLine()
Get the parsed command line.
|
StreamResult |
getOutput()
Get the output file/stream.
|
org.apache.xml.resolver.tools.CatalogResolver |
getResolver()
If --catalog was given, this will return a valid object, otherwise null.
|
String[] |
getRoots()
If --roots was given, this returns the value as an array
|
Transformer |
getXslt()
If --xslt was given, this will return a Transformer object.
|
ArrayList |
getXsltParams()
If --params was given, this returns the keys and values in an alternating array.
|
boolean |
handleOption(org.apache.commons.cli.Option opt)
Here is where we handle any of the common command-line options.
|
void |
initialize()
This function does all the work, after the App object has been instantiated.
|
void |
printUsage()
Outputs usage message to standard output
|
void |
printUsage(OutputStream os)
Outputs the usage message to an output stream (System.out or System.err).
|
void |
setXslt(Transformer _xslt)
Allows an application class to set the XSLT transformer object.
|
void |
usageError(String msg)
Use this when there's a serious error in the command line
|
public static final String SAX_DRIVER_PROPERTY
public static final String SAX_DRIVER_DEFAULT
public static final String TRANSFORMER_FACTORY_PROPERTY
public static final String TRANSFORMER_FACTORY_DEFAULT
public static final String OASIS_DTD
public static final String OASIS_PUBLIC_ID
public App(String[] _args, String[] _optList, OptionHandler _optHandler, HashMap _customOpts, boolean _wantOutput, String _cmdLineSyntax, String _usageHeader)
public void initialize()
public boolean handleOption(org.apache.commons.cli.Option opt)
public File getHome()
public org.apache.commons.cli.CommandLine getLine()
public org.apache.commons.cli.Options getActiveOpts()
public DtdSpecifier getDtdSpec()
public DtdSpecifier getDtdSpec(int i)
public int getDtdSpecType()
public int getDtdSpecType(int i)
public String getDtdSpecValue()
public String getDtdSpecValue(int i)
public InputSource getDummyXml()
public InputSource getDummyXml(int i)
public String getDtdTitle()
public String getDtdTitle(int i)
public org.apache.xml.resolver.tools.CatalogResolver getResolver()
public Transformer getXslt()
public void setXslt(Transformer _xslt)
public String[] getRoots()
public ArrayList getXsltParams()
public boolean getDebug()
public StreamResult getOutput()
public void printUsage()
public void printUsage(OutputStream os)
public void usageError(String msg)