edu.isi.pegasus.planner.parser.dax
Class DAX2NewGraph

java.lang.Object
  extended by edu.isi.pegasus.planner.parser.dax.DAX2NewGraph
All Implemented Interfaces:
Callback

public class DAX2NewGraph
extends Object
implements Callback

An exploratory implementation that builds on the DAX2Graph. There is a graph object created that is returned.

Version:
$Revision: 3669 $
Author:
Karan Vahi

Field Summary
protected  boolean mDone
          A flag to specify whether the graph has been generated for the partition or not.
protected  String mLabel
          The label of the abstract dax.
protected  PegasusProperties mProps
          The handle to the properties object.
protected  Graph mWorkflow
          The Graph instance that stores the abstract workflow as a Graph.
 
Fields inherited from interface edu.isi.pegasus.planner.parser.dax.Callback
VERSION
 
Constructor Summary
DAX2NewGraph(PegasusProperties properties, String dax)
          The overloaded constructor.
 
Method Summary
 void cbCompoundTransformation(CompoundTransformation compoundTransformation)
          Callback when a compound transformation is encountered in the DAX
 void cbDocument(Map attributes)
          Callback when the opening tag was parsed.
 void cbDone()
          Callback to signal that traversal of the DAX is complete.
 void cbExecutable(TransformationCatalogEntry tce)
          Callback when a transformation catalog entry is encountered in the DAX
 void cbFile(ReplicaLocation rl)
          Callback when a replica catalog entry is encountered in the DAX
 void cbJob(Job job)
          This constructs a graph node for the job and ends up storing it in the internal map.
 void cbParents(String child, List parents)
          This updates the internal graph nodes of child with references to it's parents referred to by the list of parents passed.
 void cbWfInvoke(Invoke invoke)
          Callback when a invoke entry is encountered in the top level inside the adag element in the DAX.
 GraphNode get(String key)
          Returns the GraphNode of the corresponding id.
 Object getConstructedObject()
          Returns the workflow represented in the Graph form.
 String getNameOfDAX()
          Returns the name of the dax.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mWorkflow

protected Graph mWorkflow
The Graph instance that stores the abstract workflow as a Graph.


mDone

protected boolean mDone
A flag to specify whether the graph has been generated for the partition or not.


mLabel

protected String mLabel
The label of the abstract dax.


mProps

protected PegasusProperties mProps
The handle to the properties object.

Constructor Detail

DAX2NewGraph

public DAX2NewGraph(PegasusProperties properties,
                    String dax)
The overloaded constructor.

Parameters:
properties - the properties passed to the planner.
dax - the path to the DAX file.
Method Detail

getConstructedObject

public Object getConstructedObject()
Returns the workflow represented in the Graph form.

Specified by:
getConstructedObject in interface Callback
Returns:
Graph containing the abstract workflow referred in the dax.

cbDocument

public void cbDocument(Map attributes)
Callback when the opening tag was parsed. This contains all attributes and their raw values within a map. It ends up storing the attributes with the adag element in the internal memory structure.

Specified by:
cbDocument in interface Callback
Parameters:
attributes - is a map of attribute key to attribute value

cbWfInvoke

public void cbWfInvoke(Invoke invoke)
Callback when a invoke entry is encountered in the top level inside the adag element in the DAX.

Specified by:
cbWfInvoke in interface Callback
Parameters:
invoke - the invoke object

cbJob

public void cbJob(Job job)
This constructs a graph node for the job and ends up storing it in the internal map.

Specified by:
cbJob in interface Callback
Parameters:
job - the job that was parsed.

cbParents

public void cbParents(String child,
                      List parents)
This updates the internal graph nodes of child with references to it's parents referred to by the list of parents passed. It gets the handle to the parents graph nodes from it's internal map.

Specified by:
cbParents in interface Callback
Parameters:
child - the logical id of the child node.
parents - list containing the logical id's of the parents of the child nodes.

getNameOfDAX

public String getNameOfDAX()
Returns the name of the dax.


cbDone

public void cbDone()
Callback to signal that traversal of the DAX is complete. At this point a dummy root node is added to the graph, that is the parents to all the root nodes in the existing DAX.

Specified by:
cbDone in interface Callback

get

public GraphNode get(String key)
Returns the GraphNode of the corresponding id.

Parameters:
key - the id of the node.
Returns:
GraphNode.

cbCompoundTransformation

public void cbCompoundTransformation(CompoundTransformation compoundTransformation)
Callback when a compound transformation is encountered in the DAX

Specified by:
cbCompoundTransformation in interface Callback
Parameters:
compoundTransformation - the compound transforamtion

cbFile

public void cbFile(ReplicaLocation rl)
Callback when a replica catalog entry is encountered in the DAX

Specified by:
cbFile in interface Callback
Parameters:
rl - the ReplicaLocation object

cbExecutable

public void cbExecutable(TransformationCatalogEntry tce)
Callback when a transformation catalog entry is encountered in the DAX

Specified by:
cbExecutable in interface Callback
Parameters:
tce - the transformationc catalog entry object.


Copyright © 2011 The University of Southern California. All Rights Reserved.