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


Java NestedDataflow类代码示例

本文整理汇总了Java中org.apache.taverna.workflowmodel.processor.activity.NestedDataflow的典型用法代码示例。如果您正苦于以下问题:Java NestedDataflow类的具体用法?Java NestedDataflow怎么用?Java NestedDataflow使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


NestedDataflow类属于org.apache.taverna.workflowmodel.processor.activity包,在下文中一共展示了NestedDataflow类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: rememberSubworkflows

import org.apache.taverna.workflowmodel.processor.activity.NestedDataflow; //导入依赖的package包/类
void rememberSubworkflows(Processor p, CopiedProcessor copy) {
	for (Activity a : p.getActivity(sm.getSelectedProfile()))
		if (a instanceof NestedDataflow) {
			NestedDataflow da = (NestedDataflow) a;
			Workflow df = da.getNestedDataflow();
			if (!copy.requiredSubworkflows.containsKey(df.getIdentifier())) {
				copy.requiredSubworkflows.put(df.getIdentifier(),
						DataflowXMLSerializer.getInstance()
								.serializeDataflow(df));
				for (Processor sp : df.getProcessors())
					rememberSubworkflows(sp, copy);
			}
		}
}
 
开发者ID:apache,项目名称:incubator-taverna-plugin-component,代码行数:15,代码来源:ComponentCreatorSupport.java

示例2: doTypeCheck

import org.apache.taverna.workflowmodel.processor.activity.NestedDataflow; //导入依赖的package包/类
/**
 * When called this method configures input port filters and the
 * crystalizer, pushing cardinality information into outgoing datalinks.
 * 
 * @return true if the typecheck was successful or false if the check failed
 *         because there were preconditions missing such as unsatisfied
 *         input types
 * @throws IterationTypeMismatchException
 *             if the typing occured but didn't match because of an
 *             iteration mismatch
 * @throws InvalidDataflowException
 *             if the entity depended on a dataflow that was not valid
 */
@Override
public boolean doTypeCheck() throws IterationTypeMismatchException,
		InvalidDataflowException {
	// Check for any nested dataflows, they should all be valid
	for (Activity<?> activity : getActivityList())
		if (activity instanceof NestedDataflow) {
			NestedDataflow nestedDataflowActivity = (NestedDataflow) activity;
			Dataflow nestedDataflow = nestedDataflowActivity
					.getNestedDataflow();
			DataflowValidationReport validity = nestedDataflow
					.checkValidity();
			if (!validity.isValid())
				throw new InvalidDataflowException(nestedDataflow, validity);
		}

	/*
	 * Check whether all our input ports have inbound links
	 */

	Map<String, Integer> inputDepths = new HashMap<>();
	for (ProcessorInputPortImpl input : inputPorts) {
		if (input.getIncomingLink() == null)
			return false;
		if (input.getIncomingLink().getResolvedDepth() == -1)
			/*
			 * Incoming link hasn't been resolved yet, can't do this
			 * processor at the moment
			 */
			return false;

		// Get the conceptual resolved depth of the datalink
		inputDepths.put(input.getName(), input.getIncomingLink()
				.getResolvedDepth());
		/*
		 * Configure the filter with the finest grained item from the link
		 * source
		 */
		input.setFilterDepth(input.getIncomingLink().getSource()
				.getGranularDepth());
	}

	/*
	 * Got here so we have all the inputs, now test whether the iteration
	 * strategy typechecks correctly
	 */

	try {
		this.resultWrappingDepth = iterationStack
				.getIterationDepth(inputDepths);
		for (BasicEventForwardingOutputPort output : outputPorts)
			for (DatalinkImpl outgoingLink : output.outgoingLinks)
				// Set the resolved depth on each output edge
				outgoingLink.setResolvedDepth(this.resultWrappingDepth
						+ output.getDepth());
	} catch (MissingIterationInputException e) {
		/*
		 * This should never happen as we only get here if we've already
		 * checked that all the inputs have been provided. If it does happen
		 * we've got some deeper issues.
		 */
		logger.error(e);
		return false;
	}

	// If we get to here everything has been configured appropriately
	return true;
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:81,代码来源:ProcessorImpl.java

示例3: containsNestedWorkflow

import org.apache.taverna.workflowmodel.processor.activity.NestedDataflow; //导入依赖的package包/类
/**
 * Returns true if processor contains a nested workflow.
 */
public static boolean containsNestedWorkflow(Processor processor) {
	List<?> activities = processor.getActivityList();
	return !activities.isEmpty()
			&& activities.get(0) instanceof NestedDataflow;
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:9,代码来源:Tools.java

示例4: getNestedWorkflow

import org.apache.taverna.workflowmodel.processor.activity.NestedDataflow; //导入依赖的package包/类
/**
 * Get the workflow that is nested inside. Only call this if
 * {@link #containsNestedWorkflow()} returns true.
 */
private static Dataflow getNestedWorkflow(Processor processor) {
	return ((NestedDataflow) processor.getActivityList().get(0))
			.getNestedDataflow();
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:9,代码来源:Tools.java


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