anvil.annot
Class GroupSpec

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

public class GroupSpec
extends NodeSpec

Specification for group nodes in annotation tree.


Field Summary
 java.util.LinkedList subs
           
 
Fields inherited from class anvil.annot.NodeSpec
attDisplay, attributes, attributeSpecs, doc, editTakeover, name, parent, reciLinkAtt, spec
 
Constructor Summary
GroupSpec(GroupSpec parent, java.lang.String name)
           
 
Method Summary
 ContainerSpec addContainerSpec(java.lang.String name, java.lang.String type)
          Creates a new track spec for this group spec.
 GroupSpec addGroupSpec(java.lang.String name)
          Creates a new group spec for this group spec.
 void createHtmlFile(java.io.File dir)
           
 NodeSpec findSpec(java.lang.String name)
          Looks recursively through this node and all subs and returns the spec objects as soon as found.
 NodeSpec findSubnode(java.lang.String name)
          Finds subnode given its name.
 java.util.List findTrackNames()
          Returns list of all track names in the subtree of this node.
 java.lang.String getHtmlFilename()
           
 java.util.List getLeaves()
           
 java.util.List getLeavesAndThis()
           
 java.util.List getSubnodes()
           
 boolean isRoot()
           
 boolean nameExists(java.lang.String name)
          Takes the (non full) name and checks against all track/group names.
 boolean removeSubnode(NodeSpec node)
          Removes subnode (NodeSpec object) from this group.
 void setAsRoot(AnnotationSpec as)
           
 java.lang.String toString()
           
 void writeHtmlBody(kipp.io.MyBufferedWriter f, java.io.File dir)
          Writes HTML body for group 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

subs

public java.util.LinkedList subs
Constructor Detail

GroupSpec

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

getSubnodes

public java.util.List getSubnodes()

getLeaves

public java.util.List getLeaves()

getLeavesAndThis

public java.util.List getLeavesAndThis()

setAsRoot

public void setAsRoot(AnnotationSpec as)

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

isRoot

public boolean isRoot()
Specified by:
isRoot in class NodeSpec

addContainerSpec

public ContainerSpec addContainerSpec(java.lang.String name,
                                      java.lang.String type)
Creates a new track spec for this group spec. Attributes are cloned and given to the new track spec (inherited attributes).


addGroupSpec

public GroupSpec addGroupSpec(java.lang.String name)
Creates a new group spec for this group spec. Attributes are cloned and given to new group spec (inherited attributes).


removeSubnode

public boolean removeSubnode(NodeSpec node)
Removes subnode (NodeSpec object) from this group.

Returns:
whether given node was really a subnode.

findSubnode

public NodeSpec findSubnode(java.lang.String name)
Finds subnode given its name.


nameExists

public boolean nameExists(java.lang.String name)
Takes the (non full) name and checks against all track/group names.


getHtmlFilename

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

createHtmlFile

public void createHtmlFile(java.io.File dir)
                    throws java.io.IOException
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 group node.

java.io.IOException

toString

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