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

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

public class DAX2Metadata
extends Object
implements Callback

A callback that causes the parser to exit after the metadata about the DAX has been parsed. This is achieved by stopping the parsing after the cbDocument method.

Version:
$Revision: 314 $
Author:
Karan Vahi

Field Summary
static String DEFAULT_ADAG_COUNT_ATTRIBUTE
          Default attribute value for the count attribute
static String DEFAULT_ADAG_INDEX_ATTRIBUTE
          Default index value for the count attribute
private  boolean mDone
          A flag to specify whether the graph has been generated for the partition or not.
private  Map mMetadata
          The metadata of the workflow.
private  PegasusProperties mProps
          The handle to the properties object.
static String PARSING_DONE_ERROR_MESSAGE
          The parsing completed message.
 
Fields inherited from interface edu.isi.pegasus.planner.parser.dax.Callback
VERSION
 
Constructor Summary
DAX2Metadata(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 when the parsing of the document is done.
 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)
          Callback for the job from section 2 jobs.
 void cbParents(String child, List parents)
          Callback for child and parent relationships from section 3.
 void cbWfInvoke(Invoke invoke)
          Callback when a invoke entry is encountered in the top level inside the adag element in the DAX.
 Object getConstructedObject()
          Returns an ADag object corresponding to the abstract plan it has generated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARSING_DONE_ERROR_MESSAGE

public static final String PARSING_DONE_ERROR_MESSAGE
The parsing completed message.

See Also:
Constant Field Values

DEFAULT_ADAG_COUNT_ATTRIBUTE

public static final String DEFAULT_ADAG_COUNT_ATTRIBUTE
Default attribute value for the count attribute

See Also:
Constant Field Values

DEFAULT_ADAG_INDEX_ATTRIBUTE

public static final String DEFAULT_ADAG_INDEX_ATTRIBUTE
Default index value for the count attribute

See Also:
Constant Field Values

mProps

private PegasusProperties mProps
The handle to the properties object.


mDone

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


mMetadata

private Map mMetadata
The metadata of the workflow.

Constructor Detail

DAX2Metadata

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

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

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)
Callback for the job from section 2 jobs. These jobs are completely assembled, but each is passed separately.

Specified by:
cbJob in interface Callback
Parameters:
job - the Job object storing the job information gotten from parser.

cbParents

public void cbParents(String child,
                      List parents)
Callback for child and parent relationships from section 3.

Specified by:
cbParents in interface Callback
Parameters:
child - is the IDREF of the child element.
parents - is a list of IDREFs of the included parents.

cbDone

public void cbDone()
Callback when the parsing of the document is done. It sets the flag that the parsing has been done, that is used to determine whether the ADag object has been fully generated or not.

Specified by:
cbDone in interface Callback

getConstructedObject

public Object getConstructedObject()
Returns an ADag object corresponding to the abstract plan it has generated. It throws a runtime exception if the method is called before the object has been created fully.

Specified by:
getConstructedObject in interface Callback
Returns:
ADag object containing the abstract plan referred in the dax.

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.