public class Process
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Process.COUNTER_TYPES
This enum describes the possible stats counter for the pattern an other
process entities
|
Modifier and Type | Field and Description |
---|---|
static java.util.Random |
generator
This is the random number generator
|
static java.lang.String |
version
This is the current library version
|
static org.deckfour.xes.extension.XExtensionManager |
xesExtensionManager |
static org.deckfour.xes.factory.XFactory |
xesFactory
This is the openXES factory object
|
Constructor and Description |
---|
Process(java.lang.String name)
Default class constructor
|
Process(java.lang.String name,
PlgActivity starting)
Default class constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
addProcessToPLGZipFile(java.util.zip.ZipOutputStream out) |
PlgActivity |
askNewActivity()
Asks the process for a new random activity.
|
void |
cleanModelCache()
This method cleans the cache for the process models (both the Heuristics
Net and the Petri Net).
|
static void |
decorateElement(org.deckfour.xes.model.XAttributable element,
java.lang.String attributeName,
java.lang.String value,
java.lang.String extensionName) |
org.deckfour.xes.model.XLog |
generateXESLog(int cases,
int percentAsInterval,
int percentErrors)
This method executes the current process and record the actions into a
log object
|
java.util.Vector<PlgActivity> |
getActivityList()
Gets the activity list
|
org.processmining.models.graphbased.directed.bpmn.BPMNDiagram |
getBPMNDiagram()
This method to generate a BPMN representation of the current model
|
PlgDependencyGraph |
getDependencyGraph()
This method returns the dependency graph associated to the process
|
PlgActivity |
getFirstActivity()
Gets the first process activity
|
PlgActivity |
getLastActivity()
Gets the last process activity
|
int |
getMaxDepth()
This method returns the maximum network depth
|
java.lang.String |
getName()
Gets the process name
|
java.util.HashMap<Process.COUNTER_TYPES,java.lang.Integer> |
getPatternsCounter()
This method returns the number of instances per activity pattern
|
java.lang.Integer |
getPatternsCounter(Process.COUNTER_TYPES pattern)
This method returns the number of instances of a particular pattern or,
more generally some statistics about the process
|
org.processmining.models.graphbased.directed.petrinet.Petrinet |
getPetriNet()
This method to generate a Petri Net representation of the current model
FIXME: THIS METHOD IS STILL NOT WORKING!
|
static boolean[][] |
heuristicsNetToAdjacencyMatrix(org.processmining.models.heuristics.HeuristicsNet hn)
This method to convert a Heuristics Net into an adjacency matrix
|
static Process |
loadProcessFromPLGFile(java.lang.String filename)
This method tries to build a process object starting from a correctly
generated file.
|
static Process |
loadProcessFromXMLFile(java.io.File inputFile) |
void |
randomize(int deep)
This method populates the current process with some random activities.
|
void |
randomize(int ANDBranches,
int XORBranches,
int loopPercent,
int singleActivityProbability,
int sequenceProbability,
int ANDProbability,
int XORProbability,
int deep)
This method populates the current process with some random activities
|
void |
randomize(PlgParameters parameters)
This method populates the current process with some random activities
|
boolean |
saveProcessAs(java.lang.String filename)
This method is used to export the current process into a single file.
|
PlgActivity |
searchActivityFromId(java.lang.String activityId)
This method is used to scan the whole set of activities in order to find
the required one.
|
PlgActivity |
searchActivityFromName(java.lang.String activityName)
This method is used to scan the whole set of activities in order to find
the required one.
|
void |
setFirstActivity(PlgActivity firstActivity)
Sets the first process activity
|
void |
setLastActivity(PlgActivity lastActivity)
Sets the last process activity
|
void |
setName(java.lang.String name)
Sets the process name
|
public static final java.lang.String version
public static java.util.Random generator
public static org.deckfour.xes.factory.XFactory xesFactory
public static org.deckfour.xes.extension.XExtensionManager xesExtensionManager
public Process(java.lang.String name, PlgActivity starting)
name
- the new process namestarting
- the first activity of the processpublic Process(java.lang.String name)
name
- the new process namepublic void setName(java.lang.String name)
name
- the new process namepublic java.lang.String getName()
public PlgActivity getFirstActivity()
public void setFirstActivity(PlgActivity firstActivity)
firstActivity
- the new first process activitypublic PlgActivity getLastActivity()
public void setLastActivity(PlgActivity lastActivity)
lastActivity
- the new last process activitypublic java.util.Vector<PlgActivity> getActivityList()
public PlgActivity askNewActivity()
public org.deckfour.xes.model.XLog generateXESLog(int cases, int percentAsInterval, int percentErrors) throws java.io.IOException
cases
- percentAsInterval
- percentErrors
- java.io.IOException
XLog
public void cleanModelCache()
public org.processmining.models.graphbased.directed.petrinet.Petrinet getPetriNet()
public org.processmining.models.graphbased.directed.bpmn.BPMNDiagram getBPMNDiagram()
public PlgDependencyGraph getDependencyGraph()
public static boolean[][] heuristicsNetToAdjacencyMatrix(org.processmining.models.heuristics.HeuristicsNet hn)
hn
- the Heuristics Net to convertgetActivityList()
public java.util.HashMap<Process.COUNTER_TYPES,java.lang.Integer> getPatternsCounter()
public java.lang.Integer getPatternsCounter(Process.COUNTER_TYPES pattern)
pattern
- the name of the patternpublic int getMaxDepth()
public PlgActivity searchActivityFromId(java.lang.String activityId)
activityId
- the identifier of the activitypublic PlgActivity searchActivityFromName(java.lang.String activityName)
activityName
- the name of the activitypublic boolean saveProcessAs(java.lang.String filename) throws java.io.IOException
filename
- the destination filenamejava.io.IOException
public boolean addProcessToPLGZipFile(java.util.zip.ZipOutputStream out) throws java.io.IOException
out
- java.io.IOException
public static Process loadProcessFromPLGFile(java.lang.String filename) throws java.io.IOException
filename
- the absolute path of the process file to loadjava.io.IOException
saveProcessAs(String)
public static Process loadProcessFromXMLFile(java.io.File inputFile)
inputFile
- public void randomize(int deep)
deep
- the maximum network deeppublic void randomize(int ANDBranches, int XORBranches, int loopPercent, int singleActivityProbability, int sequenceProbability, int ANDProbability, int XORProbability, int deep)
ANDBranches
- the maximum number of AND branches (must be > 1)XORBranches
- the maximum number of XOR branches (must be > 1)loopPercent
- the loop probability (must be >= 0 and <= 100)singleActivityProbability
- the probability of single activity (must
be >= 0 and <= 100)sequenceProbability
- the probability of sequence activity (must be
>= 0 and <= 100)ANDProbability
- the probability of AND split-join (must be >= 0 and
<= 100)XORProbability
- the probability of XOR split-join (must be >= 0 and
<= 100)deep
- the maximum network deeppublic void randomize(PlgParameters parameters)
parameters
- the object with all the parameterspublic static void decorateElement(org.deckfour.xes.model.XAttributable element, java.lang.String attributeName, java.lang.String value, java.lang.String extensionName)