org.kahina.core.data.dag
Class KahinaMemDAG

java.lang.Object
  extended by org.kahina.core.data.KahinaObject
      extended by org.kahina.core.data.dag.KahinaDAG
          extended by org.kahina.core.data.dag.KahinaMemDAG
All Implemented Interfaces:
Serializable

public class KahinaMemDAG
extends KahinaDAG

See Also:
Serialized Form

Field Summary
protected  Set<Integer> collapsed
           
protected  Map<Integer,String> edgeLabels
           
protected  Map<Integer,Integer> endNodes
           
protected  Map<Integer,List<Integer>> incomingEdges
           
protected  Map<Integer,String> nodeCaptions
           
protected  Map<Integer,List<Integer>> outgoingEdges
           
protected  Map<Integer,Integer> startNodes
           
protected  Map<Integer,Integer> status
           
 
Fields inherited from class org.kahina.core.data.dag.KahinaDAG
rootID
 
Constructor Summary
KahinaMemDAG()
           
 
Method Summary
 void addEdge(int edgeID, int start, int end, String label)
           
 int addEdge(int start, int end, String label)
           
 void addNode(int id, String caption, int nodeStatus)
           
 int addNode(String caption, int nodeStatus)
           
 void collapse(int nodeID)
           
 void decollapse(int nodeID)
           
 void decollapseAll()
           
 Iterable<Integer> getEdgeIDIterator()
           
 String getEdgeLabel(int edgeID)
           
 int getEndNode(int edgeID)
           
 List<Integer> getIncomingEdges(int nodeID)
           
protected  int getNextFreeEdgeID()
           
protected  int getNextFreeNodeID()
           
 String getNodeCaption(int nodeID)
           
 Iterable<Integer> getNodeIDIterator()
           
 int getNodeStatus(int nodeID)
           
 List<Integer> getOutgoingEdges(int nodeID)
           
 int getSize()
           
 int getStartNode(int edgeID)
           
 ArrayList<Integer> getVisibleChildren(int nodeID)
           
 List<Integer> getVisibleParents(int nodeID)
           
static KahinaDAG importXML(Document dom)
           
 boolean isCollapsed(int nodeID)
           
 boolean nodeIsVisible(int nodeID)
           
 void setEdgeLabel(int edgeID, String label)
           
 void setEndNode(int edgeID, int endNode)
           
 void setNodeCaption(int nodeID, String caption)
           
 void setNodeStatus(int nodeID, int newStatus)
           
 void setStartNode(int edgeID, int startNode)
           
 
Methods inherited from class org.kahina.core.data.dag.KahinaDAG
exportXML, getRootID, setRootID, toggleCollapse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

incomingEdges

protected Map<Integer,List<Integer>> incomingEdges

outgoingEdges

protected Map<Integer,List<Integer>> outgoingEdges

nodeCaptions

protected Map<Integer,String> nodeCaptions

status

protected Map<Integer,Integer> status

collapsed

protected Set<Integer> collapsed

edgeLabels

protected Map<Integer,String> edgeLabels

startNodes

protected Map<Integer,Integer> startNodes

endNodes

protected Map<Integer,Integer> endNodes
Constructor Detail

KahinaMemDAG

public KahinaMemDAG()
Method Detail

addEdge

public void addEdge(int edgeID,
                    int start,
                    int end,
                    String label)
Specified by:
addEdge in class KahinaDAG

addEdge

public int addEdge(int start,
                   int end,
                   String label)
Specified by:
addEdge in class KahinaDAG

addNode

public void addNode(int id,
                    String caption,
                    int nodeStatus)
Specified by:
addNode in class KahinaDAG

addNode

public int addNode(String caption,
                   int nodeStatus)
Specified by:
addNode in class KahinaDAG

collapse

public void collapse(int nodeID)
Specified by:
collapse in class KahinaDAG

decollapse

public void decollapse(int nodeID)
Specified by:
decollapse in class KahinaDAG

decollapseAll

public void decollapseAll()
Specified by:
decollapseAll in class KahinaDAG

getEdgeLabel

public String getEdgeLabel(int edgeID)
Specified by:
getEdgeLabel in class KahinaDAG

getIncomingEdges

public List<Integer> getIncomingEdges(int nodeID)
Specified by:
getIncomingEdges in class KahinaDAG

getVisibleParents

public List<Integer> getVisibleParents(int nodeID)
Specified by:
getVisibleParents in class KahinaDAG

getNodeCaption

public String getNodeCaption(int nodeID)
Specified by:
getNodeCaption in class KahinaDAG

getNodeStatus

public int getNodeStatus(int nodeID)
Specified by:
getNodeStatus in class KahinaDAG

getOutgoingEdges

public List<Integer> getOutgoingEdges(int nodeID)
Specified by:
getOutgoingEdges in class KahinaDAG

getVisibleChildren

public ArrayList<Integer> getVisibleChildren(int nodeID)
Specified by:
getVisibleChildren in class KahinaDAG

nodeIsVisible

public boolean nodeIsVisible(int nodeID)

getSize

public int getSize()
Specified by:
getSize in class KahinaDAG

isCollapsed

public boolean isCollapsed(int nodeID)
Specified by:
isCollapsed in class KahinaDAG

setEdgeLabel

public void setEdgeLabel(int edgeID,
                         String label)
Specified by:
setEdgeLabel in class KahinaDAG

setNodeCaption

public void setNodeCaption(int nodeID,
                           String caption)
Specified by:
setNodeCaption in class KahinaDAG

setNodeStatus

public void setNodeStatus(int nodeID,
                          int newStatus)
Specified by:
setNodeStatus in class KahinaDAG

getNextFreeNodeID

protected int getNextFreeNodeID()

getNextFreeEdgeID

protected int getNextFreeEdgeID()

importXML

public static KahinaDAG importXML(Document dom)

getEndNode

public int getEndNode(int edgeID)
Specified by:
getEndNode in class KahinaDAG

getStartNode

public int getStartNode(int edgeID)
Specified by:
getStartNode in class KahinaDAG

setEndNode

public void setEndNode(int edgeID,
                       int endNode)
Specified by:
setEndNode in class KahinaDAG

setStartNode

public void setStartNode(int edgeID,
                         int startNode)
Specified by:
setStartNode in class KahinaDAG

getEdgeIDIterator

public Iterable<Integer> getEdgeIDIterator()
Specified by:
getEdgeIDIterator in class KahinaDAG

getNodeIDIterator

public Iterable<Integer> getNodeIDIterator()
Specified by:
getNodeIDIterator in class KahinaDAG