Class DAX2Metadata
- java.lang.Object
-
- edu.isi.pegasus.planner.parser.dax.DAX2Metadata
-
- All Implemented Interfaces:
Callback
public class DAX2Metadata extends java.lang.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
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_ADAG_COUNT_ATTRIBUTEDefault attribute value for the count attributestatic java.lang.StringDEFAULT_ADAG_INDEX_ATTRIBUTEDefault index value for the count attributeprivate booleanmDoneA flag to specify whether the graph has been generated for the partition or not.private java.util.MapmMetadataThe metadata of the workflow.private PegasusPropertiesmPropsThe handle to the properties object.static java.lang.StringPARSING_DONE_ERROR_MESSAGEThe parsing completed message.
-
Constructor Summary
Constructors Constructor Description DAX2Metadata()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcbCompoundTransformation(CompoundTransformation compoundTransformation)Callback when a compound transformation is encountered in the DAXvoidcbDocument(java.util.Map attributes)Callback when the opening tag was parsed.voidcbDone()Callback when the parsing of the document is done.voidcbExecutable(TransformationCatalogEntry tce)Callback when a transformation catalog entry is encountered in the DAXvoidcbFile(ReplicaLocation rl)Callback when a replica catalog entry is encountered in the DAXvoidcbJob(Job job)Callback for the job from section 2 jobs.voidcbParents(java.lang.String child, java.util.List parents)Callback for child and parent relationships from section 3.voidcbWfInvoke(Invoke invoke)Callback when a invoke entry is encountered in the top level inside the adag element in the DAX.java.lang.ObjectgetConstructedObject()Returns an ADag object corresponding to the abstract plan it has generated.voidinitialize(PegasusBag bag, java.lang.String dax)The overloaded constructor.
-
-
-
Field Detail
-
PARSING_DONE_ERROR_MESSAGE
public static final java.lang.String PARSING_DONE_ERROR_MESSAGE
The parsing completed message.- See Also:
- Constant Field Values
-
DEFAULT_ADAG_COUNT_ATTRIBUTE
public static final java.lang.String DEFAULT_ADAG_COUNT_ATTRIBUTE
Default attribute value for the count attribute- See Also:
- Constant Field Values
-
DEFAULT_ADAG_INDEX_ATTRIBUTE
public static final java.lang.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 java.util.Map mMetadata
The metadata of the workflow.
-
-
Method Detail
-
initialize
public void initialize(PegasusBag bag, java.lang.String dax)
The overloaded constructor.- Specified by:
initializein interfaceCallback- Parameters:
bag- the bag of initialization objects containing the properties and the loggerdax- the path to the DAX file.
-
cbDocument
public void cbDocument(java.util.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:
cbDocumentin interfaceCallback- 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:
cbWfInvokein interfaceCallback- 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.
-
cbParents
public void cbParents(java.lang.String child, java.util.List parents)Callback for child and parent relationships from section 3.
-
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.
-
getConstructedObject
public java.lang.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:
getConstructedObjectin interfaceCallback- 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:
cbCompoundTransformationin interfaceCallback- Parameters:
compoundTransformation- the compound transforamtion
-
cbFile
public void cbFile(ReplicaLocation rl)
Callback when a replica catalog entry is encountered in the DAX
-
cbExecutable
public void cbExecutable(TransformationCatalogEntry tce)
Callback when a transformation catalog entry is encountered in the DAX- Specified by:
cbExecutablein interfaceCallback- Parameters:
tce- the transformationc catalog entry object.
-
-