public abstract class BranchingTree
extends java.lang.Object
Constructor and Description |
---|
BranchingTree(BranchingTree parent) |
BranchingTree(BranchingTree parent,
ProcessNode node) |
Modifier and Type | Method and Description |
---|---|
abstract java.util.Collection<ProcessNode> |
activitiesWithParticipant(java.lang.String participant)
identifies all choreography activities in this tree (i.e. this node and all
of its descendants), that involve participant
|
abstract boolean |
allAlternativesContainChoreographyActivities() |
abstract boolean |
allAlternativesContainMessageReceive()
Checks, wheter all alternative pathes contain catching MessageIntermediate-
Events or receive-tasks
|
abstract boolean |
allAlternativesContainMultipleChoreographyActivities() |
abstract boolean |
allAlternativesContainNonEmptyNonEndEventOrInvolve(java.lang.String participant)
checks, wheter all alternative pathes emerging from this node contain at
least one StartEvent, that is not an empty StartEvent or a
ChoreographyActivity, that involves participant
|
abstract boolean |
allAlternativesInvolve(java.lang.String participant)
checks, wheter all alternative pathes emerging from this node contain a
ChoreographyActivity, that involves participant
|
abstract boolean |
allParallelPathesSynchronizeBefore(ProcessNode node)
checks, wheter all parallel pathes, into which the tree splits from this
node on, synchronize again before the occurence of node
|
abstract boolean |
allPathesContainOneOf(java.util.Collection<ProcessNode> nodes)
states, wheter all pathes emerging from this node (i.e. all
pathes that consist only of decendants of this node) contain at least one
of the supplied nodes.
|
abstract boolean |
contains(BranchingTree tree) |
abstract boolean |
contains(ProcessNode node)
checks, wheter one of the descendant nodes of this BranchingTree-ndoe
contains node.
|
protected boolean |
containsKey(java.util.Map<java.lang.String,java.util.Map<java.lang.String,ProcessNode>> map,
java.lang.String key1,
java.lang.String key2)
checks, wheter map contains key1 and the mapping of key1 contains the key key2
|
abstract boolean |
containsOnIndirectWay(ProcessNode node)
checks, wheter the tree emerging from this node contains node on some
alternative path, but contains another ProcessNode before the first
occurence of node.
|
abstract ProcessNode |
createInstantiatingGateways(java.lang.String forParticipant,
BPMNModel inModel,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,StartEvent>> startEvents,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,ProcessNode>> firstNode,
java.util.Map<java.lang.String,Pool> pools)
Derives instantiating gateways and start-events from the structure of this
BranchingTree.
|
abstract BranchingTree |
eraseFirstChoreographyActivity()
removes the first choreography activity from this tree or, if this is not
possible because it represents a split- or join-node, the tree will pretend
its non-existence.
|
abstract BranchingTree |
eraseFirstNode()
removes the first ProcessNode from this tree or, if this is not
possible because it represents a split- or join-node, the tree will pretend
its non-existence.
|
abstract java.util.Set<ProcessNode> |
firstNodesOf(java.lang.String participant)
Collects all the first nodes, that involve the supplied participant.
|
abstract java.util.Collection<EventBasedGateway> |
getAllEventBasedGateways()
Collects all the EventBasedGateways, that this tree contains.
|
protected ProcessNode |
getNode() |
protected BranchingTree |
getParent() |
abstract java.util.Collection<java.lang.String> |
getParticipants()
collects all participants involved in ChoreographyActivities cotained in
this tree
|
protected boolean |
isParticipant(java.lang.String name)
states, whether name is a participant of the ProcessNode represented by this
BranchingTree-node
|
protected boolean |
isReceive()
Checks, wheter the node contained in this BranchingTree-node is a catching
MessageIntermediateEvent or a receive-task.
|
abstract java.util.Collection<ProcessNode> |
nextRealizedNodes(java.util.Map<java.lang.String,java.util.Map<java.lang.String,ProcessNode>> realizedNodes,
java.lang.String participant)
returns the first ProcessNode of every branch, that has an entry in
realizedNodes for the supplied participant
|
abstract boolean |
noAlternativesInvolve(java.lang.String participant)
checks, wheter none of the descendant nodes of this contains a
ChoreographyActivity that involves participant
|
abstract boolean |
noPathesContainNonEmptyStartEvent()
checks, wheter the whole tree emerging from this node contains no StartEvents,
that are not Empty StartEvents (instances exactly of StartEvent, not of one
of its subclasses)
|
abstract java.util.Collection<ProcessNode> |
parallelGatewaysBeforeFirstParticipationOf(java.util.Collection<java.lang.String> participants)
collects all parallel gateways, that occur in any path emerging from this
BranchingTree-Node before all of the supplied participants involved in
some ChoreographyActivity
|
int |
pathFromRootCount(ProcessNode node)
gives the number of occurences of a node in the path to (i.e. the ancestors of)
this BranchingTree object.
|
protected abstract java.util.Map<java.lang.String,java.util.Collection<BranchingTree>> |
processNodeOccurenceMap()
builds the map needed for checking synchronization of pathes (e.g. the second
parameter of synchronizesWithOneOf): it maps each ProcessNode-ID occuring in
this tree to the BranchingTee-node, that contains this ProcessNode.
|
abstract void |
setNext(BranchingTree next)
sets the next node for this BranchingTree-node
|
protected void |
setNode(ProcessNode node) |
protected void |
setParent(BranchingTree parent) |
abstract boolean |
synchronizesWithAllBeforeAndKeepsSynchronized(java.util.Collection<BranchingTree> branches,
java.util.Map<java.lang.String,java.util.Collection<BranchingTree>> nodeOccurences,
ProcessNode before)
checks, wheter all pathes emerging from this node synchronize with all
of the supplied branches, before the pathes contain the ProcessNode before
and wheter the pathes keep synchronized (i.e. if the path splits to parallel
pathes again, they also synchronize before the node "before")
|
protected abstract boolean |
synchronizesWithOneOf(java.util.Collection<BranchingTree> pathes,
java.util.Map<java.lang.String,java.util.Collection<BranchingTree>> processNodeOccurences)
checks, wheter all alternatives emerging from this BranchingTree-node
synchronize with one of the pathes in pathes.
|
abstract boolean |
trimAndEliminateToEndingAtNode(ProcessNode node)
Cuts all branches after the given node and eliminates branches,
which do not involve this node
|
public BranchingTree(BranchingTree parent)
public BranchingTree(BranchingTree parent, ProcessNode node)
protected ProcessNode getNode()
protected void setNode(ProcessNode node)
protected void setParent(BranchingTree parent)
protected BranchingTree getParent()
public abstract boolean contains(ProcessNode node)
public abstract void setNext(BranchingTree next)
public abstract boolean allAlternativesInvolve(java.lang.String participant)
public abstract boolean noAlternativesInvolve(java.lang.String participant)
public int pathFromRootCount(ProcessNode node)
node
- the node, whichs occurences to countpublic abstract java.util.Collection<ProcessNode> activitiesWithParticipant(java.lang.String participant)
participant
- the participant, who´s activities should be identifiedpublic abstract boolean allAlternativesContainChoreographyActivities()
public abstract boolean allAlternativesContainMultipleChoreographyActivities()
protected boolean isParticipant(java.lang.String name)
public abstract boolean trimAndEliminateToEndingAtNode(ProcessNode node)
public abstract boolean allPathesContainOneOf(java.util.Collection<ProcessNode> nodes)
nodes
- the nodes, of which at least one should occurprotected abstract boolean synchronizesWithOneOf(java.util.Collection<BranchingTree> pathes, java.util.Map<java.lang.String,java.util.Collection<BranchingTree>> processNodeOccurences)
pathes
- the pathes, with which to synchronizeprocessNodeOccurences
- a mapping from Node-IDs of all ProcessNodes,
that occur in one of the pathes to a Collection of BranchingTrees, that
represent the node with the given ID.protected abstract java.util.Map<java.lang.String,java.util.Collection<BranchingTree>> processNodeOccurenceMap()
public abstract BranchingTree eraseFirstChoreographyActivity()
public abstract java.util.Collection<ProcessNode> nextRealizedNodes(java.util.Map<java.lang.String,java.util.Map<java.lang.String,ProcessNode>> realizedNodes, java.lang.String participant)
realizedNodes
- a mapping from choreography-node-id to a mapping from
participant-name to a colaboration-nodeparticipant
- the name of the participant, whom should be paid attention toprotected boolean containsKey(java.util.Map<java.lang.String,java.util.Map<java.lang.String,ProcessNode>> map, java.lang.String key1, java.lang.String key2)
map
- the map, that is to be checked for containing the keyskey1
- the first-level keykey2
- the second-level keypublic abstract boolean noPathesContainNonEmptyStartEvent()
public abstract boolean allAlternativesContainNonEmptyNonEndEventOrInvolve(java.lang.String participant)
public abstract boolean containsOnIndirectWay(ProcessNode node)
node
- the node, whichs occurence is to be checkedpublic abstract BranchingTree eraseFirstNode()
public abstract java.util.Collection<java.lang.String> getParticipants()
public abstract java.util.Collection<ProcessNode> parallelGatewaysBeforeFirstParticipationOf(java.util.Collection<java.lang.String> participants)
participants
- a set of participant namespublic abstract boolean allParallelPathesSynchronizeBefore(ProcessNode node)
node
- the node at which to stop looking for synchronizationpublic abstract boolean synchronizesWithAllBeforeAndKeepsSynchronized(java.util.Collection<BranchingTree> branches, java.util.Map<java.lang.String,java.util.Collection<BranchingTree>> nodeOccurences, ProcessNode before)
branches
- the collection of branches, with wich it should synchronizenodeOccurences
- a mapping from ProcessNode-IDs to a Collection of
BranchingTree-nodes, that contain the ProcessNode with this IDbefore
- the node, at which to stop the search for synchronization (by failing)public abstract boolean contains(BranchingTree tree)
public abstract ProcessNode createInstantiatingGateways(java.lang.String forParticipant, BPMNModel inModel, java.util.Map<java.lang.String,java.util.Map<java.lang.String,StartEvent>> startEvents, java.util.Map<java.lang.String,java.util.Map<java.lang.String,ProcessNode>> firstNode, java.util.Map<java.lang.String,Pool> pools)
forParticipant
- the name of the participant, for whom and in whose
poolto generate instantiating gateways and StartEventsinModel
- the model, in which to generate these nodesstartEvents
- maps the IDs of nodes of the choreography-diagram, that
this tree represents, to a map, that maps the name of a participant to
a StartEvent, that was created for the node with the given ID. When new
StartEvents are generated, they will be recorded in this map.firstNode
- maps the IDs of nodes of the choreography-diagram, that
this tree represents, to a map, that maps the name of a participant to
the first ProcessNode, that is involved in enforcing the choreography-node
with the given ID.pools
- maps the name of a participant to that participant´s poolpublic abstract java.util.Set<ProcessNode> firstNodesOf(java.lang.String participant)
public abstract java.util.Collection<EventBasedGateway> getAllEventBasedGateways()
public abstract boolean allAlternativesContainMessageReceive()
protected boolean isReceive()