Package edu.isi.pegasus.planner.classes
Class PCRelation
- java.lang.Object
-
- edu.isi.pegasus.planner.classes.Data
-
- edu.isi.pegasus.planner.classes.PCRelation
-
- All Implemented Interfaces:
java.lang.Cloneable
public class PCRelation extends Data
Captures the parent child relationship between the jobs in the ADAG.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.Stringchildthe child making up the parent child relationship pair in a dagbooleanisDeletedthis is used for collapsing the dag during the reduction algorithm on the basis of the results returned from the Replica Catalog.private java.lang.StringmAbstractChildIDThe abstract id for the child node.private java.lang.StringmAbstractParentIDThe abstract id for the parent node.java.lang.Stringparentthe parent making up the parent child relationship pair in a dag
-
Constructor Summary
Constructors Constructor Description PCRelation()the default constructorPCRelation(java.lang.String parentName, java.lang.String childName)the overloaded constructorPCRelation(java.lang.String parentName, java.lang.String childName, boolean deleted)the overloaded constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()returns a new copy of the ObjectintcompareTo(java.lang.Object o)booleanequals(java.lang.Object o)Checks if an object is similar to the one referred to by this class.java.lang.StringgetAbstractChildID()Returns the abstract child id associated with the edge.java.lang.StringgetAbstractParentID()Returns the abstract parent id associated with the edge.java.lang.StringgetChild()Returns the child in the edge.java.lang.StringgetParent()Returns the parent in the edge.voidsetAbstractChildID(java.lang.String id)Sets the abstract child id associated with the edge.voidsetAbstractParentID(java.lang.String id)Sets the abstract parent id associated with the edge.voidsetChild(java.lang.String childNode)Sets the child of the edge.voidsetParent(java.lang.String parentNode)Sets the parent of the edge.java.lang.StringtoDOT()Returns the DOT description of the object.voidtoDOT(java.io.Writer stream, java.lang.String indent)Returns the DOT description of the object.java.lang.StringtoString()Returns the textual description.-
Methods inherited from class edu.isi.pegasus.planner.classes.Data
setToString, vectorToString
-
-
-
-
Field Detail
-
parent
public java.lang.String parent
the parent making up the parent child relationship pair in a dag
-
child
public java.lang.String child
the child making up the parent child relationship pair in a dag
-
isDeleted
public boolean isDeleted
this is used for collapsing the dag during the reduction algorithm on the basis of the results returned from the Replica Catalog.
-
mAbstractParentID
private java.lang.String mAbstractParentID
The abstract id for the parent node. required for stampede events.
-
mAbstractChildID
private java.lang.String mAbstractChildID
The abstract id for the child node. required for stampede events.
-
-
Constructor Detail
-
PCRelation
public PCRelation()
the default constructor
-
PCRelation
public PCRelation(java.lang.String parentName, java.lang.String childName, boolean deleted)the overloaded constructor
-
PCRelation
public PCRelation(java.lang.String parentName, java.lang.String childName)the overloaded constructor
-
-
Method Detail
-
getParent
public java.lang.String getParent()
Returns the parent in the edge.- Returns:
- parent
-
getChild
public java.lang.String getChild()
Returns the child in the edge.- Returns:
- child
-
setAbstractParentID
public void setAbstractParentID(java.lang.String id)
Sets the abstract parent id associated with the edge.- Parameters:
id- the abstract id
-
setAbstractChildID
public void setAbstractChildID(java.lang.String id)
Sets the abstract child id associated with the edge.- Parameters:
id- the abstract id
-
getAbstractParentID
public java.lang.String getAbstractParentID()
Returns the abstract parent id associated with the edge.- Returns:
- parent
-
getAbstractChildID
public java.lang.String getAbstractChildID()
Returns the abstract child id associated with the edge.- Returns:
- child
-
clone
public java.lang.Object clone()
returns a new copy of the Object- Overrides:
clonein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
Checks if an object is similar to the one referred to by this class. We compare the primary key to determine if it is the same or not.- Overrides:
equalsin classjava.lang.Object- Returns:
- true if the primary key (parent,child) match. else false.
-
compareTo
public int compareTo(java.lang.Object o)
-
toString
public java.lang.String toString()
Returns the textual description.
-
toDOT
public java.lang.String toDOT() throws java.io.IOExceptionReturns the DOT description of the object. This is used for visualizing the workflow.- Returns:
- String containing the Partition object in XML.
- Throws:
java.io.IOException- if something fishy happens to the stream.
-
toDOT
public void toDOT(java.io.Writer stream, java.lang.String indent) throws java.io.IOExceptionReturns the DOT description of the object. This is used for visualizing the workflow.- Parameters:
stream- is a stream opened and ready for writing. This can also be a StringWriter for efficient output.indent- is aStringof spaces used for pretty printing. The initial amount of spaces should be an empty string. The parameter is used internally for the recursive traversal.- Throws:
java.io.IOException- if something fishy happens to the stream.
-
setChild
public void setChild(java.lang.String childNode)
Sets the child of the edge.- Parameters:
childNode- the child node
-
setParent
public void setParent(java.lang.String parentNode)
Sets the parent of the edge.- Parameters:
parentNode- the parent node
-
-