Class NESTAbstractWorkflowModifierImpl<G extends NESTAbstractWorkflowObject>
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<G>
- All Implemented Interfaces:
NESTAbstractWorkflowModifier
,NESTGraphModifier
- Direct Known Subclasses:
NESTWorkflowModifierImpl
public class NESTAbstractWorkflowModifierImpl<G extends NESTAbstractWorkflowObject>
extends NESTGraphModifierImpl<G>
implements NESTAbstractWorkflowModifier
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkPrePostNodes
(NESTAbstractWorkflowObject subgraphToInsert, Map<String, String> oldToNewIDMapping, NESTSequenceNodeObject preNode, NESTSequenceNodeObject postNode) Partial method used for methodinsertSubgraph(NESTAbstractWorkflowObject, NESTSequenceNodeObject, NESTSequenceNodeObject, NESTNodeObject)
and it's submethods to check pre and post nodes.boolean
dropBlockSequenceNode
(NESTNodeObject nodeObject) Removes a sequence node from the nest graph and performs the necessary changes on the part-of and control-flow edges.boolean
Removes a sequence node from the nest graph and performs the necessary changes on the part-of and control-flow edges.protected void
insertNewConstraintEdge
(NESTNodeObject preNode, NESTNodeObject postNode, DataObject semanticDescriptor) Inserts a new constraint edge between the given graph nodes.insertNewControlflowEdge
(NESTSequenceNodeObject preNode, NESTSequenceNodeObject postNode, DataObject semanticDescriptor) Adds a controlflow edge between the given graph nodes.insertNewDataflowEdge
(NESTNodeObject preNode, NESTNodeObject postNode, DataObject semanticDescriptor) Inserts a new dataflow edge between the given graph nodes.insertNewDataNode
(DataObject semanticDescriptor) Creates a new data node within the graph with the given semantic description and links it to the workflow node via part-of edge.insertNewDataNode
(String dataNodeClassName, DataObject semanticDescriptor) Creates a new data node within the graph with the given semantic description and links it to the workflow node via part-of edge.<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.<t extends NESTNodeObject>
tinsertNewNode
(String nodeClassName, DataObject semanticDescriptor) <t extends NESTNodeObject>
tinsertNewNode
(String nodeClassName, NESTNodeObject parentWorkflowNode, DataObject semanticDescriptor, DataObject partOfEdgeSemanticDescriptor) insertNewPartOfEdge
(NESTNodeObject preNode, NESTNodeObject postNode, DataObject semanticDescriptor) Inserts a new part-of edge between the given graph nodes.insertNewSubWorkflowNode
(NESTNodeObject parentWorkflowNode, DataObject semanticDescriptor) Inserts a new subworkflow node in the nest graph.insertNewTaskNode
(DataObject semanticDescriptor) Creates a new task node within the graph with the given semantic description and links it to the workflow node via part-of edge.insertNewTaskNode
(String taskNodeClassName, DataObject semanticDescriptor) Creates a new task node within the graph with the given semantic description and links it to the workflow node via part-of edge.insertNewWorkflowNode
(DataObject semanticDescriptor) Creates a new workflow node within the graph with the given semantic description.insertNewWorkflowNode
(String workflowNodeClassName, DataObject semanticDescriptor) Creates a new workflow node within the graph with the given semantic description.insertSubgraph
(NESTAbstractWorkflowObject subgraphToInsert, NESTSequenceNodeObject preNode, NESTSequenceNodeObject postNode, NESTNodeObject parentNode) Adds a given sub-graph into a target graph this modifier is responsible for.protected void
insertSubgraphEdges
(NESTGraphObject subgraphToInsert, Map<String, String> oldToNewIDMapping, NESTNodeObject parentNode) Partial method used for methodinsertSubgraph(NESTAbstractWorkflowObject, NESTSequenceNodeObject, NESTSequenceNodeObject, NESTNodeObject)
and it's submethods to insert edges from subgraph.void
removeControlflowEdge
(NESTNodeObject preNode, NESTNodeObject postNode) Removes the controlflow-edge between the given graph nodes.void
removeDataflowEdge
(NESTNodeObject preNode, NESTNodeObject postNode) Removes the dataflow-edge between the given graph nodes.boolean
removeDataNode
(NESTDataNodeObject dataNode) Removes a semantic equal node of the given node from the graph.void
removeSubgraph
(NESTWorkflowObject subgraphToRemove) Removes the given subgraph from the parent graph.boolean
removeSubWorkflowNode
(NESTSubWorkflowNodeObject subWorkflowNode) Removes the given node from the graph and adjusts the part-of hierarchy accordingly.boolean
removeTaskNode
(NESTTaskNodeObject taskNode) Removes a semantic equal node of the given node from the graph.void
Removes unproductive task nodes, i.e., tasks that do not have any ingoing or outgoing data-flow edgesvoid
Removes unused data objects i.e.void
setDefaultConstraintEdgeClassName
(String defaultConstraintEdgeClassName) void
setDefaultControlflowEdgeClassName
(String defaultControlflowEdgeClassName) void
setDefaultDataflowEdgeClassName
(String defaultDataflowEdgeClassName) void
setDefaultDataNodeClassName
(String defaultDataNodeClassName) void
setDefaultPartOfEdgeClassName
(String defaultPartOfEdgeClassName) void
setDefaultSubWorkflowNodeClassName
(String defaultSubWorkflowNodeClassName) void
setDefaultTaskNodeClassName
(String defaultTaskNodeClassName) void
setDefaultWorkflowNodeClassName
(String defaultWorkflowNodeClassName) protected void
validateClassName
(String className, DataClass expectedSuperClass) 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.NESTGraphModifier
extractPartialGraph, removeEdge, removeNode
-
Field Details
-
DEFAULT_TASK_NODE_CLASS_NAME
-
DEFAULT_DATA_NODE_CLASS_NAME
-
DEFAULT_WORKFLOW_NODE_CLASS_NAME
-
DEFAULT_SUB_WORKFLOW_NODE_CLASS_NAME
-
DEFAULT_CONTROLFLOW_EDGE_CLASS_NAME
-
DEFAULT_PART_OF_EDGE_CLASS_NAME
-
DEFAULT_DATAFLOW_EDGE_CLASS_NAME
-
DEFAULT_CONSTRAINT_EDGE_CLASS_NAME
-
-
Constructor Details
-
NESTAbstractWorkflowModifierImpl
-
-
Method Details
-
validateClassName
-
getDefaultWorkflowNodeClassName
- Specified by:
getDefaultWorkflowNodeClassName
in interfaceNESTAbstractWorkflowModifier
-
setDefaultWorkflowNodeClassName
- Specified by:
setDefaultWorkflowNodeClassName
in interfaceNESTAbstractWorkflowModifier
-
getDefaultSubWorkflowNodeClassName
- Specified by:
getDefaultSubWorkflowNodeClassName
in interfaceNESTAbstractWorkflowModifier
-
setDefaultSubWorkflowNodeClassName
- Specified by:
setDefaultSubWorkflowNodeClassName
in interfaceNESTAbstractWorkflowModifier
-
getDefaultTaskNodeClassName
- Specified by:
getDefaultTaskNodeClassName
in interfaceNESTAbstractWorkflowModifier
-
setDefaultTaskNodeClassName
- Specified by:
setDefaultTaskNodeClassName
in interfaceNESTAbstractWorkflowModifier
-
getDefaultDataNodeClassName
- Specified by:
getDefaultDataNodeClassName
in interfaceNESTAbstractWorkflowModifier
-
setDefaultDataNodeClassName
- Specified by:
setDefaultDataNodeClassName
in interfaceNESTAbstractWorkflowModifier
-
getDefaultControlflowEdgeClassName
- Specified by:
getDefaultControlflowEdgeClassName
in interfaceNESTAbstractWorkflowModifier
-
setDefaultControlflowEdgeClassName
- Specified by:
setDefaultControlflowEdgeClassName
in interfaceNESTAbstractWorkflowModifier
-
getDefaultPartOfEdgeClassName
- Specified by:
getDefaultPartOfEdgeClassName
in interfaceNESTAbstractWorkflowModifier
-
setDefaultPartOfEdgeClassName
- Specified by:
setDefaultPartOfEdgeClassName
in interfaceNESTAbstractWorkflowModifier
-
getDefaultDataflowEdgeClassName
- Specified by:
getDefaultDataflowEdgeClassName
in interfaceNESTAbstractWorkflowModifier
-
setDefaultDataflowEdgeClassName
- Specified by:
setDefaultDataflowEdgeClassName
in interfaceNESTAbstractWorkflowModifier
-
getDefaultConstraintEdgeClassName
- Specified by:
getDefaultConstraintEdgeClassName
in interfaceNESTAbstractWorkflowModifier
-
setDefaultConstraintEdgeClassName
- Specified by:
setDefaultConstraintEdgeClassName
in interfaceNESTAbstractWorkflowModifier
-
insertNewNode
public <t extends NESTNodeObject> t insertNewNode(String nodeClassName, DataObject semanticDescriptor) - Specified by:
insertNewNode
in interfaceNESTGraphModifier
- Overrides:
insertNewNode
in classNESTGraphModifierImpl<G extends NESTAbstractWorkflowObject>
- Parameters:
nodeClassName
- StringsemanticDescriptor
- DataObject- Returns:
- NESTNodeObject
-
insertNewNode
public <t extends NESTNodeObject> t insertNewNode(String nodeClassName, NESTNodeObject parentWorkflowNode, DataObject semanticDescriptor, DataObject partOfEdgeSemanticDescriptor) - Specified by:
insertNewNode
in interfaceNESTAbstractWorkflowModifier
- 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 classNESTGraphModifierImpl<G extends NESTAbstractWorkflowObject>
- Parameters:
pre
- NESTNodeObjectpost
- NESTNodeObjectedgeClassName
- StringsemanticDescriptor
- Semantic Descriptor for edge- Returns:
- NESTEdgeObject
-
insertNewWorkflowNode
Description copied from interface:NESTAbstractWorkflowModifier
Creates a new workflow node within the graph with the given semantic description.- Specified by:
insertNewWorkflowNode
in interfaceNESTAbstractWorkflowModifier
- Parameters:
semanticDescriptor
- The semantic description of the new node.- Returns:
-
insertNewWorkflowNode
public NESTWorkflowNodeObject insertNewWorkflowNode(String workflowNodeClassName, DataObject semanticDescriptor) Description copied from interface:NESTAbstractWorkflowModifier
Creates a new workflow node within the graph with the given semantic description.- Specified by:
insertNewWorkflowNode
in interfaceNESTAbstractWorkflowModifier
- Parameters:
workflowNodeClassName
- The name of the custom workflow node classsemanticDescriptor
- The semantic description of the new node.- Returns:
-
insertNewTaskNode
Description copied from interface:NESTAbstractWorkflowModifier
Creates a new task node within the graph with the given semantic description and links it to the workflow node via part-of edge.- Specified by:
insertNewTaskNode
in interfaceNESTAbstractWorkflowModifier
- Parameters:
semanticDescriptor
- The semantic description of the new node.- Returns:
-
insertNewTaskNode
public NESTTaskNodeObject insertNewTaskNode(String taskNodeClassName, DataObject semanticDescriptor) Description copied from interface:NESTAbstractWorkflowModifier
Creates a new task node within the graph with the given semantic description and links it to the workflow node via part-of edge.- Specified by:
insertNewTaskNode
in interfaceNESTAbstractWorkflowModifier
- Parameters:
taskNodeClassName
- The name of the custom task node classsemanticDescriptor
- The semantic description of the new node.- Returns:
-
insertNewDataNode
Description copied from interface:NESTAbstractWorkflowModifier
Creates a new data node within the graph with the given semantic description and links it to the workflow node via part-of edge.- Specified by:
insertNewDataNode
in interfaceNESTAbstractWorkflowModifier
- Parameters:
semanticDescriptor
- The semantic description of the new node.- Returns:
-
insertNewDataNode
public NESTDataNodeObject insertNewDataNode(String dataNodeClassName, DataObject semanticDescriptor) Description copied from interface:NESTAbstractWorkflowModifier
Creates a new data node within the graph with the given semantic description and links it to the workflow node via part-of edge.- Specified by:
insertNewDataNode
in interfaceNESTAbstractWorkflowModifier
- Parameters:
dataNodeClassName
- The name of the custom task node classsemanticDescriptor
- The semantic description of the new node.- Returns:
-
removeUnproductiveTasks
public void removeUnproductiveTasks()Description copied from interface:NESTAbstractWorkflowModifier
Removes unproductive task nodes, i.e., tasks that do not have any ingoing or outgoing data-flow edges- Specified by:
removeUnproductiveTasks
in interfaceNESTAbstractWorkflowModifier
-
removeUnusedDataObjects
public void removeUnusedDataObjects()Description copied from interface:NESTAbstractWorkflowModifier
Removes unused data objects i.e. they have no ingoing and outgoing edges.- Specified by:
removeUnusedDataObjects
in interfaceNESTAbstractWorkflowModifier
-
dropBlockSequenceNode
Description copied from interface:NESTAbstractWorkflowModifier
Removes a sequence node from the nest graph and performs the necessary changes on the part-of and control-flow edges.- Specified by:
dropBlockSequenceNode
in interfaceNESTAbstractWorkflowModifier
- Returns:
-
dropBlockSequenceNode
Description copied from interface:NESTAbstractWorkflowModifier
Removes a sequence node from the nest graph and performs the necessary changes on the part-of and control-flow edges.- Specified by:
dropBlockSequenceNode
in interfaceNESTAbstractWorkflowModifier
- Returns:
-
removeSubgraph
Description copied from interface:NESTAbstractWorkflowModifier
Removes the given subgraph from the parent graph.- Specified by:
removeSubgraph
in interfaceNESTAbstractWorkflowModifier
- Parameters:
subgraphToRemove
- the subgraph that should be removed
-
insertNewControlflowEdge
public NESTEdgeObject insertNewControlflowEdge(NESTSequenceNodeObject preNode, NESTSequenceNodeObject postNode, DataObject semanticDescriptor) Description copied from interface:NESTAbstractWorkflowModifier
Adds a controlflow edge between the given graph nodes.- Specified by:
insertNewControlflowEdge
in interfaceNESTAbstractWorkflowModifier
- Parameters:
preNode
- The node on the left (previous) side of the edge.postNode
- The node on the right (next) side of the edge.
-
insertNewDataflowEdge
public NESTEdgeObject insertNewDataflowEdge(NESTNodeObject preNode, NESTNodeObject postNode, DataObject semanticDescriptor) Description copied from interface:NESTAbstractWorkflowModifier
Inserts a new dataflow edge between the given graph nodes.- Specified by:
insertNewDataflowEdge
in interfaceNESTAbstractWorkflowModifier
- Parameters:
preNode
- The node on the left (previous) side of the edge.postNode
- The node on the right (next) side of the edge.
-
insertNewPartOfEdge
public NESTEdgeObject insertNewPartOfEdge(NESTNodeObject preNode, NESTNodeObject postNode, DataObject semanticDescriptor) Description copied from interface:NESTAbstractWorkflowModifier
Inserts a new part-of edge between the given graph nodes.- Specified by:
insertNewPartOfEdge
in interfaceNESTAbstractWorkflowModifier
- Parameters:
preNode
- The node on the left (previous) side of the edge.postNode
- The node on the right (next) side of the edge.
-
insertNewConstraintEdge
public NESTEdgeObject insertNewConstraintEdge(NESTNodeObject preNode, NESTNodeObject postNode, DataObject semanticDescriptor) Description copied from interface:NESTAbstractWorkflowModifier
Inserts a new constraint edge between the given graph nodes.- Specified by:
insertNewConstraintEdge
in interfaceNESTAbstractWorkflowModifier
- Parameters:
preNode
- The node on the left (previous) side of the edge.postNode
- The node on the right (next) side of the edge.
-
insertNewSubWorkflowNode
public NESTSubWorkflowNodeObject insertNewSubWorkflowNode(NESTNodeObject parentWorkflowNode, DataObject semanticDescriptor) Description copied from interface:NESTAbstractWorkflowModifier
Inserts a new subworkflow node in the nest graph. The new node will be linked to the given parent workflow node by a part-of edge. A parent node can be either a workflow or a subworkflow node.- Specified by:
insertNewSubWorkflowNode
in interfaceNESTAbstractWorkflowModifier
- Returns:
-
removeControlflowEdge
Description copied from interface:NESTAbstractWorkflowModifier
Removes the controlflow-edge between the given graph nodes.- Specified by:
removeControlflowEdge
in interfaceNESTAbstractWorkflowModifier
- Parameters:
preNode
- The node on the left (previous) side of the edge.postNode
- The node on the right (next) side of the edge.
-
removeDataflowEdge
Description copied from interface:NESTAbstractWorkflowModifier
Removes the dataflow-edge between the given graph nodes.- Specified by:
removeDataflowEdge
in interfaceNESTAbstractWorkflowModifier
- Parameters:
preNode
- The node on the left (previous) side of the edge.postNode
- The node on the right (next) side of the edge.
-
removeDataNode
Description copied from interface:NESTAbstractWorkflowModifier
Removes a semantic equal node of the given node from the graph.- Specified by:
removeDataNode
in interfaceNESTAbstractWorkflowModifier
- Returns:
-
removeTaskNode
Description copied from interface:NESTAbstractWorkflowModifier
Removes a semantic equal node of the given node from the graph.- Specified by:
removeTaskNode
in interfaceNESTAbstractWorkflowModifier
- Returns:
-
removeSubWorkflowNode
Description copied from interface:NESTAbstractWorkflowModifier
Removes the given node from the graph and adjusts the part-of hierarchy accordingly.- Specified by:
removeSubWorkflowNode
in interfaceNESTAbstractWorkflowModifier
- Returns:
-
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
- 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
-
insertSubgraphEdges
protected void insertSubgraphEdges(NESTGraphObject subgraphToInsert, Map<String, String> oldToNewIDMapping, NESTNodeObject parentNode) Partial method used for methodinsertSubgraph(NESTAbstractWorkflowObject, NESTSequenceNodeObject, NESTSequenceNodeObject, NESTNodeObject)
and it's submethods to insert edges from subgraph.- Parameters:
subgraphToInsert
-oldToNewIDMapping
-parentNode
-
-
checkPrePostNodes
protected void checkPrePostNodes(NESTAbstractWorkflowObject subgraphToInsert, Map<String, String> oldToNewIDMapping, NESTSequenceNodeObject preNode, NESTSequenceNodeObject postNode) Partial method used for methodinsertSubgraph(NESTAbstractWorkflowObject, NESTSequenceNodeObject, NESTSequenceNodeObject, NESTNodeObject)
and it's submethods to check pre and post nodes.- Parameters:
subgraphToInsert
-oldToNewIDMapping
-preNode
-postNode
-
-
initializeDefaultClassNames
-