public class Parameters extends Object implements IParameters
| Modifier and Type | Field and Description |
|---|---|
InlineCodeFinder |
codeFinder |
boolean |
escapeGT |
boolean |
escapeLineBreak |
boolean |
escapeNbsp |
boolean |
escapeQuotes |
boolean |
extractIfOnlyCodes |
boolean |
inlineCdata |
boolean |
lineBreakAsCode |
boolean |
mapAnnotations |
boolean |
omitXMLDeclaration |
boolean |
protectEntityRef |
int |
quoteMode |
boolean |
quoteModeDefined |
String |
simplifierRules |
boolean |
useCodeFinder |
| Constructor and Description |
|---|
Parameters() |
| Modifier and Type | Method and Description |
|---|---|
void |
fromString(String data)
Parses the parameters stored into a string back into the object.
|
boolean |
getBoolean(String name)
Gets the boolean value for the given parameter name.
|
Document |
getDocument() |
int |
getInteger(String name)
Gets the integer value for a given parameter name.
|
ParametersDescription |
getParametersDescription()
Gets the description of the parameters.
|
String |
getPath()
Gets the full path of the last file where the parameters where loaded
from or saved to.
|
String |
getSimplifierRules() |
String |
getString(String name)
Gets the string value for a given parameter name.
|
URI |
getURI() |
void |
load(InputStream inStream,
boolean ignoreErrors)
Loads the parameters from a file.
|
void |
load(URL inputURL,
boolean ignoreErrors)
Loads the parameters from a file.
|
void |
reset()
Reset the parameters to their default values.
|
void |
save(String filePath)
Saves the parameters to a file.
|
void |
setBoolean(String name,
boolean value)
Sets the boolean value for a given parameter name.
|
void |
setInteger(String name,
int value)
Sets the integer value for a given parameter name.
|
void |
setPath(String filePath)
Sets the full path of the file where the parameters are to be
saved to.
|
void |
setSimplifierRules(String simplifierRules) |
void |
setString(String name,
String value)
Sets the string value for a given parameter name.
|
String |
toString()
Converts the parameters into a string.
|
public boolean useCodeFinder
public InlineCodeFinder codeFinder
public boolean escapeGT
public boolean escapeNbsp
public boolean protectEntityRef
public boolean escapeLineBreak
public boolean lineBreakAsCode
public boolean omitXMLDeclaration
public boolean escapeQuotes
public boolean extractIfOnlyCodes
public boolean mapAnnotations
public boolean inlineCdata
public boolean quoteModeDefined
public int quoteMode
public String simplifierRules
public String toString()
IParameterstoString in interface IParameterstoString in class Objectpublic void fromString(String data)
IParametersfromString in interface IParametersdata - the string holding the parameters. It must be formatted as
the string generated by toString(). Line-breaks must be normalized to '\n'.
It can also be null or empty, in such case the parameters are left with
their current values. Use reset() to reset the parameters to their defaults.public String getPath()
IParametersgetPath in interface IParameterspublic void setPath(String filePath)
IParameterssetPath in interface IParametersfilePath - the full path to set.public void load(URL inputURL, boolean ignoreErrors)
IParametersload in interface IParametersinputURL - URL of the parameters file to load.ignoreErrors - true if the load should ignore any error
such as file not found. If an error occurs and this is set to true,
the method should create the parameters object with its default values.public void load(InputStream inStream, boolean ignoreErrors)
IParametersload in interface IParametersinStream - input stream with the parameters to load.ignoreErrors - true if the load should ignore any error
such as file not found. If an error occurs and this is set to true,
the method should create the parameters object with its default values.public void reset()
IParametersreset in interface IParameterspublic void save(String filePath)
IParameterssave in interface IParametersfilePath - the full path of the parameters file to save.public Document getDocument()
public URI getURI()
public boolean getBoolean(String name)
IParametersgetBoolean in interface IParametersname - the name of the boolean parameter to retrieve.public void setBoolean(String name, boolean value)
IParameterssetBoolean in interface IParametersname - the name of the parameter to set.value - the new value to set.public String getString(String name)
IParametersgetString in interface IParametersname - the name of the string parameter to retrieve.public void setString(String name, String value)
IParameterssetString in interface IParametersname - the name of the parameter to set.value - the new value to set.public int getInteger(String name)
IParametersgetInteger in interface IParametersname - the name of the integer parameter to retrieve.public void setInteger(String name, int value)
IParameterssetInteger in interface IParametersname - the name of the parameter to set.value - the new value to set.public ParametersDescription getParametersDescription()
IParametersgetParametersDescription in interface IParameterspublic String getSimplifierRules()
public void setSimplifierRules(String simplifierRules)
Copyright © 2021. All rights reserved.