de.cau.cs.kieler.klodd.hierarchical
Class GraphConverter

java.lang.Object
  extended by de.cau.cs.kieler.core.alg.AbstractAlgorithm
      extended by de.cau.cs.kieler.klodd.hierarchical.GraphConverter
All Implemented Interfaces:
IAlgorithm

public class GraphConverter
extends AbstractAlgorithm

Class that converts a KGraph into a slim graph.

Rating proposed yellow
(2009-12-11) msp

Constructor Summary
GraphConverter()
           
 
Method Summary
 KSlimGraph convertGraph(KNode parentNode, boolean includePorts)
          Converts a given Ecore graph into a slim graph.
 void reset()
          Removes the associated progress monitor.
 
Methods inherited from class de.cau.cs.kieler.core.alg.AbstractAlgorithm
getMonitor, reset, setProgressMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphConverter

public GraphConverter()
Method Detail

reset

public void reset()
Removes the associated progress monitor. Any subclass that overrides this method should call super.reset().

Specified by:
reset in interface IAlgorithm
Overrides:
reset in class AbstractAlgorithm

convertGraph

public KSlimGraph convertGraph(KNode parentNode,
                               boolean includePorts)
Converts a given Ecore graph into a slim graph. Each node contains a reference to the corresponding layout node, and each edge contains a reference to the corresponding layout edge.

Parameters:
parentNode - parent node to be converted
includePorts - if true, the external ports of the parent node will also be added as nodes
Returns:
a graph which consists of the child nodes