anvil.annot
Class ContainerSpec

java.lang.Object
  |
  +--anvil.annot.NodeSpec
        |
        +--anvil.annot.ContainerSpec

public class ContainerSpec
extends NodeSpec

Class for storing track specification, i.e. all attributes and value types of the track's elements.


Field Summary
static java.lang.String PRIMARY_TRACK_TYPE
           
static java.lang.String SET_TYPE
           
static java.lang.String SINGLETON_TRACK_TYPE
           
static java.lang.String SPAN_TRACK_TYPE
           
static java.lang.String SPEECH_ANALYSIS_TRACK_TYPE
           
 
Fields inherited from class anvil.annot.NodeSpec
attDisplay, attributes, attributeSpecs, doc, editTakeover, name, parent, reciLinkAtt, spec
 
Constructor Summary
ContainerSpec(GroupSpec parent, java.lang.String name, java.lang.String tp)
           
 
Method Summary
 void createHtmlFile(java.io.File dir)
          For coding manual generation.
 NodeSpec findSpec(java.lang.String name)
          Looks recursively through this node and all subs and returns the spec objects as soon as found.
 java.util.List findTrackNames()
          Returns list of all track names in the subtree of this node.
 java.lang.String getColorcodedAttribute()
          Returns name of attribute that should be color-coded.
 float getHeightFactor()
           
 java.lang.String getHtmlFilename()
          For coding manual generation.
 java.lang.String getReferenceTrack()
          Returns full path of reference track.
 java.lang.String getType()
          Returns track type as string.
 boolean hasColorcoding()
          Returns whether there is a color-coded attribute.
 boolean isRoot()
          A track cannot be a root node.
 void setColorcodedAttribute(java.lang.String name)
          Uses color-coding for specified attribute.
 void setHeightFactor(float factor)
          Sets the height factor for track display (GUI) but takes care that the factor does not exceed certain limits.
 void setReferenceTrack(java.lang.String name)
          Sets reference track to specified track (full path!).
 void setType(java.lang.String type)
           
 java.lang.String toString()
           
 void writeHtmlBody(kipp.io.MyBufferedWriter f, java.io.File dir)
          Writes HTML body for track node.
 
Methods inherited from class anvil.annot.NodeSpec
addAttrDoc, addAttribute, addAvSpec, addAvSpec, addDefault, attrDocExists, docString, fullName, getAnnotationSpec, getAttrDoc, getAttributeNames, getAttributeSpec, getAttributeType, getDefault, getDisplayedAttributes, getHtmlRefString, getName, getParent, getReciprocalLinkAttributes, isAttribute, isDisplayed, removeAttribute, setDisplayed, setDisplayedAttributes, setEditTakeover, usesEditTakeover, writeHtmlNavbar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PRIMARY_TRACK_TYPE

public static final java.lang.String PRIMARY_TRACK_TYPE
See Also:
Constant Field Values

SPAN_TRACK_TYPE

public static final java.lang.String SPAN_TRACK_TYPE
See Also:
Constant Field Values

SINGLETON_TRACK_TYPE

public static final java.lang.String SINGLETON_TRACK_TYPE
See Also:
Constant Field Values

SPEECH_ANALYSIS_TRACK_TYPE

public static final java.lang.String SPEECH_ANALYSIS_TRACK_TYPE
See Also:
Constant Field Values

SET_TYPE

public static final java.lang.String SET_TYPE
See Also:
Constant Field Values
Constructor Detail

ContainerSpec

public ContainerSpec(GroupSpec parent,
                     java.lang.String name,
                     java.lang.String tp)
Method Detail

getType

public java.lang.String getType()
Returns track type as string.


setType

public void setType(java.lang.String type)

isRoot

public boolean isRoot()
A track cannot be a root node.

Specified by:
isRoot in class NodeSpec

setHeightFactor

public void setHeightFactor(float factor)
Sets the height factor for track display (GUI) but takes care that the factor does not exceed certain limits.


getHeightFactor

public float getHeightFactor()

getColorcodedAttribute

public java.lang.String getColorcodedAttribute()
Returns name of attribute that should be color-coded.


setColorcodedAttribute

public void setColorcodedAttribute(java.lang.String name)
Uses color-coding for specified attribute.


hasColorcoding

public boolean hasColorcoding()
Returns whether there is a color-coded attribute.


setReferenceTrack

public void setReferenceTrack(java.lang.String name)
Sets reference track to specified track (full path!). Only relevant for secondary tracks.


getReferenceTrack

public java.lang.String getReferenceTrack()
Returns full path of reference track.


findTrackNames

public java.util.List findTrackNames()
Description copied from class: NodeSpec
Returns list of all track names in the subtree of this node.

Specified by:
findTrackNames in class NodeSpec

findSpec

public NodeSpec findSpec(java.lang.String name)
Description copied from class: NodeSpec
Looks recursively through this node and all subs and returns the spec objects as soon as found. Or null otherwise.

Specified by:
findSpec in class NodeSpec

getHtmlFilename

public java.lang.String getHtmlFilename()
For coding manual generation.

Overrides:
getHtmlFilename in class NodeSpec

createHtmlFile

public void createHtmlFile(java.io.File dir)
                    throws java.io.IOException
For coding manual generation.

Overrides:
createHtmlFile in class NodeSpec
java.io.IOException

writeHtmlBody

public void writeHtmlBody(kipp.io.MyBufferedWriter f,
                          java.io.File dir)
                   throws java.io.IOException
Writes HTML body for track node. Includes attribute description and attribute-values description.

java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class NodeSpec