|
MaltParser 1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.maltparser.core.options.OptionManager
public class OptionManager
Option Manager is the management class for all option handling. All queries and manipulations of an option or an option value should go through this class.
| Field Summary | |
|---|---|
static int |
DEFAULTVALUE
|
| Constructor Summary | |
|---|---|
OptionManager()
Creates the Option Manager |
|
| Method Summary | |
|---|---|
void |
generateMaps()
Creates several option maps for fast access to individual options. |
int |
getNumberOfOptionValues(Integer containerIndex)
Returns the number of option values for a particular option container. |
OptionDescriptions |
getOptionDescriptions()
Returns the option description |
Object |
getOptionValue(Integer containerIndex,
String optiongroup,
String optionname)
Returns the option value for an option that is specified by the option group name and option name. |
Object |
getOptionValue(String optiongroup,
String optionname)
Returns the option value for an option that is specified by the option group name and the option name. |
String |
getOptionValueString(Integer containerIndex,
String optiongroup,
String optionname)
Returns a string representation of the option value for an option that is specified by the option group name and the option name. |
void |
loadOptionDescriptionFile()
Loads the option description file /appdata/options.xml |
void |
loadOptionDescriptionFile(URL url)
Loads the option description file |
void |
loadOptions(InputStreamReader isr)
Loads the saved options (options that are marked with usage=Option.SAVE). |
void |
loadOptions(String fileName)
Loads the saved options (options that are marked with usage=save). |
void |
overloadOptionValue(Integer containerIndex,
String optiongroup,
String optionname,
String value)
Overloads the option value specified by the container index, the option group name, the option name. |
void |
parseCommandLine(String[] args)
Parses the command line arguments. |
void |
parseOptionInstanceXMLfile(String fileName)
Parses the option file for option values. |
void |
saveOptions(Integer containerIndex,
OutputStreamWriter osw)
Saves all options that are marked as usage=Option.SAVE for a particular option container. |
void |
saveOptions(Integer containerIndex,
String fileName)
Saves all options that are marked as usage=Option.SAVE for a particular option container. |
void |
saveOptions(OutputStreamWriter osw)
Saves all options that are marked as usage=Option.SAVE |
void |
saveOptions(String fileName)
Saves all options that are marked as usage=Option.SAVE |
String |
toString()
|
String |
toStringPrettyValues(Integer containerIndex,
HashSet<String> excludeGroups)
Returns a string representation of all option value, except the options in a option group specified by the excludeGroup argument. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULTVALUE
| Constructor Detail |
|---|
public OptionManager()
| Method Detail |
|---|
public void loadOptionDescriptionFile()
throws MaltChainedException
/appdata/options.xml
MaltChainedException
public void loadOptionDescriptionFile(URL url)
throws MaltChainedException
url - URL of the option description file
MaltChainedExceptionpublic OptionDescriptions getOptionDescriptions()
public Object getOptionValue(Integer containerIndex,
String optiongroup,
String optionname)
throws MaltChainedException
containerIndex - The index of the option container (0..n and -1 is default values).optiongroup - The name of the option group.optionname - The name of the option.
OptionException
MaltChainedException
public Object getOptionValue(String optiongroup,
String optionname)
throws MaltChainedException
optiongroup - The name of the option group.optionname - The name of the option.
OptionException
MaltChainedException
public String getOptionValueString(Integer containerIndex,
String optiongroup,
String optionname)
throws MaltChainedException
containerIndex - The index of the option container (0..n and -1 is default values).optiongroup - The name of the option group.optionname - The name of the option.
MaltChainedException
public void overloadOptionValue(Integer containerIndex,
String optiongroup,
String optionname,
String value)
throws MaltChainedException
containerIndex - the index of the option container (0..n and -1 is default values).optiongroup - the name of the option group.optionname - the name of the option.value - the option value that should replace the current option value.
MaltChainedExceptionpublic int getNumberOfOptionValues(Integer containerIndex)
containerIndex - The index of the option container (0..n).
public void loadOptions(String fileName)
throws MaltChainedException
usage=save).
fileName - The path to the file where to load the saved options.
MaltChainedException
public void loadOptions(InputStreamReader isr)
throws MaltChainedException
usage=Option.SAVE).
isr - the input stream reader of the saved options file.
MaltChainedException
public void saveOptions(String fileName)
throws MaltChainedException
usage=Option.SAVE
fileName - The path to the file where the saveOption should by saved.
MaltChainedException
public void saveOptions(OutputStreamWriter osw)
throws MaltChainedException
usage=Option.SAVE
osw - the output stream writer of the saved option file
MaltChainedException
public void saveOptions(Integer containerIndex,
String fileName)
throws MaltChainedException
containerIndex - The index of the option container (0..n).fileName - The path to the file where the saveOption should by saved.
MaltChainedException
public void saveOptions(Integer containerIndex,
OutputStreamWriter osw)
throws MaltChainedException
containerIndex - The index of the option container (0..n).osw - the output stream writer of the saved option file
MaltChainedException
public void generateMaps()
throws MaltChainedException
OptionException
MaltChainedException
public void parseCommandLine(String[] args)
throws MaltChainedException
args - An array of arguments that are supplied when starting the application.
OptionException
MaltChainedException
public void parseOptionInstanceXMLfile(String fileName)
throws MaltChainedException
fileName - The option file name (must be a xml file).
OptionException
MaltChainedException
public String toStringPrettyValues(Integer containerIndex,
HashSet<String> excludeGroups)
throws MaltChainedException
containerIndex - The index of the option container (0..n and -1 is default values).excludeGroups - a set of option group names that should by excluded in the string representation
MaltChainedExceptionpublic String toString()
toString in class Object
|
MaltParser 1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||