org.processmining.framework.log.proxy
Class ProxyProcess

java.lang.Object
  extended by org.processmining.framework.log.LogEntity
      extended by org.processmining.framework.log.Process
          extended by org.processmining.framework.log.proxy.ProxyProcess

public class ProxyProcess
extends Process

Author:
Christian W. Guenther (christian@deckfour.org)

Nested Class Summary
protected  class ProxyProcess.ProxyProcessIterator
           
 
Field Summary
protected  Process parent
           
 
Constructor Summary
ProxyProcess(Process aParent)
           
 
Method Summary
 void addProcessInstance(ProcessInstance instance)
          Adds the given process instance to this process.
 int clear()
          Removes all contained process instances from this process.
 java.util.Map<java.lang.String,java.lang.String> getAttributes()
          Returns the meta-data, as map of key-value pairs, associated to this entity.
 java.lang.String getDescription()
          Returns the description of this entity.
 ProcessInstance getInstance(int index)
          Retrieves an instance of this process by its relative index, i.e.
 ProcessInstance getInstance(java.lang.String name)
          Retrieves an instance of this process identified by its name, or ID, string.
 java.lang.String[] getInstanceNames()
          Returns an array containing the names, or IDs, of all instances of this process.
 ModelElements getModelElements()
          Returns the set of model elements contained in all instances of this process.
 java.lang.String getName()
          Returns the name of this entity.
 java.util.Iterator iterator()
          Returns an iterator over all instances of this process in the log.
 void removeAttribute(java.lang.String key)
          Removes the attribute with the given key from the set of attributes of this entity.
 ProcessInstance removeProcessInstance(int index)
          Removes the process instance with the given index, i.e.
 ProcessInstance removeProcessInstance(java.lang.String name)
          Removes the process instance with the given name, or ID, from this process.
 void setAttribute(java.lang.String key, java.lang.String value)
          Sets an attribute of this entity as a key-value pair.
 void setAttributes(java.util.Map<java.lang.String,java.lang.String> data)
          Sets the set of attributes, given as key-value pairs, for this entity.
 void setDescription(java.lang.String description)
          Sets the description of this entity
 void setName(java.lang.String name)
          Sets the name, or ID, of this entity
 int size()
          Returns the number of instances for this process contained in the log.
 java.lang.String toString()
          Returns a string representation of this entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

protected Process parent
Constructor Detail

ProxyProcess

public ProxyProcess(Process aParent)
Method Detail

addProcessInstance

public void addProcessInstance(ProcessInstance instance)
Description copied from class: Process
Adds the given process instance to this process. The process defined in the given instance must correspond to this process. If an instance with the same name is already contained in this process, it will be replaced by the given one.

Specified by:
addProcessInstance in class Process

clear

public int clear()
Description copied from class: Process
Removes all contained process instances from this process.

Specified by:
clear in class Process
Returns:
The number of removed process instances.

getInstance

public ProcessInstance getInstance(int index)
Description copied from class: Process
Retrieves an instance of this process by its relative index, i.e. order of appearance in the log.

Specified by:
getInstance in class Process
Parameters:
index - Index of the requested process instance, must be within the range [0, size()].
Returns:

getInstance

public ProcessInstance getInstance(java.lang.String name)
Description copied from class: Process
Retrieves an instance of this process identified by its name, or ID, string.

Specified by:
getInstance in class Process
Returns:

getInstanceNames

public java.lang.String[] getInstanceNames()
Description copied from class: Process
Returns an array containing the names, or IDs, of all instances of this process.

Specified by:
getInstanceNames in class Process
Returns:

getModelElements

public ModelElements getModelElements()
Description copied from class: Process
Returns the set of model elements contained in all instances of this process.

Specified by:
getModelElements in class Process
Returns:

iterator

public java.util.Iterator iterator()
Description copied from class: Process
Returns an iterator over all instances of this process in the log.

Specified by:
iterator in class Process
Returns:

removeProcessInstance

public ProcessInstance removeProcessInstance(java.lang.String name)
Description copied from class: Process
Removes the process instance with the given name, or ID, from this process.

Specified by:
removeProcessInstance in class Process
Parameters:
name - Name of the process instance to remove.
Returns:
The instance, if it was contained and removed; null otherwise.

removeProcessInstance

public ProcessInstance removeProcessInstance(int index)
Description copied from class: Process
Removes the process instance with the given index, i.e. order in the log, from this process.

Specified by:
removeProcessInstance in class Process
Parameters:
index - Index of the process instance to remove.
Returns:
The instance, if it was contained and removed; null otherwise.

size

public int size()
Description copied from class: Process
Returns the number of instances for this process contained in the log.

Specified by:
size in class Process
Returns:

getAttributes

public java.util.Map<java.lang.String,java.lang.String> getAttributes()
Description copied from class: LogEntity
Returns the meta-data, as map of key-value pairs, associated to this entity.

Specified by:
getAttributes in class LogEntity
Returns:

getDescription

public java.lang.String getDescription()
Description copied from class: LogEntity
Returns the description of this entity.

Specified by:
getDescription in class LogEntity
Returns:

getName

public java.lang.String getName()
Description copied from class: LogEntity
Returns the name of this entity.

Specified by:
getName in class LogEntity
Returns:

removeAttribute

public void removeAttribute(java.lang.String key)
Description copied from class: LogEntity
Removes the attribute with the given key from the set of attributes of this entity.

Specified by:
removeAttribute in class LogEntity

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.String value)
Description copied from class: LogEntity
Sets an attribute of this entity as a key-value pair. If a previous mapping for the given key exists, it will be removed. Otherwise a new mapping will be added.

Specified by:
setAttribute in class LogEntity

setAttributes

public void setAttributes(java.util.Map<java.lang.String,java.lang.String> data)
Description copied from class: LogEntity
Sets the set of attributes, given as key-value pairs, for this entity. Replaces the previously contained set of attributes.

Specified by:
setAttributes in class LogEntity

setDescription

public void setDescription(java.lang.String description)
Description copied from class: LogEntity
Sets the description of this entity

Specified by:
setDescription in class LogEntity

setName

public void setName(java.lang.String name)
Description copied from class: LogEntity
Sets the name, or ID, of this entity

Specified by:
setName in class LogEntity

toString

public java.lang.String toString()
Description copied from class: LogEntity
Returns a string representation of this entity.

Specified by:
toString in class LogEntity