com.alexmerz.graphviz.objects
Class Node

java.lang.Object
  extended by com.alexmerz.graphviz.objects.Node

public class Node
extends java.lang.Object

This class represents a node in a graph.

Version:
$Id: Node.java,v 1.3 2006/03/20 16:45:41 Alexander Exp $
Author:
Alexander Merz

Constructor Summary
Node()
           
 
Method Summary
 java.lang.String getAttribute(java.lang.String key)
          Returns the attribute of the node
 java.util.Hashtable<java.lang.String,java.lang.String> getAttributes()
          Returns all attributes of the edge.
 Id getId()
          Returns the id object for the node
 boolean isSubgraph()
          Returns true, if the node object represents a subgraph.
 void representsSubgraph(boolean isSubgraph)
          Sets, if the node represents a subgraph
 void setAttribute(java.lang.String key, java.lang.String value)
          Sets the attribute of the node
 void setId(Id id)
          Sets the Id object for this node
 java.lang.String toString()
          Returns a string representation of this node
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node

public Node()
Method Detail

getId

public Id getId()
Returns the id object for the node

Returns:
the Id object

setId

public void setId(Id id)
Sets the Id object for this node

Parameters:
id -

toString

public java.lang.String toString()
Returns a string representation of this node

Overrides:
toString in class java.lang.Object
Returns:
the string representation

getAttribute

public java.lang.String getAttribute(java.lang.String key)
Returns the attribute of the node

Parameters:
key - the name of the attribute
Returns:
the value of the attribute

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.String value)
Sets the attribute of the node

Parameters:
key - the name of the attribute
value - the value of the attribute

isSubgraph

public boolean isSubgraph()
Returns true, if the node object represents a subgraph.

Returns:
true or false

representsSubgraph

public void representsSubgraph(boolean isSubgraph)
Sets, if the node represents a subgraph

Parameters:
isSubgraph - true if subgraph is used in edge operation

getAttributes

public java.util.Hashtable<java.lang.String,java.lang.String> getAttributes()
Returns all attributes of the edge.

Returns:
the edge attributes.