edu.ksu.cis.kdd.util.graph
Class Node

java.lang.Object
  extended bysalvo.jesus.graph.VertexImpl
      extended byedu.ksu.cis.kdd.util.graph.Node
All Implemented Interfaces:
salvo.jesus.graph.GraphComponent, HasProperty, salvo.jesus.graph.LabeledGraphComponent, java.io.Serializable, salvo.jesus.graph.Vertex
Direct Known Subclasses:
BBNNode, Clique

public class Node
extends salvo.jesus.graph.VertexImpl
implements HasProperty

Wrapper for OpenJGraph

Author:
Roby Joehanes
See Also:
Serialized Form

Field Summary
protected  java.lang.String name
           
protected  Graph owner
           
protected  java.util.Hashtable property
           
 
Fields inherited from class salvo.jesus.graph.VertexImpl
object
 
Constructor Summary
Node()
          Create an anonymous Node object
Node(Graph owner)
          Create a node from a specific graph owner
Node(Graph owner, java.lang.String name)
          Create a node with a specific name and a graph owner
Node(java.lang.String name)
          Create node with a specific name
 
Method Summary
 boolean equals(java.lang.Object o)
          Equals
 java.util.Set getAncestors()
          Get the ancestors of this node (Kleene closure)
 java.util.List getChildren()
          Get the children nodes
 java.util.Set getChildrenNames()
          Returns the set of node names
 java.util.Set getDescendants()
          Get the descendants of this node (Kleene closure)
 java.lang.String getLabel()
           
 java.lang.String getName()
          Get the node name
 Graph getOwner()
          Returns the owner.
 java.util.Set getParentNames()
          Returns the set of node names
 java.util.List getParents()
          Get the parent nodes
 java.util.Hashtable getProperty()
          Returns the property.
 java.lang.Object getProperty(java.lang.Object p)
          Get the property value with key p.
 int hashCode()
           
 void putProperty(java.lang.Object p, java.lang.Object v)
          Put the property p with value v
 void removeProperty(java.lang.Object p)
          Remove the property with key p.
 void setName(java.lang.String name)
          Set the node name
 void setOwner(Graph owner)
          Sets the owner.
 void setProperty(java.util.Hashtable property)
          Sets the property.
 java.lang.String toString()
           
 
Methods inherited from class salvo.jesus.graph.VertexImpl
getObject, hasLabel, setLabel, setObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

owner

protected Graph owner

property

protected java.util.Hashtable property

name

protected java.lang.String name
Constructor Detail

Node

public Node()
Create an anonymous Node object

See Also:
Object.Object()

Node

public Node(Graph owner)
Create a node from a specific graph owner

Parameters:
owner -

Node

public Node(Graph owner,
            java.lang.String name)
Create a node with a specific name and a graph owner

Parameters:
owner -
name -

Node

public Node(java.lang.String name)
Create node with a specific name

Parameters:
name -
Method Detail

getOwner

public Graph getOwner()
Returns the owner.

Returns:
Graph

setOwner

public void setOwner(Graph owner)
Sets the owner.

Parameters:
owner - The owner to set

getParents

public java.util.List getParents()
Get the parent nodes

Returns:
List

getChildren

public java.util.List getChildren()
Get the children nodes

Returns:
List

getParentNames

public java.util.Set getParentNames()
Returns the set of node names

Returns:
Set

getChildrenNames

public java.util.Set getChildrenNames()
Returns the set of node names

Returns:
Set

getAncestors

public java.util.Set getAncestors()
Get the ancestors of this node (Kleene closure)

Returns:
List

getDescendants

public java.util.Set getDescendants()
Get the descendants of this node (Kleene closure)

Returns:
List

setName

public void setName(java.lang.String name)
Set the node name

Parameters:
name -

getName

public java.lang.String getName()
Get the node name

Returns:
String

getProperty

public java.util.Hashtable getProperty()
Returns the property.

Specified by:
getProperty in interface HasProperty
Returns:
Hashtable

getProperty

public java.lang.Object getProperty(java.lang.Object p)
Get the property value with key p.

Specified by:
getProperty in interface HasProperty
Parameters:
p -
Returns:
Object

setProperty

public void setProperty(java.util.Hashtable property)
Sets the property.

Specified by:
setProperty in interface HasProperty
Parameters:
property - The property to set

putProperty

public void putProperty(java.lang.Object p,
                        java.lang.Object v)
Put the property p with value v

Specified by:
putProperty in interface HasProperty
Parameters:
p -
v -

removeProperty

public void removeProperty(java.lang.Object p)
Remove the property with key p.

Specified by:
removeProperty in interface HasProperty
Parameters:
p -

equals

public boolean equals(java.lang.Object o)
Equals

See Also:
Object.equals(Object)

hashCode

public int hashCode()
See Also:
Object.hashCode()

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface salvo.jesus.graph.LabeledGraphComponent

toString

public java.lang.String toString()
See Also:
Object.toString()