public abstract class BranchingTree
extends java.lang.Object
Constructor and Description |
---|
BranchingTree(BranchingTree parent) |
BranchingTree(BranchingTree parent,
NodeAdaptor node) |
Modifier and Type | Method and Description |
---|---|
abstract java.util.Collection<NodeAdaptor> |
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 |
allAlternativesContainMultipleChoreographyActivities() |
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(NodeAdaptor 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<NodeAdaptor> 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(NodeAdaptor node)
checks, wheter one of the descendant nodes of this BranchingTree-ndoe
contains node.
|
abstract java.util.Set<NodeAdaptor> |
firstNodesOf(java.lang.String participant)
Collects all the first nodes, that involve the supplied participant.
|
protected java.util.List<java.lang.String> |
getLocalParticipants() |
protected NodeAdaptor |
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
|
abstract boolean |
noAlternativesInvolve(java.lang.String participant)
checks, wheter none of the descendant nodes of this contains a
ChoreographyActivity that involves participant
|
abstract boolean |
noPathesContainTriggeredStartEvent()
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<NodeAdaptor> |
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(NodeAdaptor 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 |
setParent(BranchingTree parent) |
abstract boolean |
synchronizesWithAllBeforeAndKeepsSynchronized(java.util.Collection<BranchingTree> branches,
java.util.Map<java.lang.String,java.util.Collection<BranchingTree>> nodeOccurences,
NodeAdaptor 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(NodeAdaptor 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, NodeAdaptor node)
protected NodeAdaptor getNode()
protected void setParent(BranchingTree parent)
protected BranchingTree getParent()
public abstract boolean contains(NodeAdaptor 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(NodeAdaptor node)
node
- the node, whichs occurences to countpublic abstract java.util.Collection<NodeAdaptor> 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(NodeAdaptor node)
public abstract boolean allPathesContainOneOf(java.util.Collection<NodeAdaptor> 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 boolean noPathesContainTriggeredStartEvent()
public abstract java.util.Collection<java.lang.String> getParticipants()
protected java.util.List<java.lang.String> getLocalParticipants()
public abstract java.util.Collection<NodeAdaptor> parallelGatewaysBeforeFirstParticipationOf(java.util.Collection<java.lang.String> participants)
participants
- a set of participant namespublic abstract boolean allParallelPathesSynchronizeBefore(NodeAdaptor 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, NodeAdaptor 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 java.util.Set<NodeAdaptor> firstNodesOf(java.lang.String participant)