diva.graph.basic
Class BasicGraphModel.BasicNode

java.lang.Object
  extended by diva.util.BasicPropertyContainer
      extended by diva.graph.basic.BasicGraphModel.Intermediate
          extended by diva.graph.basic.BasicGraphModel.BasicNode
All Implemented Interfaces:
Node, PropertyContainer, SemanticObjectContainer
Direct Known Subclasses:
BasicGraphModel.BasicCompositeNode
Enclosing class:
BasicGraphModel

private static class BasicGraphModel.BasicNode
extends BasicGraphModel.Intermediate
implements Node

A simple node implementation.


Field Summary
private  java.util.ArrayList _in
          The edges into this node.
private  java.util.ArrayList _out
          The edges out of this node.
private  CompositeNode _parent
          The parent of this node.
 
Constructor Summary
BasicGraphModel.BasicNode(java.lang.Object userObject)
          Create a node containing some user data.
 
Method Summary
 void addInEdge(Edge e)
           
 void addOutEdge(Edge e)
           
 Graph getParent()
          Return the graph parent of this node.
 java.util.Iterator inEdges()
          Return an iterator over the in edges of this node.
 java.util.Iterator outEdges()
          Return an iterator over the out edges of this node.
 void removeInEdge(Edge e)
           
 void removeOutEdge(Edge e)
           
 void setParent(Graph parent)
          Set the graph parent of this node.
 java.lang.String toString()
           
 
Methods inherited from class diva.graph.basic.BasicGraphModel.Intermediate
getSemanticObject, setSemanticObject
 
Methods inherited from class diva.util.BasicPropertyContainer
getProperty, properties, propertyNames, removeAllProperties, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface diva.util.SemanticObjectContainer
getSemanticObject, setSemanticObject
 
Methods inherited from interface diva.util.PropertyContainer
getProperty, propertyNames, setProperty
 

Field Detail

_in

private java.util.ArrayList _in
The edges into this node.


_out

private java.util.ArrayList _out
The edges out of this node.


_parent

private CompositeNode _parent
The parent of this node.

Constructor Detail

BasicGraphModel.BasicNode

public BasicGraphModel.BasicNode(java.lang.Object userObject)
Create a node containing some user data.

Method Detail

addInEdge

public void addInEdge(Edge e)

addOutEdge

public void addOutEdge(Edge e)

getParent

public Graph getParent()
Description copied from interface: Node
Return the graph parent of this node.

Specified by:
getParent in interface Node

inEdges

public java.util.Iterator inEdges()
Return an iterator over the in edges of this node. This iterator does not support removal operations.

Specified by:
inEdges in interface Node

outEdges

public java.util.Iterator outEdges()
Return an iterator over the out edges of this node. This iterator does not support removal operations.

Specified by:
outEdges in interface Node

removeInEdge

public void removeInEdge(Edge e)

removeOutEdge

public void removeOutEdge(Edge e)

setParent

public void setParent(Graph parent)
Description copied from interface: Node
Set the graph parent of this node. Implementors of this method are also responsible for insuring that it is set properly as the child of the graph in the graph.

Specified by:
setParent in interface Node

toString

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