net.sourceforge.nite.tools.videolabeler
Class CSLConfig

java.lang.Object
  extended by net.sourceforge.nite.gui.util.AbstractCallableToolConfig
      extended by net.sourceforge.nite.tools.videolabeler.CSLConfig

public class CSLConfig
extends AbstractCallableToolConfig

This class contains settings for the CSL tool. See also superclass and NXTConfig class. The root name of the CSL configuration element is "CSLConfig".


Method Summary
 boolean autoKeyStrokes()
          Returns the value of the "autokeystrokes" attribute.
 java.lang.String getAttributeValue(org.w3c.dom.Node node, java.lang.String attrName)
          Returns the value of an attribute of the specified node.
 java.lang.String getHelpSetName()
          Returns the name of the help set.
static CSLConfig getInstance()
          Returns the singleton CSL configuration object.
 java.lang.String getLayerClass(org.w3c.dom.Node layerinfo)
          Returns the qualified class name of the AnnotationLayer subclass for the specified layerinfo element.
 java.lang.String getLayerCodeName(org.w3c.dom.Node layerinfo)
          Returns the name of the code elements that represent the annotations for the specified layerinfo element.
 java.lang.String getLayerControlPanelClass(org.w3c.dom.Node layerinfo)
          Returns the qualified class name of the TargetControlPanel subclass for the specified layerinfo element.
 org.w3c.dom.Node getLayerInfo(java.lang.String layername)
          Returns the layerinfo element for the specified layer.
 java.util.List getLayerInfoList()
          Returns a list with all layerinfo elements (Node objects) for the current corpus.
 java.lang.String getLayerName(org.w3c.dom.Node layerinfo)
          Returns the layer name of the specified layerinfo element.
 java.lang.String getNXTConfigRootName()
          Returns the root name of the CSL configuration element.
 java.lang.String getPreferredTimeDisplay()
          Returns the type of time display we prefer ('seconds' or 'minutes').
 java.lang.String getShowKeyStrokes()
          Returns the value of the "showkeystrokes" attribute.
 int getSyncRate()
          Returns the value of the "syncrate" attribute.
 boolean getUseSegmentReplayer()
          segmentreplayer attribute in config.
 boolean makeContinuous()
          Returns the value of the "continuous" attribute.
 boolean merge()
          Returns the value of the "merge" attribute.
 
Methods inherited from class net.sourceforge.nite.gui.util.AbstractCallableToolConfig
clearCachedValues, getAllowAnnotationSelect, getAllowMultiAgentSelect, getAllowTranscriptSelect, getApplicationName, getDisplayedAnnotationNames, getNXTConfig, getSegmentationElementName, getTranscriptionAttribute, getTranscriptionLayerName, getTranscriptionToTextDelegate, getWordlevelSelectionType, initDisplayedAnnotationNames, loadConfig, reloadConfig, setCorpusSettings, setGUISettings, setMetaDataFile, showLogWindows
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CSLConfig getInstance()

Returns the singleton CSL configuration object. Don't forget to set the metadata file.

Returns:
the singleton CSL configuration object

getNXTConfigRootName

public java.lang.String getNXTConfigRootName()

Returns the root name of the CSL configuration element.

Overrides:
getNXTConfigRootName in class AbstractCallableToolConfig
Returns:
the root name of the CSL configuration element

getLayerInfoList

public java.util.List getLayerInfoList()

Returns a list with all layerinfo elements (Node objects) for the current corpus.

Returns:
a list with layerinfo elements

getAttributeValue

public java.lang.String getAttributeValue(org.w3c.dom.Node node,
                                          java.lang.String attrName)

Returns the value of an attribute of the specified node. If the node does not have the specified attribute, this method returns null.

Parameters:
node - the node that contains the attribute
attrName - the name of the attribute
Returns:
the attribute value or null

getLayerInfo

public org.w3c.dom.Node getLayerInfo(java.lang.String layername)

Returns the layerinfo element for the specified layer. The layer name should be specified in the "layername" attribute. If there is no such layerinfo element, this method returns null.

Parameters:
layername - the layer name
Returns:
the layerinfo element for the specified layer or null

getLayerName

public java.lang.String getLayerName(org.w3c.dom.Node layerinfo)

Returns the layer name of the specified layerinfo element. The layer name should be specified in the "layername" attribute.

Parameters:
layerinfo - a layerinfo element
Returns:
the layer name of the specified layerinfo element

getLayerClass

public java.lang.String getLayerClass(org.w3c.dom.Node layerinfo)

Returns the qualified class name of the AnnotationLayer subclass for the specified layerinfo element. The class name should be specified in the "layerclass" attribute.

Parameters:
layerinfo - a layerinfo element
Returns:
the class name of an AnnotationLayer subclass

getLayerControlPanelClass

public java.lang.String getLayerControlPanelClass(org.w3c.dom.Node layerinfo)

Returns the qualified class name of the TargetControlPanel subclass for the specified layerinfo element. The class name should be specified in the "controlpanelclass" attribute.

Parameters:
layerinfo - a layerinfo element
Returns:
the class name of a TargetControlPanel subclass

getLayerCodeName

public java.lang.String getLayerCodeName(org.w3c.dom.Node layerinfo)

Returns the name of the code elements that represent the annotations for the specified layerinfo element. The code name should be specified in the "codename" attribute.

Parameters:
layerinfo - a layerinfo element
Returns:
the name of the code elements

autoKeyStrokes

public boolean autoKeyStrokes()

Returns the value of the "autokeystrokes" attribute. If it is true, the tool should automatically create keystrokes for actions that do not have a keystroke in the corpus data, that have an invalid keystroke or whose keystroke is already in use. If the attribute is not available, this method returns the default value false.

Returns:
true if the tool should automatically create keystrokes, false otherwise

makeContinuous

public boolean makeContinuous()

Returns the value of the "continuous" attribute. If it is true, the tool will ensure that the annotations remain continuous. Gaps in the time line are prevented when new annotations are added or existing annotations are deleted. If the attribute is not available, this method return the default value true.

Returns:
true if the tool should ensure that annotations remain continuous

merge

public boolean merge()

Returns the value of the "merge" attribute. @@@@@DOC


getSyncRate

public int getSyncRate()

Returns the value of the "syncrate" attribute. That is the number of milliseconds between time change events from the NXT clock. If the attribute is not available, this method returns the default value 200.

Returns:
the synchronization rate

getShowKeyStrokes

public java.lang.String getShowKeyStrokes()

Returns the value of the "showkeystrokes" attribute. This can be one of three values.

If the attribute value is not one of these three values, it defaults to "off".

Returns:
"off", "tooltip" or "label"

getUseSegmentReplayer

public boolean getUseSegmentReplayer()
segmentreplayer attribute in config. if true, the segmentreplayer will be activated


getHelpSetName

public java.lang.String getHelpSetName()

Returns the name of the help set.

Overrides:
getHelpSetName in class AbstractCallableToolConfig
Returns:
the name of the help set

getPreferredTimeDisplay

public java.lang.String getPreferredTimeDisplay()

Returns the type of time display we prefer ('seconds' or 'minutes').

Returns:
the preferred time display