當前位置: 首頁>>代碼示例>>Java>>正文


Java ActivityPort類代碼示例

本文整理匯總了Java中org.apache.taverna.scufl2.api.port.ActivityPort的典型用法代碼示例。如果您正苦於以下問題:Java ActivityPort類的具體用法?Java ActivityPort怎麽用?Java ActivityPort使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ActivityPort類屬於org.apache.taverna.scufl2.api.port包,在下文中一共展示了ActivityPort類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: processorPortBindingForPortInternal

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
protected ProcessorPortBinding<?, ?> processorPortBindingForPortInternal(
		Port port, Profile profile) {
	List<ProcessorBinding> processorBindings;
	if (port instanceof ProcessorPort) {
		ProcessorPort processorPort = (ProcessorPort) port;
		processorBindings = processorBindingsForProcessor(
				processorPort.getParent(), profile);
	} else if (port instanceof ActivityPort) {
		ActivityPort activityPort = (ActivityPort) port;
		processorBindings = processorBindingsToActivity(activityPort
				.getParent());
	} else
		throw new IllegalArgumentException(
				"Port must be a ProcessorPort or ActivityPort");
	for (ProcessorBinding procBinding : processorBindings) {
		ProcessorPortBinding<?, ?> portBinding = processorPortBindingInternalInBinding(
				port, procBinding);
		if (portBinding != null)
			return portBinding;
	}
	return null;
}
 
開發者ID:apache,項目名稱:incubator-taverna-language,代碼行數:23,代碼來源:Scufl2Tools.java

示例2: processorPortBindingInternalInBinding

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
protected ProcessorPortBinding<?, ?> processorPortBindingInternalInBinding(
		Port port, ProcessorBinding procBinding) {
	Set<? extends ProcessorPortBinding<?, ?>> portBindings;
	if (port instanceof InputPort)
		portBindings = procBinding.getInputPortBindings();
	else
		portBindings = procBinding.getOutputPortBindings();

	for (ProcessorPortBinding<?, ?> portBinding : portBindings) {
		if (port instanceof ProcessorPort
				&& portBinding.getBoundProcessorPort().equals(port))
			return portBinding;
		if (port instanceof ActivityPort
				&& portBinding.getBoundActivityPort().equals(port))
			return portBinding;
	}
	return null;
}
 
開發者ID:apache,項目名稱:incubator-taverna-language,代碼行數:19,代碼來源:Scufl2Tools.java

示例3: portsChanged

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
private boolean portsChanged(List<ActivityPortConfiguration> portDefinitions, int ports) {
	int checkedPorts = 0;
	for (ActivityPortConfiguration portDefinition : portDefinitions) {
		String portName = portDefinition.getName();
		int portDepth = portDefinition.getDepth();
		ActivityPort activityPort = portDefinition.getActivityPort();
		if (activityPort == null)
			// new port added
			return true;
		if (!activityPort.getName().equals(portName))
			// port name changed
			return true;
		if (!activityPort.getDepth().equals(portDepth))
			// port depth changed
			return true;
		checkedPorts++;
	}
	if (checkedPorts < ports)
		// ports deleted
		return true;
	return false;
}
 
開發者ID:apache,項目名稱:incubator-taverna-workbench,代碼行數:23,代碼來源:ActivityConfigurationPanel.java

示例4: changeActivityPortName

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
private void changeActivityPortName(WorkflowPort workflowPort,
		String oldName, String newName, Workflow workflow,
		WorkflowBundle workflowBundle, Activity activity, Configuration c) {
	JsonNode nested = c.getJson().get("nestedWorkflow");
	Workflow nestedWorkflow = workflowBundle.getWorkflows().getByName(
			nested.asText());
	if (nestedWorkflow != workflow)
		return;

	ActivityPort activityPort;
	if (workflowPort instanceof InputPort) {
		activityPort = activity.getInputPorts().getByName(oldName);
		changeProcessorInputPortName(oldName, newName, activity,
				activityPort);
	} else {
		activityPort = activity.getOutputPorts().getByName(oldName);
		changeProcessorOutputPortName(oldName, newName, activity,
				activityPort);
	}
	activityPort.setName(newName);
}
 
開發者ID:apache,項目名稱:incubator-taverna-workbench,代碼行數:22,代碼來源:RenameEdit.java

示例5: checkOneConfiguration

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
private void checkOneConfiguration(InputWorkflowPort workflowPort,
		Integer depth, Workflow workflow, WorkflowBundle workflowBundle,
		Activity activity, Configuration c) {
	JsonNode nested = c.getJson().get("nestedWorkflow");
	Workflow nestedWorkflow = workflowBundle.getWorkflows().getByName(
			nested.asText());
	if (nestedWorkflow != workflow)
		return;

	ActivityPort activityPort = activity.getInputPorts().getByName(
			workflowPort.getName());
	activityPort.setDepth(depth);
	for (ProcessorBinding binding : scufl2Tools
			.processorBindingsToActivity(activity))
		for (ProcessorInputPortBinding portBinding : binding
				.getInputPortBindings())
			if (portBinding.getBoundActivityPort() == activityPort) {
				InputProcessorPort processorPort = portBinding
						.getBoundProcessorPort();
				processorPort.setDepth(depth);
			}
}
 
開發者ID:apache,項目名稱:incubator-taverna-workbench,代碼行數:23,代碼來源:ChangeDepthEdit.java

示例6: portDefinitionFor

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
public JsonNode portDefinitionFor(ActivityPort activityPort, Profile profile)
		throws PropertyException {
	Configuration actConfig = configurationFor(activityPort.getParent(),
			profile);

	JsonNode portDef = actConfig.getJson().get("portDefinition");
	if (portDef == null)
		return null;

	URI portPath = uriTools.relativeUriForBean(activityPort,
			activityPort.getParent());
	// e.g. "in/input1" or "out/output2"
	return portDef.get(portPath.toString());
}
 
開發者ID:apache,項目名稱:incubator-taverna-language,代碼行數:15,代碼來源:Scufl2Tools.java

示例7: canHandle

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
@Override
public boolean canHandle(Object selection) {
	bundle = fileManager.getCurrentDataflow();
	return fileManager.getDataflowSource(bundle) instanceof Version.ID
			&& selection instanceof AbstractNamed
			&& !(selection instanceof Activity || selection instanceof ActivityPort);
}
 
開發者ID:apache,項目名稱:incubator-taverna-plugin-component,代碼行數:8,代碼來源:SemanticAnnotationContextualViewFactory.java

示例8: isEnabled

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
@Override
public boolean isEnabled() {
	Object selection = getContextualSelection().getSelection();
	Object dataflowSource = fileManager.getDataflowSource(fileManager
			.getCurrentDataflow());
	if (dataflowSource instanceof Version.ID)
		return (selection instanceof AbstractNamed)
				&& !(selection instanceof Activity || selection instanceof ActivityPort);
	return false;
}
 
開發者ID:apache,項目名稱:incubator-taverna-plugin-component,代碼行數:11,代碼來源:AnnotateSemanticsMenuAction.java

示例9: changeProcessorInputPortName

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
private void changeProcessorInputPortName(String oldName, String newName,
		Activity activity, ActivityPort activityPort) {
	bindings: for (ProcessorBinding binding : scufl2Tools
			.processorBindingsToActivity(activity))
		for (ProcessorInputPortBinding portBinding : binding
				.getInputPortBindings())
			if (portBinding.getBoundActivityPort() == activityPort) {
				ProcessorPort processorPort = portBinding
						.getBoundProcessorPort();
				if (processorPort.getName().equals(oldName)) {
					processorPort.setName(newName);
					continue bindings;
				}
			}
}
 
開發者ID:apache,項目名稱:incubator-taverna-workbench,代碼行數:16,代碼來源:RenameEdit.java

示例10: changeProcessorOutputPortName

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
private void changeProcessorOutputPortName(String oldName, String newName,
		Activity activity, ActivityPort activityPort) {
	bindings: for (ProcessorBinding binding : scufl2Tools
			.processorBindingsToActivity(activity))
		for (ProcessorOutputPortBinding portBinding : binding
				.getOutputPortBindings())
			if (portBinding.getBoundActivityPort() == activityPort) {
				ProcessorPort processorPort = portBinding
						.getBoundProcessorPort();
				if (processorPort.getName().equals(oldName)) {
					processorPort.setName(newName);
					continue bindings;
				}
			}
}
 
開發者ID:apache,項目名稱:incubator-taverna-workbench,代碼行數:16,代碼來源:RenameEdit.java

示例11: visitActivityPort

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
@Override
public void visitActivityPort(ActivityPort bean) {
}
 
開發者ID:apache,項目名稱:incubator-taverna-language,代碼行數:4,代碼來源:DefaultDispatchingVisitor.java

示例12: visitActivityPort

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
@Override
public void visitActivityPort(ActivityPort bean) {
	// All checks are covered by those in Named and Child
}
 
開發者ID:apache,項目名稱:incubator-taverna-language,代碼行數:5,代碼來源:CorrectnessVisitor.java

示例13: ActivityPortConfiguration

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
public ActivityPortConfiguration(ActivityPort activityPort) {
	this.activityPort = activityPort;
	name = activityPort.getName();
	depth = activityPort.getDepth();
}
 
開發者ID:apache,項目名稱:incubator-taverna-workbench,代碼行數:6,代碼來源:ActivityPortConfiguration.java

示例14: getActivityPort

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
public ActivityPort getActivityPort() {
	return activityPort;
}
 
開發者ID:apache,項目名稱:incubator-taverna-workbench,代碼行數:4,代碼來源:ActivityPortConfiguration.java

示例15: visitActivityPort

import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
protected abstract void visitActivityPort(ActivityPort bean); 
開發者ID:apache,項目名稱:incubator-taverna-language,代碼行數:2,代碼來源:DispatchingVisitor.java


注:本文中的org.apache.taverna.scufl2.api.port.ActivityPort類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。