Class DAX2LabelGraph
- java.lang.Object
-
- edu.isi.pegasus.planner.parser.dax.DAX2Graph
-
- edu.isi.pegasus.planner.parser.dax.DAX2LabelGraph
-
- All Implemented Interfaces:
Callback
public class DAX2LabelGraph extends DAX2Graph
The callback, that ends up building a label graph. With each GraphNode a label is associated. The label can be associated via a profile in the VDS namespace with the jobs in the DAX. The key for the profile can either be set via the constructor, or a default key is used.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_LABEL_KEY
The default key for the VDS namespace profile, that is used in case none is specified by the user.private java.lang.String
mLabelKey
The profile key that is used for the labelling.-
Fields inherited from class edu.isi.pegasus.planner.parser.dax.DAX2Graph
DUMMY_NODE_ID, mAbstractGraph, mDone, mLabel, mLogger, mProps, mRoot
-
-
Constructor Summary
Constructors Constructor Description DAX2LabelGraph()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cbDone()
Callback to signal that traversal of the DAX is complete.void
cbJob(Job job)
This constructs a graph node for the job and ends up storing it in the internal map.void
initialize(PegasusBag bag, java.lang.String dax)
The overloaded constructor.void
setLabelKey(java.lang.String key)
Set the profile key that is to be used to pick up the labels.-
Methods inherited from class edu.isi.pegasus.planner.parser.dax.DAX2Graph
cbCompoundTransformation, cbDocument, cbExecutable, cbFile, cbParents, cbWfInvoke, get, getConstructedObject, getNameOfDAX, put
-
-
-
-
Field Detail
-
DEFAULT_LABEL_KEY
public static final java.lang.String DEFAULT_LABEL_KEY
The default key for the VDS namespace profile, that is used in case none is specified by the user.- See Also:
- Constant Field Values
-
mLabelKey
private java.lang.String mLabelKey
The profile key that is used for the labelling.
-
-
Method Detail
-
initialize
public void initialize(PegasusBag bag, java.lang.String dax)
The overloaded constructor.- Specified by:
initialize
in interfaceCallback
- Overrides:
initialize
in classDAX2Graph
- Parameters:
bag
- the bag of initialization objects containing the properties and the loggerdax
- the path to the DAX file.
-
setLabelKey
public void setLabelKey(java.lang.String key)
Set the profile key that is to be used to pick up the labels. Sets the profile key to the value specified. If value passed is null, then is set to the default label key.- Parameters:
key
- the VDS profile key that is to be used.- See Also:
DEFAULT_LABEL_KEY
-
cbJob
public void cbJob(Job job)
This constructs a graph node for the job and ends up storing it in the internal map. In addition assigns a label with the node. The label is is the value of a profile in the VDS namespace. The name of the profile can
-
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. This method in additions adds the default label to the root.
-
-