本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
}
示例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());
}
示例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;
}
示例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;
}
}
}
示例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;
}
}
}
示例11: visitActivityPort
import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
@Override
public void visitActivityPort(ActivityPort bean) {
}
示例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
}
示例13: ActivityPortConfiguration
import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
public ActivityPortConfiguration(ActivityPort activityPort) {
this.activityPort = activityPort;
name = activityPort.getName();
depth = activityPort.getDepth();
}
示例14: getActivityPort
import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
public ActivityPort getActivityPort() {
return activityPort;
}
示例15: visitActivityPort
import org.apache.taverna.scufl2.api.port.ActivityPort; //導入依賴的package包/類
protected abstract void visitActivityPort(ActivityPort bean);