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
`java.lang.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 java.lang.String` `mAbstractChildID` The abstract id for the child node.
`private java.lang.String` `mAbstractParentID` The abstract id for the parent node.
`java.lang.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

Constructors
Constructor and Description
`PCRelation()` the default constructor
`PCRelation(java.lang.String parentName, java.lang.String childName)` the overloaded constructor
`PCRelation(java.lang.String parentName, java.lang.String childName, boolean deleted)` the overloaded constructor

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.Object` `clone()` returns a new copy of the Object
`int` `compareTo(java.lang.Object o)`
`boolean` `equals(java.lang.Object o)` Checks if an object is similar to the one referred to by this class.
`java.lang.String` `getAbstractChildID()` Returns the abstract child id associated with the edge.
`java.lang.String` `getAbstractParentID()` Returns the abstract parent id associated with the edge.
`java.lang.String` `getChild()` Returns the child in the edge.
`java.lang.String` `getParent()` Returns the parent in the edge.
`void` `setAbstractChildID(java.lang.String id)` Sets the abstract child id associated with the edge.
`void` `setAbstractParentID(java.lang.String id)` Sets the abstract parent id associated with the edge.
`void` `setChild(java.lang.String childNode)` Sets the child of the edge.
`void` `setParent(java.lang.String parentNode)` Sets the parent of the edge.
`java.lang.String` `toDOT()` Returns the DOT description of the object.
`void` `toDOT(java.io.Writer stream, java.lang.String indent)` Returns the DOT description of the object.
`java.lang.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 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:
  `clone` in class `java.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:
  `equals` in class `java.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.

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

#### toDOT

    public java.lang.String toDOT()
                           throws java.io.IOException

Returns 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.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:
  `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