Class LogSkeleton
- java.lang.Object
-
- org.processmining.logskeleton.models.LogSkeleton
-
- All Implemented Interfaces:
org.processmining.framework.util.HTMLToString
public class LogSkeleton extends java.lang.Object implements org.processmining.framework.util.HTMLToString
-
-
Constructor Summary
Constructors Constructor Description LogSkeleton()LogSkeleton(LogSkeletonCount countModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddEquivalenceClass(int noiseLevel, java.util.Collection<java.lang.String> activities)Adds the provided activities as an equivalence for the provided noise level.voidaddEquivalenceClass(java.util.Collection<java.lang.String> activities)Adds the provided activities as an equivalence for the current noise level.voidaddPrePost(java.lang.String activity, java.util.Collection<java.lang.String> pre, java.util.Collection<java.lang.String> post)Registers that the provided activity has the provided preset of activities and the provided postset of activities.voidaddSameCount(int noiseLevel, java.util.Collection<java.lang.String> activities)Deprecated.voidaddSameCount(java.util.Collection<java.lang.String> activities)Deprecated.java.util.Collection<Violation>check(org.deckfour.xes.model.XTrace trace, LogSkeletonCount model, CheckerConfiguration configuration)Checks whether the provided trace and the provided count model violate this log skeleton or this count model, using the provided configuration.voidcleanPrePost()Restore any removed activities in the relations.org.processmining.plugins.graphviz.dot.DotcreateGraph(java.util.Set<LogSkeletonRelation> relations)Returns a dot visualization for all activities and the provided relations only.org.processmining.plugins.graphviz.dot.DotcreateGraph(BrowserConfiguration configuration)Returns a dot visualization for the provided configuration.org.processmining.plugins.graphviz.dot.DotcreateGraph(LogSkeletonRelation relation)Returns a dot visualization for all activities and the provided relation only.voidexportToFile(com.csvreader.CsvWriter writer)Exports the log skeleton to a file.java.util.Collection<java.lang.String>getActivities()Returns a collection containing all activities.java.util.Set<java.lang.String>getBoundary()intgetCount(java.lang.String activity)java.util.Collection<java.lang.String>getEquivalenceClass(java.lang.String activity)Returns the equivalence class for the provided activity for the current threshold.java.util.Collection<java.lang.String>getEquivalenceClass(java.lang.String activity, java.util.Collection<java.lang.String> activities)Returns the sorted intersection of the provided set of activities and the equivalence class for the provided activity for the current threshold.intgetEquivalenceThreshold()java.util.Set<java.lang.String>getForbidden()intgetHorizon()java.lang.StringgetLabel()Returns the label for this log skeleton.intgetMax(java.lang.String activity)intgetMaxThresholdNotCoExistence(java.lang.String fromActivity, java.lang.String toActivity)intgetMaxThresholdNotPrecedence(java.lang.String fromActivity, java.lang.String toActivity)intgetMaxThresholdNotResponse(java.lang.String fromActivity, java.lang.String toActivity)intgetMaxThresholdPrecedence(java.lang.String fromActivity, java.lang.String toActivity)intgetMaxThresholdResponse(java.lang.String fromActivity, java.lang.String toActivity)intgetMin(java.lang.String activity)intgetNotCoExistenceThreshold()intgetPrecedenceThreshold()java.util.Set<java.lang.String>getRequired()intgetResponseThreshold()java.util.Collection<java.lang.String>getSameCounts(java.lang.String activity)Deprecated.java.util.Collection<java.lang.String>getSameCounts(java.lang.String activity, java.util.Collection<java.lang.String> activities)Deprecated.java.util.List<java.util.List<java.lang.String>>getSplitters()booleanhasManyNotCoExistenceArcs(boolean isUseEquivalenceClass)Returns whether the log skeleton contains more than 100 Not Co-Existence relations to show.booleanhasNonRedundantNotCoExistence(java.lang.String fromActivity, java.lang.String toActivity, java.util.Collection<java.lang.String> activities, BrowserConfiguration configuration)booleanhasNonRedundantNotPrecedence(java.lang.String fromActivity, java.lang.String toActivity, java.util.Collection<java.lang.String> activities)booleanhasNonRedundantNotResponse(java.lang.String fromActivity, java.lang.String toActivity, java.util.Collection<java.lang.String> activities)booleanhasNonRedundantPrecedence(java.lang.String fromActivity, java.lang.String toActivity, java.util.Collection<java.lang.String> activities)booleanhasNonRedundantResponse(java.lang.String fromActivity, java.lang.String toActivity, java.util.Collection<java.lang.String> activities)booleanhasNotPrecedence(java.lang.String fromActivity, java.lang.String toActivity)booleanhasNotResponse(java.lang.String fromActivity, java.lang.String toActivity)voidimportFromStream(com.csvreader.CsvReader reader)voidsetBoundary(java.util.Set<java.lang.String> boundary)Sets the set of boundary activities (to be included in the legend).voidsetEquivalenceThreshold(int equivalenceThreshold)Sets the equivalence threshold to the provided threshold.voidsetForbidden(java.util.Set<java.lang.String> forbidden)Sets the set of forbidden activities (to be included in the legend).voidsetHorizon(int horizon)voidsetLabel(java.lang.String label)Sets the label for this log skeleton (to be included in the legend and in new windows showing log skeletons).voidsetNotCoExistenceThreshold(int notCoOccurencethreshold)Sets the not-co-existence threshold to the provided threshold.voidsetPrecedenceThreshold(int precedenceThreshold)Sets the precedence threshold to the provided threshold.voidsetRequired(java.util.Set<java.lang.String> required)Sets the set of required activities (to be included in the legend).voidsetResponseThreshold(int responseThreshold)Sets the response threshold to the provided threshold.voidsetSplitters(java.util.List<java.util.List<java.lang.String>> splitters)Sets the set of splitters (to be included in the legend).booleanshowNotCoExistence(java.lang.String fromActivity, java.lang.String toActivity, java.util.Collection<java.lang.String> selectedActivities)java.lang.StringtoHTMLString(boolean includeHTMLTags)Returns the log skeleton as an HTML string.org.processmining.plugins.graphviz.dot.Dotvisualize(BrowserConfiguration configuration)Returns a dot visualization of the log skeleton, using the provided configuration.
-
-
-
Constructor Detail
-
LogSkeleton
public LogSkeleton()
-
LogSkeleton
public LogSkeleton(LogSkeletonCount countModel)
-
-
Method Detail
-
addSameCount
@Deprecated public void addSameCount(java.util.Collection<java.lang.String> activities)
Deprecated.
-
addEquivalenceClass
public void addEquivalenceClass(java.util.Collection<java.lang.String> activities)
Adds the provided activities as an equivalence for the current noise level.- Parameters:
activities- The provided activities
-
addSameCount
@Deprecated public void addSameCount(int noiseLevel, java.util.Collection<java.lang.String> activities)Deprecated.
-
addEquivalenceClass
public void addEquivalenceClass(int noiseLevel, java.util.Collection<java.lang.String> activities)Adds the provided activities as an equivalence for the provided noise level.- Parameters:
noiseLevel- The provided noise level.activities- The provided activities.
-
getSameCounts
@Deprecated public java.util.Collection<java.lang.String> getSameCounts(java.lang.String activity)
Deprecated.
-
getEquivalenceClass
public java.util.Collection<java.lang.String> getEquivalenceClass(java.lang.String activity)
Returns the equivalence class for the provided activity for the current threshold.- Parameters:
activity- The provided activity.- Returns:
- The equivalence class.
-
getSameCounts
@Deprecated public java.util.Collection<java.lang.String> getSameCounts(java.lang.String activity, java.util.Collection<java.lang.String> activities)Deprecated.
-
getEquivalenceClass
public java.util.Collection<java.lang.String> getEquivalenceClass(java.lang.String activity, java.util.Collection<java.lang.String> activities)Returns the sorted intersection of the provided set of activities and the equivalence class for the provided activity for the current threshold. This is useful if the representative of an equivalence class is not shown. As a result, the smallest shown activity will be used as representative.- Parameters:
activity- The provided activity.activities- The provided activities.- Returns:
- The intersected equivalence class.
-
addPrePost
public void addPrePost(java.lang.String activity, java.util.Collection<java.lang.String> pre, java.util.Collection<java.lang.String> post)Registers that the provided activity has the provided preset of activities and the provided postset of activities.- Parameters:
activity- The provided activity.pre- The provided preset of activities. These activities occur before the provided activity in the trace.post- The provided postset of activities. These activities occur after the provided activity in the trace.
-
cleanPrePost
public void cleanPrePost()
Restore any removed activities in the relations. Removing an activity A from a (threshold!) set S removes it in the sense that S.contains(A) will return false. However, the activity will still be there in another way, which allows us to restore the removal.
-
check
public java.util.Collection<Violation> check(org.deckfour.xes.model.XTrace trace, LogSkeletonCount model, CheckerConfiguration configuration)
Checks whether the provided trace and the provided count model violate this log skeleton or this count model, using the provided configuration.- Parameters:
trace- The provided trace.model- The provided count model.configuration- The provided configuration.- Returns:
- A collection of violations. The configuration determines which checks are done. Depending on the configuration, only the first violation is returned, or all violations.
-
toHTMLString
public java.lang.String toHTMLString(boolean includeHTMLTags)
Returns the log skeleton as an HTML string. For debugging purposes only.- Specified by:
toHTMLStringin interfaceorg.processmining.framework.util.HTMLToString
-
visualize
public org.processmining.plugins.graphviz.dot.Dot visualize(BrowserConfiguration configuration)
Returns a dot visualization of the log skeleton, using the provided configuration.- Parameters:
configuration- The provided configuration.- Returns:
- The dot visualization.
-
showNotCoExistence
public boolean showNotCoExistence(java.lang.String fromActivity, java.lang.String toActivity, java.util.Collection<java.lang.String> selectedActivities)
-
createGraph
public org.processmining.plugins.graphviz.dot.Dot createGraph(LogSkeletonRelation relation)
Returns a dot visualization for all activities and the provided relation only.- Parameters:
relation- The provided relation.- Returns:
- A dot visualization.
-
createGraph
public org.processmining.plugins.graphviz.dot.Dot createGraph(java.util.Set<LogSkeletonRelation> relations)
Returns a dot visualization for all activities and the provided relations only.- Parameters:
relations- The provided relations.- Returns:
- A dot visualization.
-
createGraph
public org.processmining.plugins.graphviz.dot.Dot createGraph(BrowserConfiguration configuration)
Returns a dot visualization for the provided configuration.- Parameters:
configuration- The provided configuration.- Returns:
- A dot visualization.
-
getActivities
public java.util.Collection<java.lang.String> getActivities()
Returns a collection containing all activities.- Returns:
- A collection containing all activities.
-
setRequired
public void setRequired(java.util.Set<java.lang.String> required)
Sets the set of required activities (to be included in the legend).- Parameters:
required- The set of required activities.
-
setForbidden
public void setForbidden(java.util.Set<java.lang.String> forbidden)
Sets the set of forbidden activities (to be included in the legend).- Parameters:
forbidden- The set of forbidden activities.
-
setBoundary
public void setBoundary(java.util.Set<java.lang.String> boundary)
Sets the set of boundary activities (to be included in the legend).- Parameters:
forbidden- The set of forbidden activities.
-
setSplitters
public void setSplitters(java.util.List<java.util.List<java.lang.String>> splitters)
Sets the set of splitters (to be included in the legend).- Parameters:
splitters- The set of splitters.
-
getLabel
public java.lang.String getLabel()
Returns the label for this log skeleton.- Returns:
- The label for this log skeleton.
-
setLabel
public void setLabel(java.lang.String label)
Sets the label for this log skeleton (to be included in the legend and in new windows showing log skeletons).- Parameters:
label-
-
exportToFile
public void exportToFile(com.csvreader.CsvWriter writer) throws java.io.IOExceptionExports the log skeleton to a file.- Parameters:
writer- The write to use when writing to the file.- Throws:
java.io.IOException
-
importFromStream
public void importFromStream(com.csvreader.CsvReader reader) throws java.io.IOException- Throws:
java.io.IOException
-
setPrecedenceThreshold
public void setPrecedenceThreshold(int precedenceThreshold)
Sets the precedence threshold to the provided threshold.- Parameters:
precedenceThreshold- The provided threshold.
-
getPrecedenceThreshold
public int getPrecedenceThreshold()
-
setResponseThreshold
public void setResponseThreshold(int responseThreshold)
Sets the response threshold to the provided threshold.- Parameters:
responseThreshold- The provided threshold.
-
getResponseThreshold
public int getResponseThreshold()
-
setNotCoExistenceThreshold
public void setNotCoExistenceThreshold(int notCoOccurencethreshold)
Sets the not-co-existence threshold to the provided threshold.- Parameters:
notCoOccurencethreshold- The provided threshold.
-
getNotCoExistenceThreshold
public int getNotCoExistenceThreshold()
-
hasManyNotCoExistenceArcs
public boolean hasManyNotCoExistenceArcs(boolean isUseEquivalenceClass)
Returns whether the log skeleton contains more than 100 Not Co-Existence relations to show. if so, this relation will not be shown by default.- Parameters:
isUseEquivalenceClass- Whether the Not Co-Existence relation is restricted to the representatives of the Equivalence relation.- Returns:
- Whether the number of Not Co-Existence relation exceeds 100.
-
setEquivalenceThreshold
public void setEquivalenceThreshold(int equivalenceThreshold)
Sets the equivalence threshold to the provided threshold.- Parameters:
equivalenceThreshold- The provided threshold.
-
getEquivalenceThreshold
public int getEquivalenceThreshold()
-
setHorizon
public void setHorizon(int horizon)
-
hasNonRedundantResponse
public boolean hasNonRedundantResponse(java.lang.String fromActivity, java.lang.String toActivity, java.util.Collection<java.lang.String> activities)
-
hasNonRedundantPrecedence
public boolean hasNonRedundantPrecedence(java.lang.String fromActivity, java.lang.String toActivity, java.util.Collection<java.lang.String> activities)
-
hasNonRedundantNotResponse
public boolean hasNonRedundantNotResponse(java.lang.String fromActivity, java.lang.String toActivity, java.util.Collection<java.lang.String> activities)
-
hasNonRedundantNotPrecedence
public boolean hasNonRedundantNotPrecedence(java.lang.String fromActivity, java.lang.String toActivity, java.util.Collection<java.lang.String> activities)
-
hasNotResponse
public boolean hasNotResponse(java.lang.String fromActivity, java.lang.String toActivity)
-
hasNotPrecedence
public boolean hasNotPrecedence(java.lang.String fromActivity, java.lang.String toActivity)
-
hasNonRedundantNotCoExistence
public boolean hasNonRedundantNotCoExistence(java.lang.String fromActivity, java.lang.String toActivity, java.util.Collection<java.lang.String> activities, BrowserConfiguration configuration)
-
getMin
public int getMin(java.lang.String activity)
-
getMax
public int getMax(java.lang.String activity)
-
getCount
public int getCount(java.lang.String activity)
-
getMaxThresholdResponse
public int getMaxThresholdResponse(java.lang.String fromActivity, java.lang.String toActivity)
-
getMaxThresholdPrecedence
public int getMaxThresholdPrecedence(java.lang.String fromActivity, java.lang.String toActivity)
-
getMaxThresholdNotResponse
public int getMaxThresholdNotResponse(java.lang.String fromActivity, java.lang.String toActivity)
-
getMaxThresholdNotPrecedence
public int getMaxThresholdNotPrecedence(java.lang.String fromActivity, java.lang.String toActivity)
-
getMaxThresholdNotCoExistence
public int getMaxThresholdNotCoExistence(java.lang.String fromActivity, java.lang.String toActivity)
-
getRequired
public java.util.Set<java.lang.String> getRequired()
-
getForbidden
public java.util.Set<java.lang.String> getForbidden()
-
getBoundary
public java.util.Set<java.lang.String> getBoundary()
-
getSplitters
public java.util.List<java.util.List<java.lang.String>> getSplitters()
-
getHorizon
public int getHorizon()
-
-