本文整理汇总了Java中org.apache.taverna.scufl2.api.core.Workflow.equals方法的典型用法代码示例。如果您正苦于以下问题:Java Workflow.equals方法的具体用法?Java Workflow.equals怎么用?Java Workflow.equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.taverna.scufl2.api.core.Workflow
的用法示例。
在下文中一共展示了Workflow.equals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitBlockingControlLink
import org.apache.taverna.scufl2.api.core.Workflow; //导入方法依赖的package包/类
@Override
public void visitBlockingControlLink(BlockingControlLink bean) {
// Also checks from Child
Workflow parent = bean.getParent();
Processor block = bean.getBlock();
Processor untilFinished = bean.getUntilFinished();
// Check the block and untilFinished processors are in the same workflow
if (block != null) {
Workflow blockParent = block.getParent();
if ((parent == null) || !parent.equals(blockParent))
listener.outOfScopeValue(bean, "block", block);
}
if (untilFinished != null) {
Workflow untilFinishedParent = untilFinished.getParent();
if ((parent == null) || !parent.equals(untilFinishedParent))
listener.outOfScopeValue(bean, "untilFinished", untilFinished);
}
// Check the block and untilFinished processors are specified
if (checkComplete) {
if (block == null)
listener.nullField(bean, "block");
if (untilFinished == null)
listener.nullField(bean, "untilFinished");
}
}
示例2: visitDataLink
import org.apache.taverna.scufl2.api.core.Workflow; //导入方法依赖的package包/类
@Override
public void visitDataLink(DataLink bean) {
ReceiverPort sendsTo = bean.getSendsTo();
SenderPort receivesFrom = bean.getReceivesFrom();
Workflow parent = bean.getParent();
if (sendsTo != null) {
Workflow sendsToWorkflow = findAncestral((Child<?>) sendsTo,
Workflow.class);
if ((parent == null) || !parent.equals(sendsToWorkflow))
listener.outOfScopeValue(bean, "sendsTo", sendsTo);
}
if (receivesFrom != null) {
Workflow receivesFromWorkflow = findAncestral((Child<?>) receivesFrom,
Workflow.class);
if ((parent == null) || !parent.equals(receivesFromWorkflow))
listener.outOfScopeValue(bean, "receivesFrom", receivesFrom);
}
Integer mergePosition = bean.getMergePosition();
if (mergePosition != null && mergePosition < 0)
listener.negativeValue(bean, "mergePosition", mergePosition);
// How to check mergePosition
if (checkComplete) {
if (sendsTo == null)
listener.nullField(bean, "sendsTo");
if (receivesFrom == null)
listener.nullField(bean, "receivesFrom");
}
}
示例3: updateWorkflowTree
import org.apache.taverna.scufl2.api.core.Workflow; //导入方法依赖的package包/类
/**
* Gets called when the current workflow is edited, or when a parent
* workflow of a nested workflow is edited due to saved changes in the
* nested workflow (which is the current workflow).
*/
public void updateWorkflowTree(Workflow df) {
// Create the new tree from the updated workflow
JTree newTree = createTreeFromWorkflow(df);
// Get the old workflow tree
JTree oldTree = openedWorkflowsTrees.get(df);
// Update the tree in the list of opened workflow trees
openedWorkflowsTrees.put(df, newTree);
/*
* Update the new tree's expansion state based on the old tree i.e. all
* nodes in the old tree that have been expanded/collapsed should also
* be expanded/collapsed in the new tree (unless an expanded node has
* been removed)
*/
copyExpansionState(oldTree, (DefaultMutableTreeNode) oldTree.getModel()
.getRoot(), newTree, (DefaultMutableTreeNode) newTree
.getModel().getRoot());
/*
* Get the current workflow from FileManager.
*
* If current workflow is different from the workflow df passed through
* this method then this means that the current workflow is the nested
* workflow (whose parent is workflow df) and that the nested workflow
* has been previously edited and then saved which triggered the update
* on the parent workflow df.
*
* In this case, we should just update the parent workflow tree but keep
* the nested workflow as the current workflow. On the other hand, if
* the current workflow is the same as workflow df then this is just an
* update to the current workflow so we have to update and redraw the
* workflow tree.
*/
if (df.equals(selectionManager.getSelectedWorkflow())) {
// this was an update on the current workflow
// Update the current workflow
workflow = df; // although they are the same anyway
// Set the current tree to the new tree
assignWfTree(newTree);
// Repaint the scroll pane containing the tree
scrollPane.setViewportView(wfTree);
// Select the node(s) that should be selected (do this after
// assigning the tree to the scroll pane)
setSelectedNodes(wfTree, workflow);
scrollPane.revalidate();
scrollPane.repaint();
} else {
/*
* just update the parent tree (already done above) but do not
* switch the trees. Do not revalidate/repaint as we are not
* switching to the new tree but keep showing the nested wf that has
* not changed.
*/
}
}