org.processmining.framework.models.pdm
Class PDMOperation

java.lang.Object
  extended by org.processmining.framework.models.pdm.PDMOperation

public class PDMOperation
extends java.lang.Object

Title: PDM operation

Description: Represents an operation in a PDM model

Copyright: Copyright (c) 2006

Company:

Version:
1.0
Author:
Irene Vanderfeesten

Constructor Summary
PDMOperation(PDMModel model, java.lang.String id)
          Creates the operation with opID 'id'.
 
Method Summary
 void addInputElement(java.lang.String dataElementID, PDMModel model)
          Adds a data element with dataElementID to the list of input elements.
 void addOutputElement(java.lang.String dataElementID, PDMModel model)
          Adds a data element with dataElementID to the list of output elements.
 void addResource(java.lang.String resourceID, PDMModel model)
          Adds a resource, with resourceID, to the list of resource.
 java.lang.String getID()
          Returns the identifier of the operation.
 java.util.HashMap getInputElements()
          Reutns the input data elements of the operation.
 java.util.HashSet getIntersectionSet(PDMOperation operation)
          Returns the overlapping data elements of this operation with the parameter operation as a HashSet.
 java.util.HashMap getOutputElements()
          Returns the output data elements of the operation.
 java.lang.Boolean hasDataElement(PDMDataElement el)
          Checks whether the specified data element (object) is an element of the input or output elements of the operation.
 java.lang.Boolean hasDataElement(java.lang.String el)
          checks whether the specified data element with identifier 'el' is an element of the input or output elements of the operation.
 java.lang.Boolean intersectsWith(PDMOperation operation)
          Returns true when the operation intersects with this operation.
 void writeToDot(java.io.Writer bw)
          Writes the operation to dot.
 void writeToDot(java.io.Writer bw, PDMModel model)
          Writes the operation to dot.
 void writeToPDM(java.io.Writer bw)
          Writes the operation to a PDM file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDMOperation

public PDMOperation(PDMModel model,
                    java.lang.String id)
Creates the operation with opID 'id'. At the same time also the 'knot' is created, as a new ModelGraphVertex, that takes the arcs from the input elements together.

Parameters:
model - PDMModel
id - String
Method Detail

getID

public java.lang.String getID()
Returns the identifier of the operation.

Returns:
String

addInputElement

public void addInputElement(java.lang.String dataElementID,
                            PDMModel model)
Adds a data element with dataElementID to the list of input elements.

Parameters:
dataElementID - String
model - PDMModel

addOutputElement

public void addOutputElement(java.lang.String dataElementID,
                             PDMModel model)
Adds a data element with dataElementID to the list of output elements.

Parameters:
dataElementID - String
model - PDMModel

getInputElements

public java.util.HashMap getInputElements()
Reutns the input data elements of the operation.

Returns:
HashMap

getOutputElements

public java.util.HashMap getOutputElements()
Returns the output data elements of the operation.

Returns:
HashMap

addResource

public void addResource(java.lang.String resourceID,
                        PDMModel model)
Adds a resource, with resourceID, to the list of resource.

Parameters:
resourceID - String
model - PDMModel

hasDataElement

public java.lang.Boolean hasDataElement(PDMDataElement el)
Checks whether the specified data element (object) is an element of the input or output elements of the operation.

Parameters:
el - PDMDataElement
Returns:
Boolean

hasDataElement

public java.lang.Boolean hasDataElement(java.lang.String el)
checks whether the specified data element with identifier 'el' is an element of the input or output elements of the operation.

Parameters:
el - String
Returns:
Boolean

intersectsWith

public java.lang.Boolean intersectsWith(PDMOperation operation)
Returns true when the operation intersects with this operation. Returns false otherwise

Parameters:
operation - PDMOperation
Returns:
Boolean

getIntersectionSet

public java.util.HashSet getIntersectionSet(PDMOperation operation)
Returns the overlapping data elements of this operation with the parameter operation as a HashSet.

Parameters:
operation - PDMOperation
overlapEltsSet - HashSet
Returns:
Boolean

writeToPDM

public void writeToPDM(java.io.Writer bw)
                throws java.io.IOException
Writes the operation to a PDM file.

Parameters:
bw - Writer
Throws:
java.io.IOException

writeToDot

public void writeToDot(java.io.Writer bw,
                       PDMModel model)
                throws java.io.IOException
Writes the operation to dot. The operation is represented by arcs from the input to the output elements. In between there is a 'knot' to connect the arcs together that belong together in one operation.

Parameters:
bw - Writer
model - PDMModel
Throws:
java.io.IOException

writeToDot

public void writeToDot(java.io.Writer bw)
                throws java.io.IOException
Writes the operation to dot. The operation is represented by arcs from the input to the output elements. In between there is a 'knot' to connect the arcs together that belong together in one operation.

Parameters:
bw - Writer
model - PDMModel
Throws:
java.io.IOException