net.sourceforge.nite.gui.util
Class AbstractCallableToolConfig

java.lang.Object
  extended by net.sourceforge.nite.gui.util.AbstractCallableToolConfig
Direct Known Subclasses:
AmigramConfig, CSLConfig, DACoderConfig, TestCoderConfig

public class AbstractCallableToolConfig
extends java.lang.Object

AbstractCallableToolConfig subclasses define all the different settings needed in the abstract callable tool class. Subclasses of this config class can define hardcoded settings (things that the user should NOT be able to modify, such as whether you are allowed to select text from multiple agents) and customizable settings (through the nxtConfig.xml file, see also the NXTConfig class.). By overriding this class you can switch a setting from being user-configurable to being hardcoded and vice versa.
The best example of the different possibilities of these configurations is given by the DACoderConfig subclass, which shows both the use of hardcoded settings and user-customizable settings (e.g. name of dialogue act elements).

Use pattern

now all settings are available. Some getmethods will internally get the requested setting from the NXTConfig object. Subclasses off this config class MUST document which of those settings are taken from config file. Some getMethods will return hard-coded values (if for a certain tool a certain value should ALWAYS be the same, such as getAllowMultiAgentSelect or getHelpSetName for the AMI Dialogue act coder.)
This construction allows a programmer to have part of the settings hard coded, i.e. the user cannot modify them, and part of the settings user-customizable, i.e. the user can change them by modifying the configuration XML file.

See also NXTConfig

Author:
Dennis Reidsma, UTwente

Constructor Summary
AbstractCallableToolConfig()
           
 
Method Summary
 void clearCachedValues()
          Clears any cached values.
 boolean getAllowAnnotationSelect()
           
 boolean getAllowMultiAgentSelect()
           
 boolean getAllowTranscriptSelect()
           
 java.lang.String getApplicationName()
          Default: applicationtitle attribute in guisettings
 java.util.Set getDisplayedAnnotationNames()
           
 java.lang.String getHelpSetName()
           
 NXTConfig getNXTConfig()
          Returns the config object.
 java.lang.String getNXTConfigRootName()
          Override if you need other rootname
 java.lang.String getSegmentationElementName()
          Default: segmentationelementname attribute in corpussettings
 java.lang.String getTranscriptionAttribute()
          Default: transcriptionattribute attribute in corpussettings
 java.lang.String getTranscriptionLayerName()
          Default: transcriptionlayername attribute in corpussettings
 TranscriptionToTextDelegate getTranscriptionToTextDelegate()
          Default: new instance of class defined in transcriptiondelegateclassname attribute in corpussettings
 int getWordlevelSelectionType()
           
 void initDisplayedAnnotationNames()
          Initializes value from settings...
 void loadConfig(java.lang.String newFile)
          Set the file name of the config file.
 void reloadConfig()
          Reload the current config file.
 void setCorpusSettings(java.lang.String corpussets)
          set the name of the corpus-settings we will use
 void setGUISettings(java.lang.String guisets)
          set the name of the gui-settings we will use
 void setMetaDataFile(java.lang.String newFile)
          Set the file name of the metadata file.
 boolean showLogWindows()
          showlogwindow attribute in guisettings
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCallableToolConfig

public AbstractCallableToolConfig()
Method Detail

clearCachedValues

public void clearCachedValues()
Clears any cached values. Extend this method if your config class caches extra values!


getNXTConfig

public NXTConfig getNXTConfig()
Returns the config object. If needed, load and create the object.


getNXTConfigRootName

public java.lang.String getNXTConfigRootName()
Override if you need other rootname


loadConfig

public void loadConfig(java.lang.String newFile)
                throws java.io.IOException,
                       org.xml.sax.SAXException
Set the file name of the config file. If called, settings will be reloaded. Passes on to NXTConfig.loadConfig(fileName)

Throws:
java.io.IOException
org.xml.sax.SAXException

reloadConfig

public void reloadConfig()
                  throws java.io.IOException,
                         org.xml.sax.SAXException
Reload the current config file. If called, settings will be reloaded. Useful when config file was externally modified. Passes on to NXTConfig.reloadConfig()

Throws:
java.io.IOException
org.xml.sax.SAXException

setMetaDataFile

public void setMetaDataFile(java.lang.String newFile)
Set the file name of the metadata file. If called, settings will be reloaded. Passes on to NXTConfig.setMetaDataFile()


getSegmentationElementName

public java.lang.String getSegmentationElementName()
Default: segmentationelementname attribute in corpussettings


getTranscriptionLayerName

public java.lang.String getTranscriptionLayerName()
Default: transcriptionlayername attribute in corpussettings


getTranscriptionAttribute

public java.lang.String getTranscriptionAttribute()
Default: transcriptionattribute attribute in corpussettings


getTranscriptionToTextDelegate

public TranscriptionToTextDelegate getTranscriptionToTextDelegate()
Default: new instance of class defined in transcriptiondelegateclassname attribute in corpussettings


getApplicationName

public java.lang.String getApplicationName()
Default: applicationtitle attribute in guisettings


showLogWindows

public boolean showLogWindows()
showlogwindow attribute in guisettings


setCorpusSettings

public void setCorpusSettings(java.lang.String corpussets)
set the name of the corpus-settings we will use


setGUISettings

public void setGUISettings(java.lang.String guisets)
set the name of the gui-settings we will use


initDisplayedAnnotationNames

public void initDisplayedAnnotationNames()
Initializes value from settings... Override for your application! Determines which annotation elements should be displayed. Set of strings... maybe a config setting, later Default is empty set.


getDisplayedAnnotationNames

public java.util.Set getDisplayedAnnotationNames()

getWordlevelSelectionType

public int getWordlevelSelectionType()

getAllowTranscriptSelect

public boolean getAllowTranscriptSelect()

getAllowAnnotationSelect

public boolean getAllowAnnotationSelect()

getAllowMultiAgentSelect

public boolean getAllowMultiAgentSelect()

getHelpSetName

public java.lang.String getHelpSetName()