org.processmining.framework.models.petrinet.pattern
Class PatternMatcher

java.lang.Object
  extended by org.processmining.framework.models.petrinet.pattern.PatternMatcher
Direct Known Subclasses:
BPELPatternMatcher

public class PatternMatcher
extends java.lang.Object

Title: PatternMatcher

Description: A toolbox for finding different patterns in a Petri net, such as a BPEL Pick, Switch, Sequence, etc.

Copyright: Copyright (c) 2006

Company: University of Aarhus

Version:
1.0
Author:
Kristian Bisgaard Lassen (mailto:K.B.Lassen@daimi.au.dk)

Constructor Summary
PatternMatcher()
           
 
Method Summary
static LibraryComponent getComponentFromLibrary(PetriNet wfnet, java.lang.String componentPath, java.lang.String libraryPath, java.util.Set<PetriNet> components)
          Finds a component from a the user defined LIBRARY-components
static java.util.TreeSet<PetriNet> getComponents(PetriNet wfnet)
          This method finds all components that exists in the WF-net.
static java.util.List<ExplicitChoiceComponent> getExplicitChoiceComponents(PetriNet wfnet, java.util.Map<java.lang.String,Choice> choices)
           
static java.util.List<ImplicitChoiceComponent> getImplicitChoiceComponents(PetriNet wfnet, java.util.Map<java.lang.String,Choice> choices)
           
static java.util.List<MarkedGraphComponent> getMarkedGraphComponents(PetriNet wfnet, java.util.TreeSet<PetriNet> components)
           
static Component getMaximalSequence(PetriNet wfnet)
          Finds a maximal sequence in a given WF-net
static att.grappa.Node getNode(java.util.Collection<? extends att.grappa.Node> nodes, att.grappa.Node node)
           
static java.util.List<StateMachineComponent> getStateMachineComponents(PetriNet wfnet, java.util.TreeSet<PetriNet> components)
           
static java.util.List<WellStructuredGraphComponent> getWellStructuredGraphComponents(PetriNet wfnet, java.util.Set<PetriNet> components)
           
static Component getWhile(PetriNet wfnet)
          Finds a WHILE-component in a WF-net
static Pair<Transition,java.util.Set<att.grappa.Node>> reduce(PetriNet wfnet, PetriNet component)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternMatcher

public PatternMatcher()
Method Detail

getMaximalSequence

public static Component getMaximalSequence(PetriNet wfnet)
Finds a maximal sequence in a given WF-net

Parameters:
wfnet - - The net that is matched in
Returns:
A WF-net that is a marked graph and a state machine, or null if no such exist

getWellStructuredGraphComponents

public static java.util.List<WellStructuredGraphComponent> getWellStructuredGraphComponents(PetriNet wfnet,
                                                                                            java.util.Set<PetriNet> components)

getExplicitChoiceComponents

public static java.util.List<ExplicitChoiceComponent> getExplicitChoiceComponents(PetriNet wfnet,
                                                                                  java.util.Map<java.lang.String,Choice> choices)

getImplicitChoiceComponents

public static java.util.List<ImplicitChoiceComponent> getImplicitChoiceComponents(PetriNet wfnet,
                                                                                  java.util.Map<java.lang.String,Choice> choices)

getWhile

public static Component getWhile(PetriNet wfnet)
Finds a WHILE-component in a WF-net

Parameters:
wfnet - - A WF-net
choices - - A map over all places in the WF-net to their choice type
Returns:
A workflow net that represent a while loop, or null if no such is found

getComponents

public static java.util.TreeSet<PetriNet> getComponents(PetriNet wfnet)
This method finds all components that exists in the WF-net. The components are order by node size, so the the smallest WF-nets are first in an iteration over the answer

Parameters:
wfnet - - The WF-net
Returns:
A tree set of components in the WF-net

getComponentFromLibrary

public static LibraryComponent getComponentFromLibrary(PetriNet wfnet,
                                                       java.lang.String componentPath,
                                                       java.lang.String libraryPath,
                                                       java.util.Set<PetriNet> components)
                                                throws java.io.FileNotFoundException,
                                                       java.lang.Exception
Finds a component from a the user defined LIBRARY-components

Parameters:
wfnet - - A WF-net
libraryComponent - - A library component
components - - A set of components
Returns:
A component matched by a LIBRARY-component
Throws:
java.lang.Exception
java.io.FileNotFoundException

reduce

public static Pair<Transition,java.util.Set<att.grappa.Node>> reduce(PetriNet wfnet,
                                                                     PetriNet component)

getNode

public static att.grappa.Node getNode(java.util.Collection<? extends att.grappa.Node> nodes,
                                      att.grappa.Node node)

getStateMachineComponents

public static java.util.List<StateMachineComponent> getStateMachineComponents(PetriNet wfnet,
                                                                              java.util.TreeSet<PetriNet> components)

getMarkedGraphComponents

public static java.util.List<MarkedGraphComponent> getMarkedGraphComponents(PetriNet wfnet,
                                                                            java.util.TreeSet<PetriNet> components)