uk.ed.inf.graph.compound.archetypal
Class ArchetypalCompoundNode

java.lang.Object
  extended by uk.ed.inf.graph.compound.base.BaseCompoundNode
      extended by uk.ed.inf.graph.compound.archetypal.ArchetypalCompoundNode
All Implemented Interfaces:
java.lang.Comparable<BaseCompoundNode>, IBasicNode<BaseCompoundNode,BaseCompoundEdge>, ICompoundNode<BaseCompoundNode,BaseCompoundEdge>, IDirectedNode<BaseCompoundNode,BaseCompoundEdge>, IRestorableGraphElement, ITreeNode<BaseCompoundNode>
Direct Known Subclasses:
CompoundNode

public abstract class ArchetypalCompoundNode
extends BaseCompoundNode


Constructor Summary
protected ArchetypalCompoundNode(ArchetypalCompoundGraph superGraph, int index)
           
protected ArchetypalCompoundNode(ArchetypalCompoundNode parent, int index)
           
 
Method Summary
protected abstract  void createChildCompoundGraph(ArchetypalCompoundNode rootNode)
           
abstract  ArchetypalChildCompoundGraph getChildCompoundGraph()
          Get subgraph of this compound node.
 ArchetypalCompoundGraph getGraph()
          Get the graph that owns this node.
 int getIndex()
          Get the index of this node.
 ArchetypalCompoundNode getParent()
          The parent node cannot be null and should be the root node if the current node is the root node.
 
Methods inherited from class uk.ed.inf.graph.compound.base.BaseCompoundNode
ancestorIterator, childIterator, compareTo, connectedNodeIterator, createInEdgeSet, createOutEdgeSet, edgeIterator, getDegree, getEdgeInList, getEdgeOutList, getEdgesWith, getInDegree, getInEdgeIterator, getInEdgesFrom, getInNodeIterator, getOutDegree, getOutEdgeIterator, getOutEdgesTo, getOutNodeIterator, getRoot, hasEdgeWith, hasInEdgeFrom, hasOutEdgeTo, isAncestor, isChild, isDescendent, isParent, isRemoved, levelOrderIterator, markRemoved, removalAction, setRemoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ed.inf.graph.basic.IBasicNode
equals, hashCode
 

Constructor Detail

ArchetypalCompoundNode

protected ArchetypalCompoundNode(ArchetypalCompoundGraph superGraph,
                                 int index)

ArchetypalCompoundNode

protected ArchetypalCompoundNode(ArchetypalCompoundNode parent,
                                 int index)
Method Detail

getParent

public ArchetypalCompoundNode getParent()
Description copied from class: BaseCompoundNode
The parent node cannot be null and should be the root node if the current node is the root node. This follows the standard conversion for tree data structures.

Specified by:
getParent in interface ITreeNode<BaseCompoundNode>
Specified by:
getParent in class BaseCompoundNode
Returns:
The parent node, cannot be null.

createChildCompoundGraph

protected abstract void createChildCompoundGraph(ArchetypalCompoundNode rootNode)

getChildCompoundGraph

public abstract ArchetypalChildCompoundGraph getChildCompoundGraph()
Description copied from interface: ICompoundNode
Get subgraph of this compound node. Note that this node is the root-node of the sub-Cigraph.

Specified by:
getChildCompoundGraph in interface ICompoundNode<BaseCompoundNode,BaseCompoundEdge>
Specified by:
getChildCompoundGraph in class BaseCompoundNode
Returns:

getGraph

public ArchetypalCompoundGraph getGraph()
Description copied from interface: IBasicNode
Get the graph that owns this node.

Specified by:
getGraph in interface IBasicNode<BaseCompoundNode,BaseCompoundEdge>
Specified by:
getGraph in class BaseCompoundNode
Returns:
The graph instance which cannot be null.

getIndex

public int getIndex()
Description copied from interface: IBasicNode
Get the index of this node.

Specified by:
getIndex in interface IBasicNode<BaseCompoundNode,BaseCompoundEdge>
Specified by:
getIndex in interface ITreeNode<BaseCompoundNode>
Specified by:
getIndex in class BaseCompoundNode
Returns:
Returns a whole number (>=0).