wt.epm.retriever
Class ResultGraph.GraphBuilder

java.lang.Object
  extended bywt.epm.retriever.ResultGraph.GraphBuilder
Enclosing class:
ResultGraph

protected class ResultGraph.GraphBuilder
extends Object

Convenience inner class to eliminate some code reduplication while initializing the graph. Used in constructors.


Field Summary
protected  Map branchMap
           
protected  Map duplicateMasterMap
           
protected  Map infoMap
           
protected  WTCollection linkList
           
protected  Map masterMap
           
protected  WTCollection objList
           
 
Constructor Summary
protected ResultGraph.GraphBuilder(WTCollection objList, WTCollection linkList)
           
 
Method Summary
protected  ResultGraph.Node addNode(ObjectIdentifier oid, ResultGraph.Node node)
          Add node to the graph and also remember it in the temporary infoMap
protected  void buildGraph()
          Given "raw" input data collections, create the corresponding Node and Link objects and build oidNodeMap and oidLinkMap.
protected  Map getBranchMap()
           
protected  ObjectIdentifier getObjectByBranchId(VersionForeignKey fk)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objList

protected final WTCollection objList

linkList

protected final WTCollection linkList

masterMap

protected Map masterMap

duplicateMasterMap

protected Map duplicateMasterMap

branchMap

protected Map branchMap

infoMap

protected Map infoMap
Constructor Detail

ResultGraph.GraphBuilder

protected ResultGraph.GraphBuilder(WTCollection objList,
                                   WTCollection linkList)
Method Detail

buildGraph

protected void buildGraph()
                   throws WTException
Given "raw" input data collections, create the corresponding Node and Link objects and build oidNodeMap and oidLinkMap. May be overwritten in sub-classes, but has to provide at least the same results at the end.

Throws:
WTException - from persistableIterator()
IllegalStateException - if more than one Iterated found for a particular master.

getBranchMap

protected Map getBranchMap()

getObjectByBranchId

protected ObjectIdentifier getObjectByBranchId(VersionForeignKey fk)

addNode

protected ResultGraph.Node addNode(ObjectIdentifier oid,
                                   ResultGraph.Node node)
Add node to the graph and also remember it in the temporary infoMap

Parameters:
oid - ObjectIdentifier
node - Node
Returns:
the same Node, just for convenience
Throws:
IllegalStateException - if more than one Iterated found for a particular master.