writer2latex.base

Class ConfigBase

Implemented Interfaces:
Config
Known Direct Subclasses:
LaTeXConfig, XhtmlConfig

public abstract class ConfigBase
extends java.lang.Object
implements Config

Base implementation of writer2latex.api.Config

Field Summary

protected Option[]
options

Constructor Summary

ConfigBase()

Method Summary

protected abstract String
getDefaultConfigPath()
String
getOption(String sName)
protected abstract int
getOptionCount()
void
read(File file)
void
read(InputStream is)
Read configuration from a specified input stream
void
readDefaultConfig(String sName)
protected abstract void
readInner(Element elm)
Read configuration information from an xml element.
void
setOption(String sName, String sValue)
void
write(File file)
void
write(OutputStream os)
protected abstract void
writeInner(Document dom)
Write configuration information to an xml document.

Field Details

options

protected Option[] options

Constructor Details

ConfigBase

public ConfigBase()

Method Details

getDefaultConfigPath

protected abstract String getDefaultConfigPath()

getOption

public String getOption(String sName)
Specified by:
getOption in interface Config

getOptionCount

protected abstract int getOptionCount()

read

public void read(File file)
            throws IOException
Specified by:
read in interface Config

read

public void read(InputStream is)
            throws IOException
Read configuration from a specified input stream
Specified by:
read in interface Config
Parameters:
is - the input stream to read the configuration from

readDefaultConfig

public void readDefaultConfig(String sName)
            throws IllegalArgumentException
Specified by:
readDefaultConfig in interface Config

readInner

protected abstract void readInner(Element elm)
Read configuration information from an xml element. The subclass must define this to read richer configuration data

setOption

public void setOption(String sName,
                      String sValue)
Specified by:
setOption in interface Config

write

public void write(File file)
            throws IOException
Specified by:
write in interface Config

write

public void write(OutputStream os)
            throws IOException
Specified by:
write in interface Config

writeInner

protected abstract void writeInner(Document dom)
Write configuration information to an xml document. The subclass must define this to write richer configuration data