| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpedviz.graph.Graph
public class Graph
This class represents the pedigree as a graph. It contains all nodes (individuals) and their edges (relations). It provides also methods that allow you to modify and update the structure of the graph.
| Constructor Summary | |
|---|---|
Graph()
Create a new and empty graph.  | 
|
Graph(Cluster cluster)
Creates a new graph based on the given Cluster object.  | 
|
| Method Summary | |
|---|---|
 void | 
addEdge(Edge edge)
Adds a relation between two nodes.  | 
 void | 
addEdge(Edge edge,
        boolean updateNodes)
Adds a relation between two nodes.  | 
 void | 
addNode(Node node)
Adds a node to the graph.  | 
 void | 
addNode(Node parent,
        Node node)
Adds a sub node to the given node.  | 
 void | 
buildHierarchie(HierarchieBuilder builder)
Builds a hierarchy based on the given HierarchieBuilder object.  | 
 void | 
clear()
Removes all nodes, edges and sub nodes.  | 
 void | 
exportAsCsvFile(java.lang.String filename)
Exports the whole graph as a csv-file.  | 
 java.util.Collection<Node> | 
getAllNodes()
Returns a collection of all nodes and subnodes.  | 
 java.util.Collection<Edge> | 
getEdges()
Returns a collection of all edges.  | 
 int | 
getFreeId()
Returns a free id for a node.  | 
 int | 
getHierachiesCount()
Returns the number of hierachies.  | 
 int | 
getHierachiesDepth()
Returns the max number of nodes in a hierachy.  | 
 Hierarchy | 
getHierachy(int id)
Returns the hierarchie with the given id.  | 
 java.lang.String | 
getName()
Returns the name of the graph.  | 
 Node | 
getNode(java.lang.Object id)
Returns the node with the given id.  | 
 java.util.Collection<Node> | 
getNodes()
Returns a collection of all single nodes, dummy nodes and cluster nodes.  | 
 int | 
getSize()
 | 
 boolean | 
isLayouted()
Returns true, if the graph is layouted.  | 
 void | 
print()
 | 
 void | 
removeAllHierachies()
Removes all hierarchies from this graph.  | 
 void | 
removeEdge(Edge edge)
Removes the given edge.  | 
 void | 
removeNode(Node node)
Removes the given node.  | 
 void | 
removeNode(Node node,
           boolean updateNode)
Removes the given node. if updateNodes is true, it updates the in-edges and out-edges from the node.  | 
 void | 
setLayouted(boolean layouted)
Sets  | 
 void | 
setName(java.lang.String name)
Sets the name of the graph.  | 
 java.lang.String | 
toString()
 | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public Graph()
public Graph(Cluster cluster)
cluster - Cluster object| Method Detail | 
|---|
public void addNode(Node node)
node - new nodepublic Node getNode(java.lang.Object id)
id - 
public void addEdge(Edge edge)
edge - new edge
public void addEdge(Edge edge,
                    boolean updateNodes)
edge - new edgeupdateNodes - if updateNodes is true, it updates the in-edges and
                out-edges from the two nodes.public void removeNode(Node node)
node - node
public void removeNode(Node node,
                       boolean updateNode)
node - nodeupdateNodes - if updateNodes is true, it updates the in-edges and
                out-edges from the node.public void removeEdge(Edge edge)
edge - edgepublic java.util.Collection<Node> getNodes()
public java.util.Collection<Node> getAllNodes()
public java.util.Collection<Edge> getEdges()
public int getFreeId()
public void addNode(Node parent,
                    Node node)
parent - cluster nodenode - sub nodepublic void clear()
public boolean isLayouted()
public void setLayouted(boolean layouted)
layouted - true, if the graph is layouted.public void exportAsCsvFile(java.lang.String filename)
filename - filename of the csv-file.public java.lang.String getName()
public void setName(java.lang.String name)
name - the name of the graph.public void removeAllHierachies()
public Hierarchy getHierachy(int id)
id - 
public int getHierachiesCount()
public int getHierachiesDepth()
public void buildHierarchie(HierarchieBuilder builder)
builder - HierarchieBuilder object.public java.lang.String toString()
toString in class java.lang.Objectpublic int getSize()
public void print()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||