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


Java Configuration.getConfigures方法代码示例

本文整理汇总了Java中org.apache.taverna.scufl2.api.configurations.Configuration.getConfigures方法的典型用法代码示例。如果您正苦于以下问题:Java Configuration.getConfigures方法的具体用法?Java Configuration.getConfigures怎么用?Java Configuration.getConfigures使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.taverna.scufl2.api.configurations.Configuration的用法示例。


在下文中一共展示了Configuration.getConfigures方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visitConfiguration

import org.apache.taverna.scufl2.api.configurations.Configuration; //导入方法依赖的package包/类
@Override
	public void visitConfiguration(Configuration bean) {
		Configurable configures = bean.getConfigures();
		JsonNode json = bean.getJson();
		@SuppressWarnings("unused")
		URI type = null;
		if (configures != null && configures instanceof Typed)
			type = ((Typed) configures).getType();
		// Correct check cannot be completed unless property descriptions are available
//		URI configurationType = bean.getConfigurableType();
//		if ((configuresType != null) && (configurationType != null))
//			if (!configuresType.equals(configurationType))
//				listener.mismatchConfigurableType(bean, configures);

		if (checkComplete) {
			if (configures == null)
				listener.nullField(bean, "configures");
			if (json == null)
				listener.nullField(bean, "json");
			// TODO Check that the PropertyResource is complete
		}
	}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:23,代码来源:CorrectnessVisitor.java

示例2: getConstants

import org.apache.taverna.scufl2.api.configurations.Configuration; //导入方法依赖的package包/类
public Set<Processor> getConstants(Workflow workflow, Profile profile) {
	Set<Processor> procs = new LinkedHashSet<>();
	for (Configuration config : profile.getConfigurations()) {
		Configurable configurable = config.getConfigures();
		if (!CONSTANT.equals(configurable.getType())
				|| !(configurable instanceof Activity))
			continue;
		for (ProcessorBinding bind : processorBindingsToActivity((Activity) configurable))
			procs.add(bind.getBoundProcessor());
	}
	return procs;
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:13,代码来源:Scufl2Tools.java

示例3: parseSimpleTell

import org.apache.taverna.scufl2.api.configurations.Configuration; //导入方法依赖的package包/类
@Test
public void parseSimpleTell() throws Exception {
	WorkflowBundle researchObj = parseWorkflow(WF_SIMPLE_COMPONENT);
	Profile profile = researchObj.getMainProfile();
	assertNotNull("could not find profile in bundle", profile);

	Processor comp = researchObj.getMainWorkflow().getProcessors()
			.getByName("combiner");
	assertNotNull("could not find processor 'combiner'", comp);

	Configuration config = scufl2Tools
			.configurationForActivityBoundToProcessor(comp, profile);

	Activity act = (Activity) config.getConfigures();
	assertEquals(ACTIVITY_URI, act.getType());

	ObjectNode resource = config.getJsonAsObjectNode();
	assertEquals(ACTIVITY_URI.resolve("#Config"), config.getType());

	int length = 0;
	Iterator<?> i = resource.fieldNames();
	while (i.hasNext()) {
		i.next();
		length++;
	}
	assertEquals("must be exactly 4 items in the translated component", 4,
			length);

	assertEquals("http://www.myexperiment.org", resource
			.get("registryBase").textValue());
	assertEquals("SCAPE Utility Components", resource.get("familyName")
			.textValue());
	assertEquals("MeasuresDocCombiner", resource.get("componentName")
			.textValue());
	assertEquals(1, resource.get("componentVersion").asInt());

	assertEquals(2, comp.getInputPorts().size());
	assertEquals(1, comp.getOutputPorts().size());
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:40,代码来源:TestComponentActivityParser.java

示例4: parseSimpleTell

import org.apache.taverna.scufl2.api.configurations.Configuration; //导入方法依赖的package包/类
@Test
public void parseSimpleTell() throws Exception {
	WorkflowBundle researchObj = parseWorkflow(WF_SIMPLE_TELL);
	
	NamedSet<Profile> profiles = researchObj.getProfiles();
	Profile profile = profiles.getByName("taverna-biodiversity-2.5.0");
	assertNotNull("Could not find profile", profile);
	
	Processor tell = researchObj.getMainWorkflow().getProcessors()
			.getByName("tell");
	assertNotNull("Could not find processor tell", tell);
	
	Configuration tellConfig = scufl2Tools
			.configurationForActivityBoundToProcessor(tell, profile);
	
	Activity tellAct = (Activity) tellConfig.getConfigures();
	assertEquals(ACTIVITY_URI, tellAct.getType());
	
	ObjectNode tellResource = tellConfig.getJsonAsObjectNode();
	assertEquals(ACTIVITY_URI.resolve("#Config"), tellConfig.getType());
	
	String presentationOrigin = tellResource.get("presentationOrigin").textValue();
	assertEquals("tell", presentationOrigin);
	
	String interactionActivityType = tellResource.get("interactionActivityType").textValue();
	assertEquals("VelocityTemplate", interactionActivityType);
	
	boolean progressNotification = tellResource.get("progressNotification").booleanValue();
	assertFalse(progressNotification);
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:31,代码来源:TestInteractionActivityParser.java

示例5: parseMultipleChoice

import org.apache.taverna.scufl2.api.configurations.Configuration; //导入方法依赖的package包/类
@Test
public void parseMultipleChoice() throws Exception {
	WorkflowBundle researchObj = parseWorkflow(WF_MULTIPLE_CHOICE);
	
	NamedSet<Profile> profiles = researchObj.getProfiles();
	Profile profile = profiles.getByName("taverna-biodiversity-2.5.0");
	assertNotNull("Could not find profile", profile);
	
	Processor interaction = researchObj.getMainWorkflow().getProcessors()
			.getByName("Interaction");
	assertNotNull("Could not find processor Interaction", interaction);
	
	Configuration interactionConfig = scufl2Tools
			.configurationForActivityBoundToProcessor(interaction, profile);
	
	Activity interactionAct = (Activity) interactionConfig.getConfigures();
	assertEquals(ACTIVITY_URI, interactionAct.getType());
	
	ObjectNode interactionResource = interactionConfig.getJsonAsObjectNode();
	assertEquals(ACTIVITY_URI.resolve("#Config"), interactionConfig.getType());
	
	String presentationOrigin = interactionResource.get("presentationOrigin").textValue();
	assertEquals("http://build.mygrid.org.uk/taverna/internal/biovel/multiple_selection.html", presentationOrigin);
	
	String interactionActivityType = interactionResource.get("interactionActivityType").textValue();
	assertEquals("LocallyPresentedHtml", interactionActivityType);
	
	boolean progressNotification = interactionResource.get("progressNotification").booleanValue();
	assertFalse(progressNotification);		
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:31,代码来源:TestInteractionActivityParser.java


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