org.processmining.framework.models.bpel
Class BPELProcess

java.lang.Object
  extended by org.processmining.framework.models.bpel.BPELProcess
All Implemented Interfaces:
BPELVisitable

public class BPELProcess
extends java.lang.Object
implements BPELVisitable

Title: BPELProcess

Description: Class for a BPEL process

Copyright: Copyright (c) 2006

Company: TU/e

Version:
1.0
Author:
Eric Verbeek

Constructor Summary
BPELProcess(org.w3c.dom.Element element)
          Create a new BPEL process from the given element.
BPELProcess(java.lang.String name)
          Create a new BPEL process with given name.
 
Method Summary
 void acceptVisitor(BPELVisitor visitor)
          Accept a visitor.
 int countActivities(java.lang.String name)
          Count the number of activities in the process.
 BPELActivity getActivity()
          Get the child activity of the process.
 java.lang.String getName()
          Get the value of the name attribute for the process.
 void hookupActivities()
          Traverse the underlying element and create a BPEL activity for every recognized element.
 void setAttribute(java.lang.String name, java.lang.String value)
          Set an attribute for the process.
 void setChildActivity(BPELActivity activity)
          Set the child activity.
 java.lang.String toString()
          Return a string representation of the process.
 java.lang.String writeToDot(BPEL model)
          Write the process in dot format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BPELProcess

public BPELProcess(org.w3c.dom.Element element)
Create a new BPEL process from the given element.

Parameters:
element - Element This should be the element underlying the BPEL process.

BPELProcess

public BPELProcess(java.lang.String name)
Create a new BPEL process with given name.

Parameters:
name - String The name attribute of the new process.
Method Detail

hookupActivities

public void hookupActivities()
Traverse the underlying element and create a BPEL activity for every recognized element.


setChildActivity

public void setChildActivity(BPELActivity activity)
Set the child activity.

Parameters:
activity - BPELActivity The child activity.

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
Set an attribute for the process. Note that we set if in the underlying element.

Parameters:
name - String The name of the attribute
value - String The value of the attribute

toString

public java.lang.String toString()
Return a string representation of the process.

Overrides:
toString in class java.lang.Object
Returns:
String A string representation of the process.

acceptVisitor

public void acceptVisitor(BPELVisitor visitor)
Accept a visitor.

Specified by:
acceptVisitor in interface BPELVisitable
Parameters:
visitor - BPELVisitor The visitor.

getName

public java.lang.String getName()
Get the value of the name attribute for the process.

Returns:
String The value of the name attribute.

getActivity

public BPELActivity getActivity()
Get the child activity of the process.

Returns:
BPELActivity The child activity.

countActivities

public int countActivities(java.lang.String name)
Count the number of activities in the process.

Parameters:
name - String The tag name of the activities to count.
Returns:
int The numbe rof activities in ht eproces swith the given tag name.

writeToDot

public java.lang.String writeToDot(BPEL model)
Write the process in dot format.

Parameters:
model - BPEL The corresponding BPEL model.
Returns:
String Dot representation of the process.