edu.isi.pegasus.planner.classes
Class PCRelation

java.lang.Object
  extended by edu.isi.pegasus.planner.classes.Data
      extended by edu.isi.pegasus.planner.classes.PCRelation
All Implemented Interfaces:
Cloneable

public class PCRelation
extends Data

Captures the parent child relationship between the jobs in the ADAG.

Version:
$Revision: 4003 $
Author:
Karan Vahi

Field Summary
 String child
          the child making up the parent child relationship pair in a dag
 boolean isDeleted
          this is used for collapsing the dag during the reduction algorithm on the basis of the results returned from the Replica Catalog.
private  String mAbstractChildID
          The abstract id for the child node.
private  String mAbstractParentID
          The abstract id for the parent node.
 String parent
          the parent making up the parent child relationship pair in a dag
 
Fields inherited from class edu.isi.pegasus.planner.classes.Data
mLogger, mLogMsg
 
Constructor Summary
PCRelation()
          the default constructor
PCRelation(String parentName, String childName)
          the overloaded constructor
PCRelation(String parentName, String childName, boolean deleted)
          the overloaded constructor
 
Method Summary
 Object clone()
          returns a new copy of the Object
 int compareTo(Object o)
           
 boolean equals(Object o)
          Checks if an object is similar to the one referred to by this class.
 String getAbstractChildID()
          Returns the abstract child id associated with the edge.
 String getAbstractParentID()
          Returns the abstract parent id associated with the edge.
 String getChild()
          Returns the child in the edge.
 String getParent()
          Returns the parent in the edge.
 void setAbstractChildID(String id)
          Sets the abstract child id associated with the edge.
 void setAbstractParentID(String id)
          Sets the abstract parent id associated with the edge.
 void setChild(String childNode)
          Sets the child of the edge.
 void setParent(String parentNode)
          Sets the parent of the edge.
 String toDOT()
          Returns the DOT description of the object.
 void toDOT(Writer stream, String indent)
          Returns the DOT description of the object.
 String toString()
          Returns the textual description.
 
Methods inherited from class edu.isi.pegasus.planner.classes.Data
setToString, vectorToString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

public String parent
the parent making up the parent child relationship pair in a dag


child

public 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 String mAbstractParentID
The abstract id for the parent node. required for stampede events.


mAbstractChildID

private String mAbstractChildID
The abstract id for the child node. required for stampede events.

Constructor Detail

PCRelation

public PCRelation()
the default constructor


PCRelation

public PCRelation(String parentName,
                  String childName,
                  boolean deleted)
the overloaded constructor


PCRelation

public PCRelation(String parentName,
                  String childName)
the overloaded constructor

Method Detail

getParent

public String getParent()
Returns the parent in the edge.

Returns:
parent

getChild

public String getChild()
Returns the child in the edge.

Returns:
child

setAbstractParentID

public void setAbstractParentID(String id)
Sets the abstract parent id associated with the edge.

Parameters:
id - the abstract id

setAbstractChildID

public void setAbstractChildID(String id)
Sets the abstract child id associated with the edge.

Parameters:
id - the abstract id

getAbstractParentID

public String getAbstractParentID()
Returns the abstract parent id associated with the edge.

Returns:
parent

getAbstractChildID

public String getAbstractChildID()
Returns the abstract child id associated with the edge.

Returns:
child

clone

public Object clone()
returns a new copy of the Object

Overrides:
clone in class Object

equals

public boolean equals(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:
equals in class Object
Returns:
true if the primary key (parent,child) match. else false.

compareTo

public int compareTo(Object o)

toString

public String toString()
Returns the textual description.

Specified by:
toString in class Data
Returns:
textual description.

toDOT

public String toDOT()
             throws IOException
Returns the DOT description of the object. This is used for visualizing the workflow.

Returns:
String containing the Partition object in XML.
Throws:
IOException - if something fishy happens to the stream.

toDOT

public void toDOT(Writer stream,
                  String indent)
           throws IOException
Returns 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 a String of 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:
IOException - if something fishy happens to the stream.

setChild

public void setChild(String childNode)
Sets the child of the edge.

Parameters:
childNode - the child node

setParent

public void setParent(String parentNode)
Sets the parent of the edge.

Parameters:
parentNode - the parent node


Copyright © 2011 The University of Southern California. All Rights Reserved.