edu.isi.pegasus.planner.parser.dax

## 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
`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`

### Fields inherited from interface edu.isi.pegasus.planner.parser.dax.Callback

`VERSION`

### Constructor Summary

Constructors
Constructor and Description
`DAX2LabelGraph()`

### Method Summary

All Methods Instance Methods Concrete Methods
`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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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.

### Constructor Detail

#### DAX2LabelGraph

    public DAX2LabelGraph()

### Method Detail

#### initialize

    public void initialize(PegasusBag bag,
                           java.lang.String dax)

The overloaded constructor.

Specified by:
  `initialize` in interface `Callback`
Overrides:
  `initialize` in class `DAX2Graph`
Parameters:
  `bag` - the bag of initialization objects containing the properties and the logger
  `dax` - 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

Specified by:
  `cbJob` in interface `Callback`
Overrides:
  `cbJob` in class `DAX2Graph`
Parameters:
  `job` - the job that was parsed.

#### 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.

Specified by:
  `cbDone` in interface `Callback`
Overrides:
  `cbDone` in class `DAX2Graph`