|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.processmining.framework.log.LogEntity
org.processmining.framework.log.Process
org.processmining.framework.log.rfb.ProcessImpl
public class ProcessImpl
This class provides a complete implementation for a process, which is essentially a container for process instances with additional attributes.
Notice: This implementation is optimized for random access using indices for addressing specific process instances. Referencing instances by their name is implemented in a rather expensive manner to this date.
Field Summary | |
---|---|
protected java.util.HashMap<java.lang.String,java.lang.String> |
attributes
Data attributes associated with a process |
protected java.lang.String |
description
The process description |
protected java.util.ArrayList<ProcessInstance> |
instances
Contains the instances of the process in an ordered fashion. |
protected java.lang.String |
name
The process ID |
Constructor Summary | |
---|---|
ProcessImpl(ProcessImpl template)
Creates a clone of the provided process. |
|
ProcessImpl(java.lang.String name,
java.lang.String description,
java.util.Map<java.lang.String,java.lang.String> attributes)
Creates a new process. |
Method Summary | |
---|---|
void |
addProcessInstance(ProcessInstance instance)
Adds a new process instance to this process (appended to the end of the already contained set). |
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. |
boolean |
removeProcessInstance(ProcessInstance instance)
Removes the given process instance from the process. |
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 nDescription)
Sets the description of this entity |
void |
setName(java.lang.String nName)
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 |
---|
protected java.util.ArrayList<ProcessInstance> instances
protected java.lang.String name
protected java.lang.String description
protected java.util.HashMap<java.lang.String,java.lang.String> attributes
Constructor Detail |
---|
public ProcessImpl(java.lang.String name, java.lang.String description, java.util.Map<java.lang.String,java.lang.String> attributes)
name
- Name / ID of the process.description
- Description string.attributes
- Set of attributes as key-value pairs.public ProcessImpl(ProcessImpl template)
This is derived from the practice of cloning, or deriving, log readers, where not always all instances are transferred to the new clone. It is thus up to the implementation of the cloning class to take care of transferring instances (in the depth required).
template
- The process to be cloned in a super-shallow manner.Method Detail |
---|
public void addProcessInstance(ProcessInstance instance)
addProcessInstance
in class Process
public boolean removeProcessInstance(ProcessInstance instance)
instance
- The process instance to be removed.
public ProcessInstance getInstance(int index)
Process
getInstance
in class Process
index
- Index of the requested process instance,
must be within the range [0, size()]
.
public ProcessInstance getInstance(java.lang.String name)
Process
getInstance
in class Process
public java.lang.String[] getInstanceNames()
Process
getInstanceNames
in class Process
public ModelElements getModelElements()
Process
getModelElements
in class Process
public java.util.Iterator iterator()
Process
iterator
in class Process
public int size()
Process
size
in class Process
public int clear()
Process
clear
in class Process
public ProcessInstance removeProcessInstance(java.lang.String name)
Process
removeProcessInstance
in class Process
name
- Name of the process instance to remove.
null
otherwise.public ProcessInstance removeProcessInstance(int index)
Process
removeProcessInstance
in class Process
index
- Index of the process instance to remove.
null
otherwise.public java.lang.String toString()
LogEntity
toString
in class LogEntity
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
LogEntity
getAttributes
in class LogEntity
public java.lang.String getDescription()
LogEntity
getDescription
in class LogEntity
public java.lang.String getName()
LogEntity
getName
in class LogEntity
public void removeAttribute(java.lang.String key)
LogEntity
removeAttribute
in class LogEntity
public void setAttribute(java.lang.String key, java.lang.String value)
LogEntity
setAttribute
in class LogEntity
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> data)
LogEntity
setAttributes
in class LogEntity
public void setDescription(java.lang.String nDescription)
LogEntity
setDescription
in class LogEntity
public void setName(java.lang.String nName)
LogEntity
setName
in class LogEntity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |