• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java OutputActivityPort类的典型用法和代码示例

java 1次浏览

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

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

示例1: getActivityOutputPorts

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Override
public Set<OutputActivityPort> getActivityOutputPorts(URI activityType,
		JsonNode configuration) throws ActivityNotFoundException,
		ActivityConfigurationException {
	Set<OutputActivityPort> outputPorts = new HashSet<>();
	try {
		for (ActivityOutputPort port : getActivityFactory(activityType)
				.getOutputPorts(configuration)) {
			OutputActivityPort outputActivityPort = new OutputActivityPort();
			outputActivityPort.setName(port.getName());
			outputActivityPort.setDepth(port.getDepth());
			outputActivityPort.setGranularDepth(port.getGranularDepth());
			outputPorts.add(outputActivityPort);
		}
	} catch (org.apache.taverna.workflowmodel.processor.activity.ActivityConfigurationException e) {
		throw new ActivityConfigurationException(e);
	}
	return outputPorts;
}
 

开发者ID:apache,
项目名称:incubator-taverna-engine,
代码行数:20,
代码来源:ActivityServiceImpl.java

示例2: testCorrectnessOfMissingGranularDepth

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void testCorrectnessOfMissingGranularDepth() {
	OutputActivityPort oap = new OutputActivityPort();
	oap.setDepth(new Integer(3));
	oap.setGranularDepth(null);
	oap.setName("fred");
	oap.setParent(null);
	
	CorrectnessValidator cv = new CorrectnessValidator();
	ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
	
	cv.checkCorrectness(oap, false, rcvl);
	
	Set<NegativeValueProblem> negativeValueProblems = rcvl.getNegativeValueProblems();
	assertEquals(0, negativeValueProblems.size());
	
	Set<NullFieldProblem> nullFieldProblems = rcvl.getNullFieldProblems();
	assertEquals(0, nullFieldProblems.size()); // only done when completeness check
	assertEquals(0, rcvl.getIncompatibleGranularDepthProblems().size());
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:21,
代码来源:TestAbstractGranularDepthPort.java

示例3: testCompletenessOfSpecifiedBoundActivityPort

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void testCompletenessOfSpecifiedBoundActivityPort() {
	ProcessorOutputPortBinding pipb = new ProcessorOutputPortBinding();
	pipb.setBoundActivityPort(new OutputActivityPort());
	
	CorrectnessValidator cv = new CorrectnessValidator();
	ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
	
	cv.checkCorrectness(pipb, true, rcvl);
	
	Set<NullFieldProblem> nullFieldProblems = rcvl.getNullFieldProblems();
	boolean problem = false;
	for (NullFieldProblem nlp : nullFieldProblems) {
		if (nlp.getBean().equals(pipb) && nlp.getFieldName().equals("boundActivityPort")) {
			problem = true;
		}
	}
	assertFalse(problem);
	
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:21,
代码来源:TestProcessorOutputPortBinding.java

示例4: createProcessorFromActivity

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void createProcessorFromActivity() throws Exception {
	Profile profile = new Profile();
	Activity a = new Activity();
	a.setParent(profile);
	new InputActivityPort(a, "in1");
	new InputActivityPort(a, "in2").setDepth(1);		
	new OutputActivityPort(a, "out1");
	new OutputActivityPort(a, "out2").setDepth(0);		
	OutputActivityPort aOut3 = new OutputActivityPort(a, "out3");
	aOut3.setDepth(2);
	aOut3.setGranularDepth(1);
	
	ProcessorBinding binding = scufl2Tools.createProcessorAndBindingFromActivity(a);
	Processor p = binding.getBoundProcessor();
	assertEquals(profile, binding.getParent());
	
	assertEquals(2, p.getInputPorts().size());
	assertEquals(3, p.getOutputPorts().size());
	assertEquals(2, binding.getInputPortBindings().size());
	assertEquals(3, binding.getOutputPortBindings().size());
	assertEquals(a, binding.getBoundActivity());
	assertEquals(p, binding.getBoundProcessor());

}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:26,
代码来源:TestScufl2Tools.java

示例5: createActivityPortsFromProcessorWithOverwrite

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void createActivityPortsFromProcessorWithOverwrite() throws Exception {
	Processor p = new Processor();
	new InputProcessorPort(p, "in1");
	new OutputProcessorPort(p, "out1");
	new OutputProcessorPort(p, "out2").setDepth(1);

	
	Activity a = new Activity();
	new InputActivityPort(a, "other");
	OutputActivityPort toBeOverWritten = new OutputActivityPort(a, "out1");
	toBeOverWritten.setDepth(1);
	assertEquals(a, toBeOverWritten.getParent());
	
	
	scufl2Tools.createActivityPortsFromProcessor(a, p);
	// Still there
	assertNotNull(a.getInputPorts().getByName("other"));
	
	// but out1 has been overwritten
		OutputActivityPort aOut1 = a.getOutputPorts().getByName("out1");
	assertNull(aOut1.getDepth());
	assertNotSame(toBeOverWritten, aOut1);		
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:25,
代码来源:TestScufl2Tools.java

示例6: createProcessorPortsFromActivityWithOverwrite

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void createProcessorPortsFromActivityWithOverwrite() throws Exception {
	Activity a = new Activity();

	new InputActivityPort(a, "in1");
	
	new OutputActivityPort(a, "out1");
	new OutputActivityPort(a, "out2").setDepth(1);

	Processor p = new Processor();
	new InputProcessorPort(p, "other");
	OutputProcessorPort toBeOverWritten = new OutputProcessorPort(p, "out1");
	toBeOverWritten.setDepth(1);
	assertEquals(p, toBeOverWritten.getParent());
	
	
	scufl2Tools.createProcessorPortsFromActivity(p, a);
	// Still there
	assertNotNull(p.getInputPorts().getByName("other"));
	
	// but out1 has been overwritten
		OutputProcessorPort pOut1 = p.getOutputPorts().getByName("out1");
	assertNull(pOut1.getDepth());
	assertNotSame(toBeOverWritten, pOut1);
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:26,
代码来源:TestScufl2Tools.java

示例7: parseConfiguration

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Override
public Configuration parseConfiguration(T2FlowParser t2FlowParser,
		ConfigBean configBean, ParserState parserState) throws ReaderException {
	StringConstantConfig strConfig = unmarshallConfig(t2FlowParser,
			configBean, "xstream", StringConstantConfig.class);
	String value = strConfig.getValue();
	if (value == null)
		throw new ReaderException("String constant configuration has no value set");
	Configuration configuration = new Configuration();
	ObjectNode json = (ObjectNode) configuration.getJson();
	configuration.setType(CONSTANT.resolve("#Config"));
	json.put("string", value);
	
	Activity activity = parserState.getCurrentActivity();
	OutputActivityPort valuePort = new OutputActivityPort(activity, VALUE);
	valuePort.setDepth(0);
	valuePort.setGranularDepth(0);
	return configuration;
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:20,
代码来源:StringConstantActivityParser.java

示例8: parseScuflObject

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Override
public void parseScuflObject(Object o) {
	StringconstantType sc = (StringconstantType) o;
	Configuration configuration = new Configuration();
	configuration.setParent(getParserState().getCurrentProfile());
	configuration.setType(CONSTANT.resolve("#Config"));
	((ObjectNode) configuration.getJson()).put("string", sc.getValue());

	Activity activity = new Activity();
	getParserState().setCurrentActivity(activity);
	activity.setParent(getParserState().getCurrentProfile());
	activity.setType(CONSTANT);
	OutputActivityPort valuePort = new OutputActivityPort(activity, VALUE);
	valuePort.setDepth(0);
	valuePort.setGranularDepth(0);
	configuration.setConfigures(activity);

	ProcessorBinding pb = new ProcessorBinding();
	pb.setParent(getParserState().getCurrentProfile());
	pb.setBoundProcessor(getParserState().getCurrentProcessor());
	pb.setBoundActivity(activity);
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:23,
代码来源:StringConstantExtensionParser.java

示例9: visit

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Override
public boolean visit(WorkflowBean node) {
	if (node instanceof Profile)
		profile((Profile) node);
	else if (node instanceof Activity)
		activity((Activity) node);
	else if (node instanceof InputActivityPort)
		inputActivityPort((InputActivityPort) node);
	else if (node instanceof OutputActivityPort)
		outputActivityPort((OutputActivityPort) node);
	else if (node instanceof ProcessorBinding)
		processorBinding((ProcessorBinding) node);
	else if (node instanceof ProcessorInputPortBinding)
		processorInputPortBinding((ProcessorInputPortBinding) node);
	else if (node instanceof ProcessorOutputPortBinding)
		processorOutputPortBinding((ProcessorOutputPortBinding) node);
	else if (node instanceof Configuration)
		configuration((Configuration) node);
	else
		throw new IllegalStateException("Unexpected node " + node);
	return true;
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:23,
代码来源:RDFXMLSerializer.java

示例10: parseActivity

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
protected void parseActivity(
		org.apache.taverna.scufl2.xml.Activity original) {
	Activity activity = new Activity();

	getParserState().push(activity);
	try {
		mapBean(original.getAbout(), activity);
		if (original.getName() != null)
			activity.setName(original.getName());
		activity.setParent(getParserState().getCurrent(
				org.apache.taverna.scufl2.api.profiles.Profile.class));
		if (original.getType() != null)
			activity.setType(resolve(original.getType().getResource()));
		for (org.apache.taverna.scufl2.xml.Activity.InputActivityPort inputActivityPort : original
				.getInputActivityPort())
			parseInputActivityPort(inputActivityPort.getInputActivityPort());
		for (org.apache.taverna.scufl2.xml.Activity.OutputActivityPort outputActivityPort : original
				.getOutputActivityPort())
			parseOutputActivityPort(outputActivityPort
					.getOutputActivityPort());
	} finally {
		getParserState().pop();
	}
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:25,
代码来源:ProfileParser.java

示例11: activity

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
	public void activity() throws Exception {
		assertEquals(1, profile.getActivities().size());
		Activity helloScript = profile.getActivities().getByName("HelloScript");
		assertEquals("HelloScript", helloScript.getName());
		assertEquals(
"http://ns.taverna.org.uk/2010/activity/beanshell",
				helloScript.getType().toASCIIString());
		assertEquals(1, helloScript.getInputPorts().size());
		InputActivityPort personName = helloScript.getInputPorts().getByName(
				"personName");
		assertEquals("personName", personName.getName());
		assertEquals(0, personName.getDepth().intValue());

		assertEquals(1, helloScript.getOutputPorts().size());
		OutputActivityPort hello = helloScript.getOutputPorts().getByName(
				"hello");
		assertEquals("hello", hello.getName());
		assertEquals(0, hello.getDepth().intValue());
		assertEquals(0, hello.getGranularDepth().intValue());

	}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:23,
代码来源:TestProfileParser.java

示例12: getRawTableRowsHtml

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
/**
 * The table for the UnrecognizedActivity shows its ports.
 *
 * @return
 */
@Override
protected String getRawTableRowsHtml() {
	StringBuilder html = new StringBuilder();
	html.append("<tr><th>Input Port Name</th><th>Depth</th></tr>");
	for (InputActivityPort inputActivityPort : getActivity().getInputPorts()) {
		html.append("<tr><td>" + inputActivityPort.getName() + "</td><td>");
		html.append(inputActivityPort.getDepth() + "</td></tr>");
	}
	html.append("<tr><th>Output Port Name</th><th>Depth</th></tr>");
	for (OutputActivityPort outputActivityPort : getActivity().getOutputPorts()) {
		html.append("<tr><td>" + outputActivityPort.getName() + "</td><td>");
		html.append(outputActivityPort.getDepth() + "</td></tr>");
	}
	return html.toString();
}
 

开发者ID:apache,
项目名称:incubator-taverna-workbench,
代码行数:21,
代码来源:UnrecognizedContextualView.java

示例13: generateOutputPorts

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
private void generateOutputPorts(Activity beanshell) {
       OutputActivityPort loopPort = new OutputActivityPort(beanshell, LOOP_PORT);
        loopPort.setDepth(0);
        loopPort.setGranularDepth(0);
    if (processorToCompare == null) {
           return;
    }	    
    if (! loopProperties.findValue(IS_FEED_BACK).asBoolean()) {
          return;
    }
    for (InputProcessorPort procIn : processorToCompare.getInputPorts()) {
           String portName = procIn.getName();
           if (processorToCompare.getOutputPorts().containsName(portName)) {
               OutputActivityPort actOut = new OutputActivityPort(beanshell, portName);
               actOut.setDepth(procIn.getDepth());
               actOut.setGranularDepth(procIn.getDepth());
           }
    }
}
 

开发者ID:apache,
项目名称:incubator-taverna-workbench,
代码行数:20,
代码来源:ActivityGenerator.java

示例14: createOutputPort

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
private void createOutputPort(Activity activity, List<Edit<?>> editList,
		List<ProcessorBinding> processorBindings,
		ActivityPortConfiguration portDefinition) {
	OutputActivityPort actPort = new OutputActivityPort(null,
			portDefinition.getName());
	actPort.setDepth(portDefinition.getDepth());
	actPort.setGranularDepth(portDefinition.getGranularDepth());
	// add port to activity
	editList.add(new AddChildEdit<Activity>(activity, actPort));
	for (ProcessorBinding processorBinding : processorBindings) {
		Processor processor = processorBinding.getBoundProcessor();
		// add a new processor port
		OutputProcessorPort procPort = new OutputProcessorPort();
		procPort.setName(portDefinition.getName());
		procPort.setDepth(portDefinition.getDepth());
		procPort.setGranularDepth(portDefinition.getGranularDepth());
		editList.add(new AddProcessorOutputPortEdit(processor, procPort));
		// add a new port binding
		ProcessorOutputPortBinding binding = new ProcessorOutputPortBinding();
		binding.setBoundProcessorPort(procPort);
		binding.setBoundActivityPort(actPort);
		editList.add(new AddChildEdit<>(processorBinding, binding));
	}
}
 

开发者ID:apache,
项目名称:incubator-taverna-workbench,
代码行数:25,
代码来源:ActivityConfigurationDialog.java

示例15: defineEditsForConfiguration

点赞 3

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
private void defineEditsForConfiguration(Workflow workflow,
		OutputWorkflowPort port, WorkflowBundle workflowBundle,
		Activity activity, Configuration c) {
	List<Edit<?>> edits = nestedPortEdit.getChildEdits();
	JsonNode nested = c.getJson().get("nestedWorkflow");
	Workflow nestedWorkflow = workflowBundle.getWorkflows().getByName(
			nested.asText());
	if (nestedWorkflow != workflow)
		return;

	OutputActivityPort activityPort = activity.getOutputPorts().getByName(
			port.getName());
	edits.add(new RemoveChildEdit<>(activity, activityPort));
	for (ProcessorBinding processorBinding : scufl2Tools
			.processorBindingsToActivity(activity))
		for (ProcessorOutputPortBinding portBinding : processorBinding
				.getOutputPortBindings())
			if (portBinding.getBoundActivityPort() == activityPort) {
				OutputProcessorPort processorPort = portBinding
						.getBoundProcessorPort();
				edits.add(new RemoveProcessorOutputPortEdit(
						processorBinding.getBoundProcessor(), processorPort));
				edits.add(new RemoveChildEdit<>(processorBinding,
						portBinding));
			}
}
 

开发者ID:apache,
项目名称:incubator-taverna-workbench,
代码行数:27,
代码来源:RemoveWorkflowOutputPortEdit.java

示例16: visitProcessorOutputPortBinding

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Override
public void visitProcessorOutputPortBinding(ProcessorOutputPortBinding bean) {
	ProcessorBinding parent = bean.getParent();
	OutputProcessorPort boundProcessorPort = bean.getBoundProcessorPort();
	OutputActivityPort boundActivityPort = bean.getBoundActivityPort();
	
	if (parent != null) {
		Processor boundProcessor = parent.getBoundProcessor();
		if (boundProcessorPort != null) {
			Processor boundPortProcessor = findAncestral(boundProcessorPort, Processor.class);
			if ((boundProcessor == null) || !boundProcessor.equals(boundPortProcessor))
				listener.outOfScopeValue(bean, "boundProcessorPort", boundProcessorPort);					
		}
		Activity boundActivity = parent.getBoundActivity();
		if (boundActivityPort != null) {
			Activity boundPortActivity = findAncestral(boundActivityPort, Activity.class);
			if ((boundActivity == null) || !boundActivity.equals(boundPortActivity))
				listener.outOfScopeValue(bean, "boundActivityPort", boundActivityPort);
		}
	}
	if (checkComplete) {
		if (boundProcessorPort == null)
			listener.nullField(bean, "boundProcessorPort");
		if (boundActivityPort == null)
			listener.nullField(bean, "boundActivityPort");
	}
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:28,
代码来源:CorrectnessVisitor.java

示例17: parsePort

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
private void parsePort(Scanner scanner, String next) throws ReaderException {
	boolean in = next.equals("In");
	String portName = parseName(scanner);
	switch (level) {
	case Workflow:
		if (in)
			new InputWorkflowPort(workflow, portName);
		else
			new OutputWorkflowPort(workflow, portName);
		break;
	case Processor:
		if (in)
			new InputProcessorPort(processor, portName);
		else
			new OutputProcessorPort(processor, portName);
		break;
	case Activity:
		if (in)
			new InputActivityPort(activity, portName);
		else
			new OutputActivityPort(activity, portName);
		break;
	default:
		throw new ReaderException("Unexpected " + next + " at level "
				+ level);
	}
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:28,
代码来源:StructureReader.java

示例18: testCorrectnessOfGranularDepthSpecifiedIncorrectly

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void testCorrectnessOfGranularDepthSpecifiedIncorrectly() {
	OutputActivityPort oap = new OutputActivityPort();
	oap.setDepth(new Integer(3));
	oap.setGranularDepth(new Integer(-2));
	oap.setName("fred");
	oap.setParent(null);
	
	CorrectnessValidator cv = new CorrectnessValidator();
	ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
	
	cv.checkCorrectness(oap, false, rcvl);
	
	Set<NegativeValueProblem> negativeValueProblems = rcvl.getNegativeValueProblems();
	assertEquals(1, negativeValueProblems.size());
	if (!negativeValueProblems.isEmpty()) {
		NegativeValueProblem problem = negativeValueProblems.iterator().next();
		assertEquals(problem.getBean(), oap);
		assertEquals(problem.getFieldName(), "granularDepth");
		assertEquals(problem.getFieldValue(), Integer.valueOf("-2"));
	}
	
	Set<NullFieldProblem> nullFieldProblems = rcvl.getNullFieldProblems();
	assertEquals(0, nullFieldProblems.size()); // only done when completeness check
	
	assertEquals(0, rcvl.getIncompatibleGranularDepthProblems().size());
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:28,
代码来源:TestAbstractGranularDepthPort.java

示例19: testCompletenessOfGranularDepthSpecifiedIncorrectly

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void testCompletenessOfGranularDepthSpecifiedIncorrectly() {
	OutputActivityPort oap = new OutputActivityPort();
	oap.setDepth(new Integer(3));
	oap.setGranularDepth(new Integer(-2));
	oap.setName("fred");
	oap.setParent(null);
	
	CorrectnessValidator cv = new CorrectnessValidator();
	ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
	
	cv.checkCorrectness(oap, true, rcvl);
	
	Set<NegativeValueProblem> negativeValueProblems = rcvl.getNegativeValueProblems();
	assertEquals(1, negativeValueProblems.size());
	if (!negativeValueProblems.isEmpty()) {
		NegativeValueProblem problem = negativeValueProblems.iterator().next();
		assertEquals(problem.getBean(), oap);
		assertEquals(problem.getFieldName(), "granularDepth");
		assertEquals(problem.getFieldValue(), Integer.valueOf("-2"));
	}
	
	Set<NullFieldProblem> nullFieldProblems = rcvl.getNullFieldProblems();
	assertEquals(1, nullFieldProblems.size()); // parent
	boolean granularDepthFieldProblem = false;
	for (NullFieldProblem nlp : nullFieldProblems) {
		if (nlp.getBean().equals(oap) && nlp.getFieldName().equals("granularDepth")) {
			granularDepthFieldProblem = true;
		}
	}
	assertFalse(granularDepthFieldProblem);
	assertEquals(0, rcvl.getIncompatibleGranularDepthProblems().size());
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:34,
代码来源:TestAbstractGranularDepthPort.java

示例20: testCompletenessOfMissingGranularDepth

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void testCompletenessOfMissingGranularDepth() {
	OutputActivityPort oap = new OutputActivityPort();
	oap.setDepth(new Integer(3));
	oap.setGranularDepth(null);
	oap.setName("fred");
	oap.setParent(null);
	
	CorrectnessValidator cv = new CorrectnessValidator();
	ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
	
	cv.checkCorrectness(oap, true, rcvl);
	
	Set<NegativeValueProblem> negativeValueProblems = rcvl.getNegativeValueProblems();
	assertEquals(0, negativeValueProblems.size());
	
	Set<NullFieldProblem> nullFieldProblems = rcvl.getNullFieldProblems();
	assertEquals(2, nullFieldProblems.size()); // granular depth and parent
	boolean granularDepthFieldProblem = false;
	for (NullFieldProblem nlp : nullFieldProblems) {
		if (nlp.getBean().equals(oap) && nlp.getFieldName().equals("granularDepth")) {
			granularDepthFieldProblem = true;
		}
	}
	assertTrue(granularDepthFieldProblem);
	assertEquals(0, rcvl.getIncompatibleGranularDepthProblems().size());

}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:29,
代码来源:TestAbstractGranularDepthPort.java

示例21: testCorrectnessOfOutOfScopeActivityPort1

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void testCorrectnessOfOutOfScopeActivityPort1() {
	ProcessorBinding pb = new ProcessorBinding();
	Processor processor = new Processor();
	pb.setBoundProcessor(processor);
	
	ProcessorOutputPortBinding pipb = new ProcessorOutputPortBinding();
	pipb.setParent(pb);
	
	OutputActivityPort orphanPort = new OutputActivityPort();
	pipb.setBoundActivityPort(orphanPort);
	
	CorrectnessValidator cv = new CorrectnessValidator();
	ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
	
	cv.checkCorrectness(pipb, false, rcvl);
	
	Set<OutOfScopeValueProblem> outOfScopeValueProblems = rcvl.getOutOfScopeValueProblems();
	boolean problem = false;
	for (OutOfScopeValueProblem nlp : outOfScopeValueProblems) {
		if (nlp.getBean().equals(pipb) && nlp.getFieldName().equals("boundActivityPort") && nlp.getValue().equals(orphanPort)) {
			problem = true;
		}
	}
	assertTrue(problem);
	
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:28,
代码来源:TestProcessorOutputPortBinding.java

示例22: testCorrectnessOfOutOfScopeActivityPort2

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void testCorrectnessOfOutOfScopeActivityPort2() {
	ProcessorBinding pb = new ProcessorBinding();
	Activity activity = new Activity();
	pb.setBoundActivity(activity);
	
	ProcessorOutputPortBinding pipb = new ProcessorOutputPortBinding();
	pipb.setParent(pb);
	
	Activity otherActivity = new Activity();
	OutputActivityPort elsewherePort = new OutputActivityPort();
	elsewherePort.setParent(otherActivity);
	
	pipb.setBoundActivityPort(elsewherePort);
	
	CorrectnessValidator cv = new CorrectnessValidator();
	ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
	
	cv.checkCorrectness(pipb, false, rcvl);
	
	Set<OutOfScopeValueProblem> outOfScopeValueProblems = rcvl.getOutOfScopeValueProblems();
	boolean problem = false;
	for (OutOfScopeValueProblem nlp : outOfScopeValueProblems) {
		if (nlp.getBean().equals(pipb) && nlp.getFieldName().equals("boundActivityPort") && nlp.getValue().equals(elsewherePort)) {
			problem = true;
		}
	}
	assertTrue(problem);
	
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:31,
代码来源:TestProcessorOutputPortBinding.java

示例23: testCorrectnessOfInScopeActivityPort

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void testCorrectnessOfInScopeActivityPort() {
	ProcessorBinding pb = new ProcessorBinding();
	Activity activity = new Activity();
	pb.setBoundActivity(activity);
	
	ProcessorOutputPortBinding pipb = new ProcessorOutputPortBinding();
	pipb.setParent(pb);
	
	OutputActivityPort port = new OutputActivityPort();
	port.setParent(activity);
	
	pipb.setBoundActivityPort(port);
	
	CorrectnessValidator cv = new CorrectnessValidator();
	ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
	
	cv.checkCorrectness(pipb, false, rcvl);
	
	Set<OutOfScopeValueProblem> outOfScopeValueProblems = rcvl.getOutOfScopeValueProblems();
	boolean problem = false;
	for (OutOfScopeValueProblem nlp : outOfScopeValueProblems) {
		if (nlp.getBean().equals(pipb) && nlp.getFieldName().equals("boundActivityPort") && nlp.getValue().equals(port)) {
			problem = true;
		}
	}
	assertFalse(problem);
	
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:30,
代码来源:TestProcessorOutputPortBinding.java

示例24: makeActivity

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
public Activity makeActivity() {
	activity = new Activity();
	activity.setName("HelloScript");
	activity.setType(URI
			.create("http://ns.taverna.org.uk/2010/activity/beanshell"));

	personName = new InputActivityPort(activity, "personName");
	personName.setDepth(0);
	hello = new OutputActivityPort(activity, "hello");
	hello.setDepth(0);
	hello.setGranularDepth(0);
	return activity;

}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:15,
代码来源:ExampleWorkflow.java

示例25: processorPortBindingForOutputActivityPort

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void processorPortBindingForOutputActivityPort() throws Exception {
	Profile profile = workflowBundle.getMainProfile();
	Activity helloScript = profile.getActivities().getByName("HelloScript");
	OutputActivityPort port = helloScript.getOutputPorts().getByName(
			"hello");
	ProcessorBinding processorBinding = profile.getProcessorBindings()
			.getByName("Hello");
	ProcessorOutputPortBinding outputPortBinding = processorBinding
			.getOutputPortBindings().iterator().next();
	assertSame(outputPortBinding,
			scufl2Tools.processorPortBindingForPort(port, profile));
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:14,
代码来源:TestScufl2Tools.java

示例26: updatePortBindingByMatchingPorts

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
	@Test
	public void updatePortBindingByMatchingPorts() throws Exception {
		Processor p = new Processor();
		new InputProcessorPort(p, "in1");
		new InputProcessorPort(p, "in2");
		new OutputProcessorPort(p, "out1");		
		new OutputProcessorPort(p, "out2");
		Profile profile = new Profile();
		Activity a = scufl2Tools.createActivityFromProcessor(p, profile);
		ProcessorBinding binding = scufl2Tools.processorBindingsToActivity(a).get(0);
		
		// Add some
		new InputProcessorPort(p, "new1");
		new InputProcessorPort(p, "new2");
		new InputActivityPort(a, "new1");
		new InputActivityPort(a, "new2");
		new OutputProcessorPort(p, "new3");
		new OutputProcessorPort(p, "new4");
		new OutputActivityPort(a, "new4");
		new OutputActivityPort(a, "new5");
		// And remove some
		p.getInputPorts().removeByName("in2");
		a.getOutputPorts().removeByName("out1");
		
		scufl2Tools.updateBindingByMatchingPorts(binding);
		
//		assertEquals(3, binding.getInputPortBindings().size());
//		assertEquals(2, binding.getOutputPortBindings().size());

		Set<String> namesIn = procPortNames(binding.getInputPortBindings());
		Set<String> namesOut = procPortNames(binding.getOutputPortBindings());
		assertEquals(new HashSet(Arrays.asList("in1", "new1", "new2")), namesIn);
		assertEquals(new HashSet(Arrays.asList("out2", "new4")), namesOut);		
	}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:36,
代码来源:TestScufl2Tools.java

示例27: createActivityPortsFromProcessor

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void createActivityPortsFromProcessor() throws Exception {
	Processor p = new Processor();
	new InputProcessorPort(p, "in1");
	new InputProcessorPort(p, "in2").setDepth(1);
	
	new OutputProcessorPort(p, "out1");
	new OutputProcessorPort(p, "out2").setDepth(0);
	
	OutputProcessorPort pOut3 = new OutputProcessorPort(p, "out3");
	pOut3.setDepth(2);
	pOut3.setGranularDepth(1);
	
	
	Activity a = new Activity();
	scufl2Tools.createActivityPortsFromProcessor(a, p);
	
	
	assertEquals(2, a.getInputPorts().size());
	InputActivityPort aIn1 = a.getInputPorts().getByName("in1");
	assertNull(aIn1.getDepth());
	InputActivityPort aIn2 = a.getInputPorts().getByName("in2");
	assertEquals(1, aIn2.getDepth().intValue());
	
	assertEquals(3, a.getOutputPorts().size());
	OutputActivityPort aOut1 = a.getOutputPorts().getByName("out1");
	assertEquals(null, aOut1.getDepth());
	assertEquals(null, aOut1.getGranularDepth());
	
	OutputActivityPort aOut2 = a.getOutputPorts().getByName("out2");
	assertEquals(0, aOut2.getDepth().intValue());
	assertEquals(null, aOut2.getGranularDepth());
	
	OutputActivityPort aOut3 = a.getOutputPorts().getByName("out3");
	assertEquals(2, aOut3.getDepth().intValue());
	assertEquals(1, aOut3.getGranularDepth().intValue());		
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:38,
代码来源:TestScufl2Tools.java

示例28: createProcessorPortsFromActivity

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void createProcessorPortsFromActivity() throws Exception {
	Activity a = new Activity();
	new InputActivityPort(a, "in1");
	new InputActivityPort(a, "in2").setDepth(1);
	
	new OutputActivityPort(a, "out1");
	new OutputActivityPort(a, "out2").setDepth(0);
	
	OutputActivityPort aOut3 = new OutputActivityPort(a, "out3");
	aOut3.setDepth(2);
	aOut3.setGranularDepth(1);
	
	
	Processor p = new Processor();
	scufl2Tools.createProcessorPortsFromActivity(p, a);
	
	
	assertEquals(2, p.getInputPorts().size());
	InputProcessorPort pIn1 = p.getInputPorts().getByName("in1");
	assertNull(pIn1.getDepth());
	InputProcessorPort pIn2 = p.getInputPorts().getByName("in2");
	assertEquals(1, pIn2.getDepth().intValue());
	
	assertEquals(3, p.getOutputPorts().size());
	OutputProcessorPort pOut1 = p.getOutputPorts().getByName("out1");
	assertEquals(null, pOut1.getDepth());
	assertEquals(null, pOut1.getGranularDepth());
	
	OutputProcessorPort pOut2 = p.getOutputPorts().getByName("out2");
	assertEquals(0, pOut2.getDepth().intValue());
	assertEquals(null, pOut2.getGranularDepth());
	
	OutputProcessorPort pOut3 = p.getOutputPorts().getByName("out3");
	assertEquals(2, pOut3.getDepth().intValue());
	assertEquals(1, pOut3.getGranularDepth().intValue());		
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:38,
代码来源:TestScufl2Tools.java

示例29: bindActivityToProcessorByMatchingPorts

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void bindActivityToProcessorByMatchingPorts() throws Exception {
	Processor p = new Processor();
	new InputProcessorPort(p, "in1");
	new InputProcessorPort(p, "in2");
	new OutputProcessorPort(p, "out1");
	new OutputProcessorPort(p, "out2");
	new OutputProcessorPort(p, "out3");
	
	Activity a = new Activity();
	new InputActivityPort(a, "in1");
	// in2 missing
	new InputActivityPort(a, "in3"); // additional in3
	new OutputActivityPort(a, "out1");
	// out2 missing
	new OutputActivityPort(a, "out3");
	new OutputActivityPort(a, "out4"); // additional out4

	ProcessorBinding binding = scufl2Tools.bindActivityToProcessorByMatchingPorts(a, p);
	assertEquals(a, binding.getBoundActivity());
	assertEquals(p, binding.getBoundProcessor());
	assertEquals(1, binding.getInputPortBindings().size());
	ProcessorInputPortBinding inBinding = binding.getInputPortBindings().iterator().next();
	assertEquals(p.getInputPorts().getByName("in1"), inBinding.getBoundProcessorPort());
	assertEquals(a.getInputPorts().getByName("in1"), inBinding.getBoundActivityPort());
	
	assertEquals(2, binding.getOutputPortBindings().size());
	// should be out1 and out3
	for (ProcessorOutputPortBinding outBinding : binding.getOutputPortBindings()) {
		assertEquals(outBinding.getBoundActivityPort().getName(),
					outBinding.getBoundProcessorPort().getName());
		assertEquals(a, outBinding.getBoundActivityPort().getParent());
		assertEquals(p, outBinding.getBoundProcessorPort().getParent());
	}
	
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:37,
代码来源:TestScufl2Tools.java

示例30: parseAndAddOutputPortDefinition

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
protected ObjectNode parseAndAddOutputPortDefinition(
			ActivityPortDefinitionBean portBean, Configuration configuration,
			Activity activity) {
		ObjectNode configResource = (ObjectNode) configuration.getJson();
		OutputActivityPort outputPort = new OutputActivityPort();

		outputPort.setName(getPortElement(portBean, "name", String.class));
		outputPort.setParent(activity);

		BigInteger depth = getPortElement(portBean, "depth", BigInteger.class);
		if (depth != null)
			outputPort.setDepth(depth.intValue());
		
		BigInteger granularDepth = getPortElement(portBean, "granularDepth",
				BigInteger.class);
		if (granularDepth != null)
			outputPort.setGranularDepth(granularDepth.intValue());
		
		ObjectNode portConfig = configResource.objectNode();
//		PropertyResource portConfig = configResource.addPropertyAsNewResource(
//				Scufl2Tools.PORT_DEFINITION.resolve("#outputPortDefinition"),
//				Scufl2Tools.PORT_DEFINITION.resolve("#OutputPortDefinition"));

		@SuppressWarnings("unused")
		URI portUri = new URITools().relativeUriForBean(outputPort, configuration);
//		portConfig.addPropertyReference(Scufl2Tools.PORT_DEFINITION.resolve("#definesOutputPort"), portUri);

	      // Legacy duplication of port details for XMLSplitter activities
        portConfig.put("name", outputPort.getName());
        portConfig.put("depth", outputPort.getDepth());
        portConfig.put("granularDepth", outputPort.getDepth());
		
		parseMimeTypes(portBean, portConfig);
		return portConfig;
	}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:36,
代码来源:AbstractActivityParser.java

示例31: parseOutputActivityPort

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
protected void parseOutputActivityPort(
		org.apache.taverna.scufl2.xml.OutputActivityPort original) {
	OutputActivityPort port = new OutputActivityPort();
	mapBean(original.getAbout(), port);
	port.setParent(getParserState().getCurrent(Activity.class));

	port.setName(original.getName());
	if (original.getPortDepth() != null)
		port.setDepth(original.getPortDepth().getValue());
	if (original.getGranularPortDepth() != null)
		port.setGranularDepth(original.getGranularPortDepth().getValue());
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:13,
代码来源:ProfileParser.java

示例32: parseOutputPortBinding

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
protected void parseOutputPortBinding(
		org.apache.taverna.scufl2.xml.OutputPortBinding original)
		throws ReaderException {
	ProcessorOutputPortBinding binding = new ProcessorOutputPortBinding();
	mapBean(original.getAbout(), binding);

	binding.setBoundActivityPort(resolveBeanUri(original
			.getBindOutputActivityPort().getResource(),
			OutputActivityPort.class));
	binding.setBoundProcessorPort(resolveBeanUri(original
			.getBindOutputProcessorPort().getResource(),
			OutputProcessorPort.class));
	binding.setParent(getParserState().getCurrent(ProcessorBinding.class));
}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:15,
代码来源:ProfileParser.java

示例33: portBindings

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Test
public void portBindings() throws Exception {
	ProcessorBinding hello = profile.getProcessorBindings().getByName(
			"Hello");
	assertEquals(1, hello.getInputPortBindings().size());
	assertEquals(1, hello.getOutputPortBindings().size());

	ProcessorInputPortBinding input = hello.getInputPortBindings()
			.iterator().next();
	InputActivityPort inputActivityPort = profile.getActivities()
			.getByName("HelloScript").getInputPorts()
			.getByName("personName");
	assertEquals(inputActivityPort, input.getBoundActivityPort());

	InputProcessorPort inputProcessorPort = bundle.getMainWorkflow()
			.getProcessors().getByName("Hello").getInputPorts()
			.getByName("name");
	assertEquals(inputProcessorPort, input.getBoundProcessorPort());

	ProcessorOutputPortBinding output = hello.getOutputPortBindings()
			.iterator().next();
	OutputActivityPort outputActivityPort = profile.getActivities()
			.getByName("HelloScript").getOutputPorts().getByName("hello");
	assertEquals(outputActivityPort, output.getBoundActivityPort());

	OutputProcessorPort outputProcessorPort = bundle.getMainWorkflow()
			.getProcessors().getByName("Hello").getOutputPorts()
			.getByName("greeting");
	assertEquals(outputProcessorPort, output.getBoundProcessorPort());

}
 

开发者ID:apache,
项目名称:incubator-taverna-language,
代码行数:32,
代码来源:TestProfileParser.java

示例34: getContainingComponentActivity

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
public Activity getContainingComponentActivity(Object selection) {
	if (selection instanceof Activity) {
		Activity a = (Activity) selection;
		if (a.getType().equals(URI))
			return a;
	}
	if (selection instanceof InputActivityPort
			|| selection instanceof OutputActivityPort)
		return getContainingComponentActivity(((OutputActivityPort) selection)
				.getParent());
	return null;
}
 

开发者ID:apache,
项目名称:incubator-taverna-plugin-component,
代码行数:13,
代码来源:ComponentActivitySemanticAnnotationContextViewFactory.java

示例35: setProfile

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
private void setProfile(Object selection) throws ComponentException {
	if (componentProfile == null)
		return;
	if (selection instanceof Activity) {
		setSemanticAnnotationProfiles(componentProfile
				.getSemanticAnnotations());
	} else if (selection instanceof InputActivityPort) {
		setSemanticAnnotationProfiles(componentProfile
				.getInputSemanticAnnotationProfiles());
	} else if (selection instanceof OutputActivityPort) {
		setSemanticAnnotationProfiles(componentProfile
				.getOutputSemanticAnnotationProfiles());
	}
}
 

开发者ID:apache,
项目名称:incubator-taverna-plugin-component,
代码行数:15,
代码来源:ComponentActivitySemanticAnnotationContextViewFactory.java

示例36: makeOutputDefinition

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
private OutputActivityPort makeOutputDefinition(int depth, String name) {
	OutputActivityPort port = new OutputActivityPort();
	port.setName(name);
	port.setDepth(depth);
	port.setGranularDepth(depth);
	return port;
}
 

开发者ID:apache,
项目名称:incubator-taverna-plugin-component,
代码行数:8,
代码来源:ComponentActivityConfigurationBean.java

示例37: addDataflowToNestingProcessor

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
private void addDataflowToNestingProcessor(Processor nestingProcessor,
		Workflow nestedDataflow, Profile profile) {
	Activity da = new Activity();
	da.setParent(profile);
	da.createConfiguration(NESTED_WORKFLOW).getJsonAsObjectNode()
			.put("nestedWorkflow", nestedDataflow.getName());
	try {
		new AddActivityEdit(nestingProcessor, da).doEdit();
		new SetIterationStrategyStackEdit(nestingProcessor, null/*FIXME*/).doEdit();
		for (InputActivityPort aip : da.getInputPorts()) {
			InputProcessorPort pip = new InputProcessorPort();
			pip.setName(aip.getName());
			pip.setDepth(aip.getDepth());
			new AddProcessorInputPortEdit(nestingProcessor, pip).doEdit();
			new AddActivityInputPortMappingEdit(da, pip, aip).doEdit();
		}
		for (OutputActivityPort aop : da.getOutputPorts()) {
			OutputProcessorPort pop = new OutputProcessorPort();
			pop.setName(aop.getName());
			pop.setDepth(aop.getDepth());
			pop.setGranularDepth(aop.getGranularDepth());
			new AddProcessorOutputPortEdit(nestingProcessor, pop).doEdit();
			new AddActivityOutputPortMappingEdit(da, pop, aop).doEdit();
		}
	} catch (EditException e1) {
		logger.error("failed to add ports to processor", e1);
	}
}
 

开发者ID:apache,
项目名称:incubator-taverna-plugin-component,
代码行数:29,
代码来源:NestedWorkflowCreationDialog.java

示例38: addOutputPort

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
private static void addOutputPort(String name, int depth, Activity activity,
		Processor processor, ProcessorBinding binding) {
	OutputActivityPort activityPort = new OutputActivityPort(activity, name);
	activityPort.setDepth(depth);
	activityPort.setGranularDepth(depth);
	OutputProcessorPort processorPort = new OutputProcessorPort(processor, name);
	processorPort.setDepth(depth);
	processorPort.setGranularDepth(depth);
	new ProcessorOutputPortBinding(binding, activityPort, processorPort);
}
 

开发者ID:apache,
项目名称:incubator-taverna-workbench-common-activities,
代码行数:11,
代码来源:XMLSplitterPortBuilder.java

示例39: getRawTableRowsHtml

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
@Override
protected String getRawTableRowsHtml() {
	StringBuilder html = new StringBuilder();
	html.append("<tr><th>Input Port Name</th><th>Depth</th></tr>");
	for (InputActivityPort inputActivityPort : getActivity().getInputPorts()) {
		html.append("<tr><td>" + inputActivityPort.getName() + "</td><td>");
		html.append(inputActivityPort.getDepth() + "</td></tr>");
	}
	html.append("<tr><th>Output Port Name</th><th>Depth</th></tr>");
	for (OutputActivityPort outputActivityPort : getActivity().getOutputPorts()) {
		html.append("<tr><td>" + outputActivityPort.getName() + "</td><td>");
		html.append(outputActivityPort.getDepth() + "</td></tr>");
	}
	return html.toString();
}
 

开发者ID:apache,
项目名称:incubator-taverna-workbench-common-activities,
代码行数:16,
代码来源:BeanshellContextualView.java

示例40: createScriptEditPanel

点赞 2

import org.apache.taverna.scufl2.api.port.OutputActivityPort; //导入依赖的package包/类
private Component createScriptEditPanel() {
	Set<String> keywords = EditorKeySetUtil.loadKeySet(getClass().getResourceAsStream(
			"keys.txt"));
	Set<String> ports = new HashSet<>();
	for (InputActivityPort ip : getActivity().getInputPorts()) {
		ports.add(ip.getName());
	}
	for (OutputActivityPort op : getActivity().getOutputPorts()) {
		ports.add(op.getName());
	}
	scriptConfigurationComponent = new ScriptConfigurationComponent(getProperty("script"),
			keywords, ports, "Beanshell", ".bsh");
	return scriptConfigurationComponent;
}
 

开发者ID:apache,
项目名称:incubator-taverna-workbench-common-activities,
代码行数:15,
代码来源:BeanshellConfigurationPanel.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)