Package writer2latex.base
Class ConfigBase
java.lang.Object
writer2latex.base.ConfigBase
- All Implemented Interfaces:
Config
- Direct Known Subclasses:
LaTeXConfig
,XhtmlConfig
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ComplexOption
addComplexOption
(String sGroup) getComplexOption
(String sGroup) Get a complex optionprotected abstract String
Get a named optionprotected abstract int
void
Read a configuration (file based version)void
read
(InputStream is) Read configuration from a specified input streamvoid
readDefaultConfig
(String sName) Read a default configuration: The available configurations depend on theConverter
implementationprotected abstract void
Read configuration information from an xml element.void
Set a name/value option.void
Write the configuration (file based version)void
write
(OutputStream os) Write the configuration (stream based version)protected abstract void
writeInner
(Document dom) Write configuration information to an xml document.
-
Field Details
-
options
-
optionGroups
-
-
Constructor Details
-
ConfigBase
public ConfigBase()
-
-
Method Details
-
getOptionCount
protected abstract int getOptionCount() -
getDefaultConfigPath
-
setOption
Description copied from interface:Config
Set a name/value option. Options that are not defined by theConverter
implementation as well as null values are silently ignored -
getOption
Description copied from interface:Config
Get a named option -
getComplexOption
Description copied from interface:Config
Get a complex option- Specified by:
getComplexOption
in interfaceConfig
- Parameters:
sGroup
- the name of the complex option- Returns:
- the option
-
addComplexOption
-
readDefaultConfig
Description copied from interface:Config
Read a default configuration: The available configurations depend on theConverter
implementation- Specified by:
readDefaultConfig
in interfaceConfig
- Parameters:
sName
- the name of the configuration- Throws:
IllegalArgumentException
- if the configuration does not exist
-
read
Read configuration from a specified input stream
- Specified by:
read
in interfaceConfig
- Parameters:
is
- the input stream to read the configuration from- Throws:
IOException
- if an error occurs reading the stream, or the data is not in the right format
-
read
Description copied from interface:Config
Read a configuration (file based version)- Specified by:
read
in interfaceConfig
- Parameters:
file
- theFile
to read from- Throws:
IOException
- if the file does not exist, an error occurs reading the file, or the data is not in the right format
-
readInner
Read configuration information from an xml element. The subclass must define this to read richer configuration data -
write
Description copied from interface:Config
Write the configuration (stream based version)- Specified by:
write
in interfaceConfig
- Parameters:
os
- theOutputStream
to write to- Throws:
IOException
- if an error occurs writing to the stream
-
write
Description copied from interface:Config
Write the configuration (file based version)- Specified by:
write
in interfaceConfig
- Parameters:
file
- theFile
to write to- Throws:
IOException
- if an error occurs writing to the file
-
writeInner
Write configuration information to an xml document. The subclass must define this to write richer configuration data
-