|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nite.gui.util.NXTConfig
public class NXTConfig
This class facilitates access to the configuration file that is used to customize subclasses of
AbstractCallableTool
.
NXTConfig is used for accessing the customizations to the tools that can be made by the user.
These customizations are stored in XML (default in the file nxtConfig.xml, somewhere on the classpath).
Each tool defines its own element directly below the XML root of the file. For example, the AMI
DialogueActCoder defines the element DACoderConfig. In this element three types of children are allowed:
<corpussettings>
elements contain tool-specific information. This may include information about
a specific corpus, such as the name of the layer containing the speech transcriptions, or the name of the
dialogue act ontology. Such information is usually stored in the attributes of the corpussettings element.
<guisettings>
elements contain gui related settings information. This may include things
like window positions or keyboard shortcuts.
<metadatafile>
elements relate certain metadata filenames to the correct corpussettings
elements and the correct guisettings element.
AbstractCallableToolConfig
provides some more documentation
of the configuration possibilities for AbstractCallableTool.
loadConfig(String fileName)
allows you to load a different configuration file.
reloadConfig()
will reload the current configuration file. This is useful if the config file was
modified externally.
setConfigRoot(String newRoot)
determines which configuration element should be used.
setMetaDataFile(String fileName)
determines which metadata file is currently opened.
metadatafile
element.
getCorpusSettings()
returns an XML Node for the active corpussettings.
getGuiSettings()
returns an XML Node for the active guisettings.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_CONFIG
|
Constructor Summary | |
---|---|
NXTConfig()
INIT: no longer loads the default config file. |
Method Summary | |
---|---|
void |
checkSave()
Not yet implemented. |
org.w3c.dom.Node |
getCorpusSettings()
Give the current config root and metadata filename, returns the appropriate corpus settings Node. |
java.lang.String |
getCorpusSettingValue(java.lang.String attribute)
Easy access method for attribute values of the corpus settings node |
org.w3c.dom.Node |
getGuiSettings()
Give the current config root and metadata filename, returns the appropriate gui settings Node. |
java.lang.String |
getGuiSettingValue(java.lang.String attribute)
Easy access method for attribute values of the gui settings node |
void |
loadConfig(java.lang.String fileName)
Load the given config file. |
void |
reloadConfig()
Reload the current config file. |
void |
setConfigRoot(java.lang.String rootName)
Every tool can define its own settings. |
void |
setCorpusSettings(java.lang.String csi)
set the ID of the corpus-settings node to use. |
void |
setGUISettings(java.lang.String guid)
set the ID of the gui-settings node to use. |
void |
setMetaDataFile(java.lang.String fileName)
The config file contains separate entries to couple a metadata file to certain corpus settings and gui settings, in ordr to allow several metadata files to share the same settings. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String DEFAULT_CONFIG
Constructor Detail |
---|
public NXTConfig()
Method Detail |
---|
public void setCorpusSettings(java.lang.String csi)
public void setGUISettings(java.lang.String guid)
public void loadConfig(java.lang.String fileName) throws java.io.IOException, org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public void reloadConfig() throws java.io.IOException, org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public void setConfigRoot(java.lang.String rootName)
public void setMetaDataFile(java.lang.String fileName)
public org.w3c.dom.Node getCorpusSettings()
public org.w3c.dom.Node getGuiSettings()
public java.lang.String getCorpusSettingValue(java.lang.String attribute)
public java.lang.String getGuiSettingValue(java.lang.String attribute)
public void checkSave()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |