kieker.webgui.service.impl.utility.model
Class Graph

java.lang.Object
  extended by kieker.webgui.service.impl.utility.model.Graph

public class Graph
extends Object

This class represents the whole graph that needs to be layouted. Contains lists of all Nodes and Edges as well as a general scaling factor that determines the size and distance between ports.

Author:
Robin Weiss, Florian Fittkau

Field Summary
static String EDGE_ROUTING
           
static boolean LAYOUT_HIERARCHY
           
static String PORT_CONSTRAINTS
           
 
Constructor Summary
Graph(int scale)
          Class constructor.
 
Method Summary
 void addEdge(Edge edge)
          Adds an Edge to the list of Edges.
 void addNode(Node node)
          Adds a Node to the list of Nodes.
static String getEdgeRouting()
           
 List<Edge> getEdges()
           
 de.cau.cs.kieler.core.kgraph.KNode getKielerGraph()
           
 Node getNode(String id)
          Looks for a Node with a specific id in the list of Nodes.
 List<Node> getNodes()
           
static String getPortConstraints()
           
 int getPortHeight()
           
static boolean isLayoutHierarchy()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDGE_ROUTING

public static final String EDGE_ROUTING
See Also:
Constant Field Values

LAYOUT_HIERARCHY

public static final boolean LAYOUT_HIERARCHY
See Also:
Constant Field Values

PORT_CONSTRAINTS

public static final String PORT_CONSTRAINTS
See Also:
Constant Field Values
Constructor Detail

Graph

public Graph(int scale)
Class constructor. Creates empty lists for future Nodes and Edges, and a parent KNode for all added nodes.

Parameters:
scale - the scaling factor for ports
Method Detail

addNode

public void addNode(Node node)
Adds a Node to the list of Nodes.

Parameters:
node - the added node

addEdge

public void addEdge(Edge edge)
Adds an Edge to the list of Edges.

Parameters:
edge - the added edge

getEdgeRouting

public static String getEdgeRouting()

isLayoutHierarchy

public static boolean isLayoutHierarchy()

getPortConstraints

public static String getPortConstraints()

getPortHeight

public int getPortHeight()

getKielerGraph

public de.cau.cs.kieler.core.kgraph.KNode getKielerGraph()

getNodes

public List<Node> getNodes()

getEdges

public List<Edge> getEdges()

getNode

public Node getNode(String id)
Looks for a Node with a specific id in the list of Nodes.

Parameters:
id - the id string of a node
Returns:
the Node if it exists, or null if it does not exist


Copyright © 2015. All rights reserved.