Package writer2latex.api
Interface Config
public interface Config
-
Method Summary
Modifier and TypeMethodDescriptiongetComplexOption(String sName) Get a complex optionGet a named optionGet the definitions of all defined parameters.voidRead a configuration (file based version)voidread(InputStream is) Read a configuration (stream based version)voidreadDefaultConfig(String sName) Read a default configuration: The available configurations depend on theConverterimplementationvoidSet a name/value option.voidWrite the configuration (file based version)voidwrite(OutputStream os) Write the configuration (stream based version)
-
Method Details
-
readDefaultConfig
Read a default configuration: The available configurations depend on theConverterimplementation- Parameters:
sName- the name of the configuration- Throws:
IllegalArgumentException- if the configuration does not exist
-
read
Read a configuration (stream based version)- Parameters:
is- theInputStreamto read from- Throws:
IOException- if an error occurs reading the stream, or the data is not in the right format
-
read
Read a configuration (file based version)- Parameters:
file- theFileto 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
-
write
Write the configuration (stream based version)- Parameters:
os- theOutputStreamto write to- Throws:
IOException- if an error occurs writing to the stream
-
write
Write the configuration (file based version)- Parameters:
file- theFileto write to- Throws:
IOException- if an error occurs writing to the file
-
getParameters
Get the definitions of all defined parameters. Parameters are defined in configuration files. A parameter has a name and a list of associated values, the first value being the default value. The actual values are accessed as ordinary options. The current value of parameters are automatically applied to option values by the the get method.- Returns:
- map from parameter names to list of possible parameter values
-
setOption
Set a name/value option. Options that are not defined by theConverterimplementation as well as null values are silently ignored- Parameters:
sName- the name of the optionsValue- the value of the option
-
getOption
Get a named option- Parameters:
sName- the name of the option- Returns:
- the value of the option, or
nullif the option does not exist or the given name is null
-
getComplexOption
Get a complex option- Parameters:
sName- the name of the complex option- Returns:
- the option
-