info.bioinfweb.jphyloio.events

## Class NodeEvent

- java.lang.Object
- - info.bioinfweb.jphyloio.events.ConcreteJPhyloIOEvent
  - - info.bioinfweb.jphyloio.events.LabeledEvent
    - - info.bioinfweb.jphyloio.events.LabeledIDEvent
      - - info.bioinfweb.jphyloio.events.LinkedLabeledIDEvent
        - - info.bioinfweb.jphyloio.events.NodeEvent

- All Implemented Interfaces:
    JPhyloIOEvent, LinkedIDEvent

      public class NodeEvent
      extends LinkedLabeledIDEvent

  Event indicating a node in a tree or network.

  This event is a start event, which is followed by an end event of the same content type. Comment and metainformation events maybe nested between this and its according end event. (See the description of `JPhyloIOEventReader` for the complete grammar definition of JPhyloIO event streams.)

  Author:
    Sarah Wiechers, Ben Stöver

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NodeEvent(java.lang.String id, java.lang.String label, java.lang.String linkedOTUID, boolean isRootNode)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isRootNode()` Indicates whether this node is a root of its tree or network.

    - ### Methods inherited from class info.bioinfweb.jphyloio.events.LinkedLabeledIDEvent

      `getLinkedID, hasLink`

    - ### Methods inherited from class info.bioinfweb.jphyloio.events.LabeledIDEvent

      `checkID, getID`

    - ### Methods inherited from class info.bioinfweb.jphyloio.events.LabeledEvent

      `getLabel, hasLabel`

    - ### Methods inherited from class info.bioinfweb.jphyloio.events.ConcreteJPhyloIOEvent

      `asCharacterDefinitionEvent, asCharacterSetIntervalEvent, asCommentEvent, asEdgeEvent, asLabeledIDEvent, asLinkedLabeledIDEvent, asLiteralMetadataContentEvent, asLiteralMetadataEvent, asNodeEvent, asPartEndEvent, asResourceMetadataEvent, asSequenceTokensEvent, asSetElementEvent, asSingleSequenceTokenEvent, asSingleTokenDefinitionEvent, asTokenSetDefinitionEvent, asUnknownCommandEvent, createEndEvent, getType`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface info.bioinfweb.jphyloio.events.JPhyloIOEvent

      `asCharacterDefinitionEvent, asCharacterSetIntervalEvent, asCommentEvent, asEdgeEvent, asLabeledIDEvent, asLinkedLabeledIDEvent, asLiteralMetadataContentEvent, asLiteralMetadataEvent, asNodeEvent, asPartEndEvent, asResourceMetadataEvent, asSequenceTokensEvent, asSetElementEvent, asSingleSequenceTokenEvent, asSingleTokenDefinitionEvent, asTokenSetDefinitionEvent, asUnknownCommandEvent, getType`

- - ### Constructor Detail

    - #### NodeEvent

          public NodeEvent(java.lang.String id,
                           java.lang.String label,
                           java.lang.String linkedOTUID,
                           boolean isRootNode)

  - ### Method Detail

    - #### isRootNode

          public boolean isRootNode()

      Indicates whether this node is a root of its tree or network. One tree or network may contain alternative root nodes, but not all formats will support this.

      Note that in case of trees this property indicates that this node can be one (alternative) root in a semantic sense. The topological representation of the tree is independent of this and only determined by how its nodes are linked by edge events. The presence of a root edge defining a length of a tree branch leading to the node that is topologically at the root of the tree is also fully independent of this property.

      In NeXML root nodes are identified by having a `root="true"` attribute. In Newick and Nexus only the property of the topological root node is modeled by the `[&R]` or `[&U]` hot comments preceding a Newick string. The same applies for the `rooted` attribute of the `phylogeny` tag in PhyloXML.

      Returns:
        `true` if this node is a possible root or `false` otherwise