Class NESTWorkflowModifierImpl
java.lang.Object
de.uni_trier.wi2.procake.data.object.nest.utils.impl.NESTUtils<G>
de.uni_trier.wi2.procake.data.object.nest.utils.impl.NESTGraphModifierImpl<G>
de.uni_trier.wi2.procake.data.object.nest.utils.impl.NESTAbstractWorkflowModifierImpl<NESTWorkflowObject>
de.uni_trier.wi2.procake.data.object.nest.utils.impl.NESTWorkflowModifierImpl
- All Implemented Interfaces:
NESTAbstractWorkflowModifier
,NESTGraphModifier
,NESTWorkflowModifier
public class NESTWorkflowModifierImpl
extends NESTAbstractWorkflowModifierImpl<NESTWorkflowObject>
implements NESTWorkflowModifier
Definition of the basic nest graph modifier. Refer to the corresponding Interface
NESTWorkflowModifier
for more information.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Nested classes/interfaces inherited from interface de.uni_trier.wi2.procake.data.object.nest.utils.NESTWorkflowModifier
NESTWorkflowModifier.NESTControlflowNodePair
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
Fields inherited from class de.uni_trier.wi2.procake.data.object.nest.utils.impl.NESTAbstractWorkflowModifierImpl
DEFAULT_CONSTRAINT_EDGE_CLASS_NAME, DEFAULT_CONTROLFLOW_EDGE_CLASS_NAME, DEFAULT_DATA_NODE_CLASS_NAME, DEFAULT_DATAFLOW_EDGE_CLASS_NAME, DEFAULT_PART_OF_EDGE_CLASS_NAME, DEFAULT_SUB_WORKFLOW_NODE_CLASS_NAME, DEFAULT_TASK_NODE_CLASS_NAME, DEFAULT_WORKFLOW_NODE_CLASS_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
boolean
insertBlockSequenceNode
(NESTSequenceNodeObject newSequenceNode, NESTSequenceNodeObject preNode, NESTSequenceNodeObject succNode, DataObject controlflowEdgeSemanticDescriptor, DataObject partOfEdgeSemanticDescriptor) Inserts a given node between the given predecessor/ successor node in the related nest graph including all linking controlflow edges.insertNewAndEndNode
(DataObject semanticDescriptor) Creates a new and join node.insertNewAndSequence
(DataObject semDescrStart, DataObject semDescrEnd) Inserts a new AND (parallel execution) sequence into the graph.insertNewAndStartNode
(DataObject semanticDescriptor) Creates a new and split node.insertNewControlflowNodePair
(NESTControlflowNodeObject startNode, NESTControlflowNodeObject endNode) Inserts a new controlflow block into the NEST graph by using the given parameters.<t extends NESTEdgeObject>
tinsertNewEdge
(NESTNodeObject pre, NESTNodeObject post, String edgeClassName, DataObject semanticDescriptor) Creates a new edge of the given class with a unique id and inserts it in the nest graph between the given nodes.insertNewLoopEndNode
(DataObject semanticDescriptor) Creates a new loop split node.insertNewLoopSequence
(DataObject semDescrStart, DataObject semDescrEnd) Inserts a new LOOP (execution multiple times) sequence into the graph.insertNewLoopStartNode
(DataObject semanticDescriptor) Creates a new loop join node.<t extends NESTNodeObject>
tinsertNewNode
(String nodeClassName, NESTNodeObject parentWorkflowNode, DataObject semanticDescriptor, DataObject partOfEdgeSemanticDescriptor) insertNewOrEndNode
(DataObject semanticDescriptor) Creates a new or join node.insertNewOrSequence
(DataObject semDescrStart, DataObject semDescrEnd) Inserts a new OR sequence into the graph.insertNewOrStartNode
(DataObject semanticDescriptor) Creates a new or split node.insertNewXorEndNode
(DataObject semanticDescriptor) Creates a new xor join node.insertNewXorSequence
(DataObject semDescrStart, DataObject semDescrEnd) Inserts a new XOR (exclusive or) sequence into the graph.insertNewXorStartNode
(DataObject semanticDescriptor) Creates a new xor split node.insertSubgraph
(NESTAbstractWorkflowObject subgraphToInsert, NESTSequenceNodeObject preNode, NESTSequenceNodeObject postNode, NESTNodeObject parentNode) Adds a given sub-graph into a target graph this modifier is responsible for.void
removeControlflowBlock
(NESTControlflowNodeObject controlflowNode) void
removeControlflowBlockNodes
(NESTControlflowNodeObject startControlflowNode) Removes controlflow block nodes identified by the given start controlflow node.void
removeControlflowNodes
(NESTControlflowNodeObject controlflowNode) void
Removes direct links between from start controlflow nodes to end controlfow nodes, if there exists other branches in between.void
Removes unused controlflow blocks, if both branches are empty (no non-empty branch exists).void
setDefaultAndEndNodeClassName
(String defaultAndEndNodeClassName) void
setDefaultAndStartNodeClassName
(String defaultAndStartNodeClassName) void
setDefaultLoopEndNodeClassName
(String defaultLoopEndNodeClassName) void
setDefaultLoopStartNodeClassName
(String defaultLoopStartNodeClassName) void
setDefaultOrEndNodeClassName
(String defaultOrEndNodeClassName) void
setDefaultOrStartNodeClassName
(String defaultOrStartNodeClassName) void
setDefaultXorEndNodeClassName
(String defaultXorEndNodeClassName) void
setDefaultXorStartNodeClassName
(String defaultXorStartNodeClassName) Methods inherited from class de.uni_trier.wi2.procake.data.object.nest.utils.impl.NESTAbstractWorkflowModifierImpl
checkPrePostNodes, dropBlockSequenceNode, dropBlockSequenceNode, getDefaultConstraintEdgeClassName, getDefaultControlflowEdgeClassName, getDefaultDataflowEdgeClassName, getDefaultDataNodeClassName, getDefaultPartOfEdgeClassName, getDefaultSubWorkflowNodeClassName, getDefaultTaskNodeClassName, getDefaultWorkflowNodeClassName, insertNewConstraintEdge, insertNewControlflowEdge, insertNewDataflowEdge, insertNewDataNode, insertNewDataNode, insertNewNode, insertNewPartOfEdge, insertNewSubWorkflowNode, insertNewTaskNode, insertNewTaskNode, insertNewWorkflowNode, insertNewWorkflowNode, insertSubgraphEdges, removeControlflowEdge, removeDataflowEdge, removeDataNode, removeSubgraph, removeSubWorkflowNode, removeTaskNode, removeUnproductiveTasks, removeUnusedDataObjects, setDefaultConstraintEdgeClassName, setDefaultControlflowEdgeClassName, setDefaultDataflowEdgeClassName, setDefaultDataNodeClassName, setDefaultPartOfEdgeClassName, setDefaultSubWorkflowNodeClassName, setDefaultTaskNodeClassName, setDefaultWorkflowNodeClassName, validateClassName
Methods inherited from class de.uni_trier.wi2.procake.data.object.nest.utils.impl.NESTGraphModifierImpl
checkAllowedGraphClasses, extractPartialGraph, removeEdge, removeNode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.uni_trier.wi2.procake.data.object.nest.utils.NESTAbstractWorkflowModifier
dropBlockSequenceNode, dropBlockSequenceNode, getDefaultConstraintEdgeClassName, getDefaultControlflowEdgeClassName, getDefaultDataflowEdgeClassName, getDefaultDataNodeClassName, getDefaultPartOfEdgeClassName, getDefaultSubWorkflowNodeClassName, getDefaultTaskNodeClassName, getDefaultWorkflowNodeClassName, insertNewConstraintEdge, insertNewControlflowEdge, insertNewDataflowEdge, insertNewDataNode, insertNewDataNode, insertNewPartOfEdge, insertNewSubWorkflowNode, insertNewTaskNode, insertNewTaskNode, insertNewWorkflowNode, insertNewWorkflowNode, removeControlflowEdge, removeDataflowEdge, removeDataNode, removeSubgraph, removeSubWorkflowNode, removeTaskNode, removeUnproductiveTasks, removeUnusedDataObjects, setDefaultConstraintEdgeClassName, setDefaultControlflowEdgeClassName, setDefaultDataflowEdgeClassName, setDefaultDataNodeClassName, setDefaultPartOfEdgeClassName, setDefaultSubWorkflowNodeClassName, setDefaultTaskNodeClassName, setDefaultWorkflowNodeClassName
Methods inherited from interface de.uni_trier.wi2.procake.data.object.nest.utils.NESTGraphModifier
extractPartialGraph, insertNewNode, removeEdge, removeNode
-
Field Details
-
DEFAULT_CONTROLFLOW_NODE_CLASS_NAME
-
DEFAULT_AND_START_NODE_CLASS_NAME
-
DEFAULT_AND_END_NODE_CLASS_NAME
-
DEFAULT_OR_START_NODE_CLASS_NAME
-
DEFAULT_OR_END_NODE_CLASS_NAME
-
DEFAULT_XOR_START_NODE_CLASS_NAME
-
DEFAULT_XOR_END_NODE_CLASS_NAME
-
DEFAULT_LOOP_START_NODE_CLASS_NAME
-
DEFAULT_LOOP_END_NODE_CLASS_NAME
-
-
Constructor Details
-
NESTWorkflowModifierImpl
-
-
Method Details
-
getDefaultAndStartNodeClassName
- Specified by:
getDefaultAndStartNodeClassName
in interfaceNESTWorkflowModifier
-
setDefaultAndStartNodeClassName
- Specified by:
setDefaultAndStartNodeClassName
in interfaceNESTWorkflowModifier
-
getDefaultAndEndNodeClassName
- Specified by:
getDefaultAndEndNodeClassName
in interfaceNESTWorkflowModifier
-
setDefaultAndEndNodeClassName
- Specified by:
setDefaultAndEndNodeClassName
in interfaceNESTWorkflowModifier
-
getDefaultOrStartNodeClassName
- Specified by:
getDefaultOrStartNodeClassName
in interfaceNESTWorkflowModifier
-
setDefaultOrStartNodeClassName
- Specified by:
setDefaultOrStartNodeClassName
in interfaceNESTWorkflowModifier
-
getDefaultOrEndNodeClassName
- Specified by:
getDefaultOrEndNodeClassName
in interfaceNESTWorkflowModifier
-
setDefaultOrEndNodeClassName
- Specified by:
setDefaultOrEndNodeClassName
in interfaceNESTWorkflowModifier
-
getDefaultXorStartNodeClassName
- Specified by:
getDefaultXorStartNodeClassName
in interfaceNESTWorkflowModifier
-
setDefaultXorStartNodeClassName
- Specified by:
setDefaultXorStartNodeClassName
in interfaceNESTWorkflowModifier
-
getDefaultXorEndNodeClassName
- Specified by:
getDefaultXorEndNodeClassName
in interfaceNESTWorkflowModifier
-
setDefaultXorEndNodeClassName
- Specified by:
setDefaultXorEndNodeClassName
in interfaceNESTWorkflowModifier
-
getDefaultLoopStartNodeClassName
- Specified by:
getDefaultLoopStartNodeClassName
in interfaceNESTWorkflowModifier
-
setDefaultLoopStartNodeClassName
- Specified by:
setDefaultLoopStartNodeClassName
in interfaceNESTWorkflowModifier
-
getDefaultLoopEndNodeClassName
- Specified by:
getDefaultLoopEndNodeClassName
in interfaceNESTWorkflowModifier
-
setDefaultLoopEndNodeClassName
- Specified by:
setDefaultLoopEndNodeClassName
in interfaceNESTWorkflowModifier
-
insertNewNode
public <t extends NESTNodeObject> t insertNewNode(String nodeClassName, NESTNodeObject parentWorkflowNode, DataObject semanticDescriptor, DataObject partOfEdgeSemanticDescriptor) - Specified by:
insertNewNode
in interfaceNESTAbstractWorkflowModifier
- Overrides:
insertNewNode
in classNESTAbstractWorkflowModifierImpl<NESTWorkflowObject>
- Parameters:
nodeClassName
- StringparentWorkflowNode
- NESTNodeObjectsemanticDescriptor
- DataObject- Returns:
- NESTNodeObject
-
insertNewEdge
public <t extends NESTEdgeObject> t insertNewEdge(NESTNodeObject pre, NESTNodeObject post, String edgeClassName, DataObject semanticDescriptor) Creates a new edge of the given class with a unique id and inserts it in the nest graph between the given nodes. The constraints for edges in NEST workflow graphs are considered in this method.- Specified by:
insertNewEdge
in interfaceNESTGraphModifier
- Overrides:
insertNewEdge
in classNESTAbstractWorkflowModifierImpl<NESTWorkflowObject>
- Parameters:
pre
- NESTNodeObjectpost
- NESTNodeObjectedgeClassName
- StringsemanticDescriptor
- Semantic Descriptor for edge- Returns:
- NESTEdgeObject
-
insertBlockSequenceNode
public boolean insertBlockSequenceNode(NESTSequenceNodeObject newSequenceNode, NESTSequenceNodeObject preNode, NESTSequenceNodeObject succNode, DataObject controlflowEdgeSemanticDescriptor, DataObject partOfEdgeSemanticDescriptor) Description copied from interface:NESTWorkflowModifier
Inserts a given node between the given predecessor/ successor node in the related nest graph including all linking controlflow edges. If a unique position for the new node is given by one node, the other one can be null.- Specified by:
insertBlockSequenceNode
in interfaceNESTWorkflowModifier
- Parameters:
newSequenceNode
- The new node to be insertedpreNode
- new node is inserted behind this predecessor node in the controlflowsuccNode
- new node is inserted before this successor node in the controlflow- Returns:
- true if operation was successful
-
insertNewAndStartNode
Description copied from interface:NESTWorkflowModifier
Creates a new and split node.- Specified by:
insertNewAndStartNode
in interfaceNESTWorkflowModifier
- Parameters:
semanticDescriptor
- The semantic description of the new node.- Returns:
-
insertNewAndEndNode
Description copied from interface:NESTWorkflowModifier
Creates a new and join node.- Specified by:
insertNewAndEndNode
in interfaceNESTWorkflowModifier
- Parameters:
semanticDescriptor
- The semantic description of the new node.- Returns:
-
insertNewOrStartNode
Description copied from interface:NESTWorkflowModifier
Creates a new or split node.- Specified by:
insertNewOrStartNode
in interfaceNESTWorkflowModifier
- Parameters:
semanticDescriptor
- The semantic description of the new node.- Returns:
-
insertNewOrEndNode
Description copied from interface:NESTWorkflowModifier
Creates a new or join node.- Specified by:
insertNewOrEndNode
in interfaceNESTWorkflowModifier
- Parameters:
semanticDescriptor
- The semantic description of the new node.- Returns:
-
insertNewXorStartNode
Description copied from interface:NESTWorkflowModifier
Creates a new xor split node.- Specified by:
insertNewXorStartNode
in interfaceNESTWorkflowModifier
- Parameters:
semanticDescriptor
- The semantic description of the new node.- Returns:
-
insertNewXorEndNode
Description copied from interface:NESTWorkflowModifier
Creates a new xor join node.- Specified by:
insertNewXorEndNode
in interfaceNESTWorkflowModifier
- Parameters:
semanticDescriptor
- The semantic description of the new node.- Returns:
-
insertNewLoopStartNode
Description copied from interface:NESTWorkflowModifier
Creates a new loop join node.- Specified by:
insertNewLoopStartNode
in interfaceNESTWorkflowModifier
- Parameters:
semanticDescriptor
- The semantic description of the new node.- Returns:
-
insertNewLoopEndNode
Description copied from interface:NESTWorkflowModifier
Creates a new loop split node.- Specified by:
insertNewLoopEndNode
in interfaceNESTWorkflowModifier
- Parameters:
semanticDescriptor
- The semantic description of the new node.- Returns:
-
insertNewXorSequence
public NESTWorkflowModifier.NESTControlflowNodePair insertNewXorSequence(DataObject semDescrStart, DataObject semDescrEnd) Description copied from interface:NESTWorkflowModifier
Inserts a new XOR (exclusive or) sequence into the graph. The sequence is not connected by any edges.- Specified by:
insertNewXorSequence
in interfaceNESTWorkflowModifier
- Parameters:
semDescrStart
- the semantic descriptor of the split node (start node)semDescrEnd
- the semantic descriptor of the join node (end node)- Returns:
- a controlflow node pair containing the added sequence nodes
-
insertNewOrSequence
public NESTWorkflowModifier.NESTControlflowNodePair insertNewOrSequence(DataObject semDescrStart, DataObject semDescrEnd) Description copied from interface:NESTWorkflowModifier
Inserts a new OR sequence into the graph. The sequence is not connected by any edges.- Specified by:
insertNewOrSequence
in interfaceNESTWorkflowModifier
- Parameters:
semDescrStart
- the semantic descriptor of the split node (start node)semDescrEnd
- the semantic descriptor of the join node (end node)- Returns:
- a controlflow node pair containing the added sequence nodes
-
insertNewAndSequence
public NESTWorkflowModifier.NESTControlflowNodePair insertNewAndSequence(DataObject semDescrStart, DataObject semDescrEnd) Description copied from interface:NESTWorkflowModifier
Inserts a new AND (parallel execution) sequence into the graph. The sequence is not connected by any edges.- Specified by:
insertNewAndSequence
in interfaceNESTWorkflowModifier
- Parameters:
semDescrStart
- the semantic descriptor of the split node (start node)semDescrEnd
- the semantic descriptor of the join node (end node)- Returns:
- a controlflow node pair containing the added sequence nodes
-
insertNewLoopSequence
public NESTWorkflowModifier.NESTControlflowNodePair insertNewLoopSequence(DataObject semDescrStart, DataObject semDescrEnd) Description copied from interface:NESTWorkflowModifier
Inserts a new LOOP (execution multiple times) sequence into the graph. The sequence is not connected by any edges. Please note, in loops the start node is the join node and the end node is the split node!- Specified by:
insertNewLoopSequence
in interfaceNESTWorkflowModifier
- Parameters:
semDescrStart
- the semantic descriptor of the split node (end node)semDescrEnd
- the semantic descriptor of the join node (start node)- Returns:
- a controlflow node pair containing the added sequence nodes
-
insertNewControlflowNodePair
public NESTWorkflowModifier.NESTControlflowNodePair insertNewControlflowNodePair(NESTControlflowNodeObject startNode, NESTControlflowNodeObject endNode) Description copied from interface:NESTWorkflowModifier
Inserts a new controlflow block into the NEST graph by using the given parameters.- Specified by:
insertNewControlflowNodePair
in interfaceNESTWorkflowModifier
- Parameters:
startNode
- start nodeendNode
- end node- Returns:
- the
NESTWorkflowModifier.NESTControlflowNodePair
that was inserted
-
insertSubgraph
public Map<String,String> insertSubgraph(NESTAbstractWorkflowObject subgraphToInsert, NESTSequenceNodeObject preNode, NESTSequenceNodeObject postNode, NESTNodeObject parentNode) Description copied from interface:NESTAbstractWorkflowModifier
Adds a given sub-graph into a target graph this modifier is responsible for. A parent node (of the target graph) can be set. Otherwise, the workflow node of the target workflow is used as parent node The pre node and the post node are nodes that will be connected to the start node or the end node, respectively. All nodes and edges of the sub-graph will be copied into the target graph. Consequently, the ids will be altered! A map that contains the old-to-new-mapping-ID's is returned by this method.- Specified by:
insertSubgraph
in interfaceNESTAbstractWorkflowModifier
- Overrides:
insertSubgraph
in classNESTAbstractWorkflowModifierImpl<NESTWorkflowObject>
- Parameters:
subgraphToInsert
- the sub-graph that should be added to the target graphpreNode
- node of the target graph; this node will be connected to the start node of the sub-graph with a control-flow edge. If preNode is null, no control-flow edge is inserted.postNode
- node of the target graph; the end node of the sub-graph will be connected to this node with a control-flow edge. If postNode is null, no control-flow edge is inserted.parentNode
- workflow node or sub-workflow node of the target graph; all nodes that were previously connected to the workflow node of the sub-graph will be linked to the parent node via part-of edges. If parentNode is null, the workflow node of the target workflow is used as parent node.- Returns:
- a map that contains the old-to-new-mapping-ID's
-
removeControlflowBlock
- Specified by:
removeControlflowBlock
in interfaceNESTWorkflowModifier
-
removeUnusedControlflowBlocks
public void removeUnusedControlflowBlocks()Description copied from interface:NESTWorkflowModifier
Removes unused controlflow blocks, if both branches are empty (no non-empty branch exists). Further removes AND blocks, if they only contain a single branch (2nd branch is empty).- Specified by:
removeUnusedControlflowBlocks
in interfaceNESTWorkflowModifier
-
removeEmptyBlockLinks
public void removeEmptyBlockLinks()Description copied from interface:NESTWorkflowModifier
Removes direct links between from start controlflow nodes to end controlfow nodes, if there exists other branches in between.- Specified by:
removeEmptyBlockLinks
in interfaceNESTWorkflowModifier
-
removeControlflowNodes
- Specified by:
removeControlflowNodes
in interfaceNESTWorkflowModifier
-
removeControlflowBlockNodes
Description copied from interface:NESTWorkflowModifier
Removes controlflow block nodes identified by the given start controlflow node. The corresponding end controlflow node will be removed too, including edges that link directly from start controlflow node to end controlfow node- Specified by:
removeControlflowBlockNodes
in interfaceNESTWorkflowModifier
-
initializeDefaultClassNames
- Overrides:
initializeDefaultClassNames
in classNESTAbstractWorkflowModifierImpl<NESTWorkflowObject>
-