当前位置: 首页>>代码示例>>Java>>正文


Java Workflow.equals方法代码示例

本文整理汇总了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");
	}
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:29,代码来源:CorrectnessVisitor.java

示例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");
	}
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:33,代码来源:CorrectnessVisitor.java

示例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.
		 */
	}
}
 
开发者ID:apache,项目名称:incubator-taverna-workbench,代码行数:68,代码来源:WorkflowExplorer.java


注:本文中的org.apache.taverna.scufl2.api.core.Workflow.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。