public class OptionDescriptions extends Object
/appdata/options.xml
, but also
from a plugin option description file (always with the name plugin.xml
).Constructor and Description |
---|
OptionDescriptions()
Creates the Option Descriptions
|
Modifier and Type | Method and Description |
---|---|
void |
generateMaps()
Creates several option maps for fast access to individual options.
|
Option |
getOption(String optionflag)
Returns an option based on the option flag
|
Option |
getOption(String optiongroup,
String optionname)
Returns an option based on the option name and/or the option group name
|
protected Collection<Option> |
getOptionGroupList(String groupname)
Returns a collection of option that are member of an option group
|
TreeSet<String> |
getOptionGroupNameSet()
Return a sorted set of option group names
|
Set<Option> |
getSaveOptionSet()
Returns a set of option that are marked as SAVEOPTION
|
boolean |
hasOptions() |
void |
parseOptionDescriptionXMLfile(URL url)
Parse a XML file that contains the options used for controlling the application.
|
String |
toString() |
String |
toStringMaps()
Returns a string representation that contains printable information of several options maps
|
String |
toStringOptionGroup(String groupname)
Returns a string representation of a option group without the option group name in the string.
|
public OptionDescriptions()
public Option getOption(String optiongroup, String optionname) throws MaltChainedException
optiongroup
- the name of the option groupoptionname
- the option nameMaltChainedException
public Option getOption(String optionflag) throws MaltChainedException
optionflag
- the option flagMaltChainedException
public Set<Option> getSaveOptionSet()
public TreeSet<String> getOptionGroupNameSet()
protected Collection<Option> getOptionGroupList(String groupname)
groupname
- the name of the option grouppublic void parseOptionDescriptionXMLfile(URL url) throws MaltChainedException
url
- The path to a XML file that explains the options used in the application.OptionException
MaltChainedException
public boolean hasOptions()
public void generateMaps() throws MaltChainedException
OptionException
MaltChainedException
public String toStringMaps()
public String toStringOptionGroup(String groupname)
groupname
- The option group nameCopyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.