public class PlgActivity
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PlgActivity.RELATIONS
This enum describes the possible relations of an activity
|
Modifier and Type | Field and Description |
---|---|
PlgPatternFrame |
frame |
PlgActivity |
loopOpposite |
java.lang.String |
loopString |
Constructor and Description |
---|
PlgActivity(Process process,
java.lang.String activityName)
The default activity constructor.
|
PlgActivity(Process process,
java.lang.String activityName,
java.lang.Integer activityDuration)
The default activity constructor
|
Modifier and Type | Method and Description |
---|---|
PlgActivity |
addNext(PlgActivity destination)
This method adds the correct successor activity.
|
java.lang.Integer |
duration()
Gets the activity duration
|
void |
duration(java.lang.Integer activityDuration)
Sets the activity duration
|
boolean |
equals(java.lang.Object compare) |
java.util.Vector<PlgObservation> |
generateInstance(int startingTime)
This method generates an instance of the the activity.
|
org.deckfour.spex.SXTag |
getActivityAsXML(org.deckfour.spex.SXTag parent)
This method is used to export the activity into a single XML blob
|
java.lang.String |
getActivityId()
This method returns an id for the current activity
|
org.deckfour.xes.model.XEvent |
getBasicXEvent()
This method to get a default structured XEvent for the given activity
|
PlgPatternFrame |
getFrame() |
java.lang.String |
getName()
Gets the activity name
|
java.util.Map<PlgActivity,java.lang.Double> |
getProbabilityOfEdges()
This method gets the probability of going to each exiting activity
|
Process |
getProcess()
Gets the activity process
|
java.util.Set<PlgActivity> |
getRelationsFrom()
This method returns the set of all incoming activities to the current one
|
java.util.Set<PlgActivity> |
getRelationsTo()
This method returns the set of all outgoing activities from the current
one
|
PlgActivity.RELATIONS |
getRelationType()
This method returns the type of the current activity
|
PlgActivity |
inAndUntil(PlgActivity destination)
Inserts in the process a new AND split-join, between the current activity
and the destination activity.
|
PlgActivity |
inLoopUntil(PlgActivity destination)
Inserts in the process a new loop between the current activity and the
destination activity.
|
PlgActivity |
inXorUntil(PlgActivity destination)
Inserts in the process a new XOR split-join, between the current activity
and the destination activity.
|
boolean |
isInsideLoop() |
boolean |
isLoopBound() |
void |
removeConnection(PlgActivity destination)
This method removes a connection going from the `this' activity to the
destination one
|
void |
setActivityFromXML(org.w3c.dom.Node node)
This method populates the current node starting from a well-structured
XML fragment.
|
void |
setFrame(PlgPatternFrame frame) |
void |
setName(java.lang.String activityName)
Sets the new activity name
|
void |
setProcess(Process process)
Sets the activity process
|
void |
setRandomWeights(ProbabilityDistribution distr)
This method assigns random weights to all the exiting archs according to
the given probability distribution
|
java.lang.String |
toString() |
public PlgActivity loopOpposite
public java.lang.String loopString
public PlgPatternFrame frame
public PlgActivity(Process process, java.lang.String activityName, java.lang.Integer activityDuration)
process
- the process which the activity belongs toactivityName
- the new activity nameactivityDuration
- the new activity durationpublic PlgActivity(Process process, java.lang.String activityName)
process
- the process which the activity belongs toactivityName
- the new activity namerandomActivityDuration()
public void setName(java.lang.String activityName)
activityName
- the new activity namepublic java.lang.String getName()
public void duration(java.lang.Integer activityDuration)
activityDuration
- the new activity durationpublic java.lang.Integer duration()
public void setProcess(Process process)
process
- the new activity processpublic Process getProcess()
public java.util.Map<PlgActivity,java.lang.Double> getProbabilityOfEdges()
public boolean isLoopBound()
public boolean isInsideLoop()
public PlgActivity addNext(PlgActivity destination)
destination
- the destination activitypublic void setRandomWeights(ProbabilityDistribution distr)
distr
- distribution
- public void removeConnection(PlgActivity destination)
destination
- the activity to be removed from the outgoing edgespublic PlgActivity inLoopUntil(PlgActivity destination)
destination
- the loop boundpublic PlgActivity inXorUntil(PlgActivity destination)
Process p = new Process("test"); Activity a1 = p.askNewActivity(); Activity a2 = p.askNewActivity(); Activity a3 = p.askNewActivity(); Activity a4 = p.askNewActivity(); a1.inXorUntil(a4); a1.addNext(a2).addNext(a4); a1.addNext(a3).addNext(a4);
destination
- the XOR split activitypublic PlgActivity inAndUntil(PlgActivity destination)
Process p = new Process("test"); Activity a1 = p.askNewActivity(); Activity a2 = p.askNewActivity(); Activity a3 = p.askNewActivity(); Activity a4 = p.askNewActivity(); a1.inAndUntil(a4); a1.addNext(a2).addNext(a4); a1.addNext(a3).addNext(a4);
destination
- the AND split activitypublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object compare)
equals
in class java.lang.Object
public java.util.Vector<PlgObservation> generateInstance(int startingTime) throws java.io.IOException
startingTime
- the starting time of the first activityjava.io.IOException
public java.lang.String getActivityId()
public org.deckfour.spex.SXTag getActivityAsXML(org.deckfour.spex.SXTag parent) throws java.io.IOException
parent
- the parend where the description has to be putjava.io.IOException
public void setActivityFromXML(org.w3c.dom.Node node)
node
- the correct XML fragment objectpublic org.deckfour.xes.model.XEvent getBasicXEvent()
XEvent
public java.util.Set<PlgActivity> getRelationsFrom()
public java.util.Set<PlgActivity> getRelationsTo()
public PlgActivity.RELATIONS getRelationType()
public PlgPatternFrame getFrame()
public void setFrame(PlgPatternFrame frame)
frame
-