• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Profile类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GraphController

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
public GraphController(Workflow workflow, Profile profile,
		boolean interactive, Component componentForPopups,
		Alignment alignment, PortStyle portStyle, EditManager editManager,
		MenuManager menuManager, ColourManager colourManager) {
	this.workflow = workflow;
	this.profile = profile;
	this.interactive = interactive;
	this.componentForPopups = componentForPopups;
	this.alignment = alignment;
	this.portStyle = portStyle;
	this.editManager = editManager;
	this.colourManager = colourManager;
	this.graphEventManager = new DefaultGraphEventManager(this,
			componentForPopups, menuManager);
	graph = generateGraph();
}
 
开发者ID:apache,项目名称:incubator-taverna-workbench,代码行数:17,代码来源:GraphController.java


示例2: LocalExecution

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
/**
 * Constructs an Execution for executing Taverna workflows on a local
 * Taverna Dataflow Engine.
 * 
 * @param workflowBundle
 *            the <code>WorkflowBundle</code> containing the
 *            <code>Workflow</code>s required for execution
 * @param workflow
 *            the <code>Workflow</code> to execute
 * @param profile
 *            the <code>Profile</code> to use when executing the
 *            <code>Workflow</code>
 * @param dataBundle
 *            the <code>Bundle</code> containing the data values for the
 *            <code>Workflow</code>
 * @param referenceService
 *            the <code>ReferenceService</code> used to register inputs,
 *            outputs and intermediate values
 * @throws InvalidWorkflowException
 *             if the specified workflow is invalid
 */
public LocalExecution(WorkflowBundle workflowBundle, Workflow workflow,
		Profile profile, Bundle dataBundle,
		ReferenceService referenceService, Edits edits,
		ActivityService activityService,
		DispatchLayerService dispatchLayerService)
		throws InvalidWorkflowException {
	super(workflowBundle, workflow, profile, dataBundle);
	this.referenceService = referenceService;
	try {
		mapping = new WorkflowToDataflowMapper(workflowBundle, profile,
				edits, activityService, dispatchLayerService);
		Dataflow dataflow = mapping.getDataflow(workflow);
		for (DataflowInputPort dataflowInputPort : dataflow.getInputPorts())
			inputPorts.put(dataflowInputPort.getName(), dataflowInputPort);
		facade = edits.createWorkflowInstanceFacade(dataflow,
				createContext(), "");
		executionMonitor = new LocalExecutionMonitor(getWorkflowReport(),
				getDataBundle(), mapping, facade.getIdentifier());
	} catch (InvalidDataflowException e) {
		throw new InvalidWorkflowException(e);
	}
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:44,代码来源:LocalExecution.java


示例3: visit

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的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


示例4: parseRShell22WithReferences

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
@Test
public void parseRShell22WithReferences() throws Exception {
	URL wfResource = getClass().getResource(WF_RSHELL_2_2);
	assertNotNull("Could not find workflow " + WF_RSHELL_2_2, wfResource);
	WorkflowBundle bundle = parser
			.parseT2Flow(wfResource.openStream());
	Profile profile = bundle.getMainProfile();
	Processor proc = bundle.getMainWorkflow().getProcessors()
			.getByName("Rshell");
	assertNotNull(proc);
	Configuration config = scufl2Tools
			.configurationForActivityBoundToProcessor(proc, profile);
	assertNotNull(config);
	// TODO: Check data types defined (semantic types)
	
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:17,代码来源:TestActivityParsingRshell.java


示例5: setUp

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
/**
 * @throws java.lang.Exception
 */
@Before
public void setUp() throws Exception {
	workflow = new Workflow();
	mainWorkflow = new Workflow();
	profile = new Profile();
	mainProfile = new Profile();
	workflowBundle = new WorkflowBundle();
	workflowBundle.setMainProfile(mainProfile);
	workflowBundle.setMainWorkflow(mainWorkflow);
	executionService = new LocalExecutionService();
	executionEnvironment = new LocalExecutionEnvironment(executionService, null, null);

	dataBundle = DataBundles.createBundle();
	runProfile = new RunProfile(executionEnvironment, workflowBundle, workflow.getName(), profile.getName(), dataBundle);
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:19,代码来源:RunProfileTest.java


示例6: createCustomComponent

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
@Override
protected Component createCustomComponent() {
	Workflow workflow = (Workflow) getContextualSelection().getParent();
	Profile profile = workflow.getParent().getMainProfile();
	Port port = getSelectedPort();
	// Component component =
	// getContextualSelection().getRelativeToComponent();

	String label;
	if (port instanceof ReceiverPort) {
		label = CONNECT_WITH_OUTPUT_FROM;
	} else {
		label = CONNECT_AS_INPUT_TO;
	}
	JMenu connectMenu = new JMenu(new DummyAction(label,
			WorkbenchIcons.datalinkIcon));
	addPortMenuItems(workflow, port, connectMenu);
	addProcessorMenuItems(workflow, profile, port, connectMenu);
	return connectMenu;
}
 
开发者ID:apache,项目名称:incubator-taverna-workbench,代码行数:21,代码来源:AbstractConnectPortMenuActions.java


示例7: visitProfile

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
@Override
public void visitProfile(Profile bean) {
	Integer profilePosition = bean.getProfilePosition();
	
	if (profilePosition != null && profilePosition < 0)
		listener.negativeValue(bean, "profilePosition", profilePosition);
	if (checkComplete) {
		if (bean.getProcessorBindings() == null)
			listener.nullField(bean, "processorBindings");
		if (bean.getConfigurations() == null)
			listener.nullField(bean, "configurations");
		// It may be OK for the profilePosition to be null
		if (bean.getActivities() == null)
			listener.nullField(bean, "activities");
	}
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:17,代码来源:CorrectnessVisitor.java


示例8: fastaPscan

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
@Test
public void fastaPscan() throws Exception {
    URL wfResource = getClass().getResource(WF_FASTA_AND_PSCAN);
    assertNotNull("Could not find workflow " + WF_FASTA_AND_PSCAN,
            wfResource);
    T2FlowParser parser = new T2FlowParser();
    parser.setValidating(true);
    // parser.setStrict(true);
    WorkflowBundle wfBundle = parser.parseT2Flow(wfResource.openStream());

    Profile p = wfBundle.getMainProfile();
    for (Configuration c : p.getConfigurations()) {
        System.out.println(c.getConfigures());
        System.out.println(c.getJson());
    }
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:17,代码来源:TestFastaWorkflow.java


示例9: findActivity

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
protected Activity findActivity() {
	if (getContextualSelection() == null)
		return null;
	Object selection = getContextualSelection().getSelection();
	if (selection instanceof Activity) {
		Activity activity = (Activity) selection;
		if (activity.getType().equals(activityType))
			return activity;
	}
	if (selection instanceof Processor) {
		Processor processor = (Processor) selection;
		Profile profile = processor.getParent().getParent().getMainProfile();
		for (ProcessorBinding processorBinding : scufl2Tools.processorBindingsForProcessor(processor, profile))
			if (processorBinding.getBoundActivity().getType().equals(activityType))
				return processorBinding.getBoundActivity();
	}
	return null;
}
 
开发者ID:apache,项目名称:incubator-taverna-workbench,代码行数:19,代码来源:AbstractConfigureActivityMenuAction.java


示例10: processorPortBindingForPortInternal

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的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


示例11: serviceTypes

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
public Set<String> serviceTypes(String[] filepaths) throws ReaderException, IOException, WriterException {
	
	Set<String> types = new LinkedHashSet<String>();
	
	WorkflowBundleIO io = new WorkflowBundleIO();
	for (String filepath : filepaths) {
		File file = new File(filepath);
		// mediaType = null  --> guess
		WorkflowBundle wfBundle = io.readBundle(file, null);
		
		for (Profile profile : wfBundle.getProfiles()) {
			for (Activity activity : profile.getActivities()) {
				types.add(activity.getType().toASCIIString());
			}
		}			
	}
	return types;
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:19,代码来源:ServiceTypes.java


示例12: testCompletenessOfMissingProfilePosition

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
@Test
public void testCompletenessOfMissingProfilePosition() {
	// should be OK
	Profile profile = new Profile();
	profile.setProfilePosition(null);
	
	CorrectnessValidator cv = new CorrectnessValidator();
	ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
	
	cv.checkCorrectness(profile, true, rcvl);
	
	Set<NullFieldProblem> nullFieldProblems = rcvl.getNullFieldProblems();
	boolean problem = false;
	for (NullFieldProblem nlp : nullFieldProblems) {
		if (nlp.getBean().equals(profile) && nlp.getFieldName().equals("profilePosition")) {
			problem = true;
		}
	}
	assertFalse(problem);
	
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:22,代码来源:TestProfile.java


示例13: testCorrectnessOfInvalidProfilePosition

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
@Test
public void testCorrectnessOfInvalidProfilePosition() {
	Profile profile = new Profile();
	Integer profilePosition = Integer.valueOf(-3);
	profile.setProfilePosition(profilePosition);
	
	CorrectnessValidator cv = new CorrectnessValidator();
	ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
	
	cv.checkCorrectness(profile, false, rcvl);
	
	Set<NegativeValueProblem> negativeValueProblems = rcvl.getNegativeValueProblems();
	boolean problem = false;
	for (NegativeValueProblem nlp : negativeValueProblems) {
		if (nlp.getBean().equals(profile) && nlp.getFieldName().equals("profilePosition") && nlp.getFieldValue().equals(profilePosition)) {
			problem = true;
		}
	}
	assertTrue(problem);	
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:21,代码来源:TestProfile.java


示例14: testInScopeMainProfile

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
@Test
public void testInScopeMainProfile() {
	DummyWorkflowBundle dwb = new DummyWorkflowBundle();
	Profile profile = new Profile();
	dwb.setMainProfile(profile);
	NamedSet<Profile> profiles = new NamedSet<Profile>();
	dwb.setProfiles(profiles);
	profiles.add(profile);

	CorrectnessValidator cv = new CorrectnessValidator();
	ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
	
	cv.checkCorrectness(dwb, false, rcvl);
	
	Set<OutOfScopeValueProblem> outOfScopeValueProblems = rcvl.getOutOfScopeValueProblems();
	
	boolean problem = false;
	for (OutOfScopeValueProblem nlp : outOfScopeValueProblems) {
		if (nlp.getBean().equals(dwb) && nlp.getFieldName().equals("mainProfile") && nlp.getValue().equals(profile)) {
			problem = true;
		}
	}
	assertFalse(problem);

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


示例15: testCorrectnessOfOutOfScopeBoundProcessor1

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
@Test
public void testCorrectnessOfOutOfScopeBoundProcessor1() {
	WorkflowBundle wb = new WorkflowBundle();
	Profile profile = new Profile();
	profile.setParent(wb);
	ProcessorBinding pb = new ProcessorBinding();
	Processor orphanProcessor = new Processor();
	pb.setBoundProcessor(orphanProcessor);
	pb.setParent(profile);
	CorrectnessValidator cv = new CorrectnessValidator();
	ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
	
	cv.checkCorrectness(pb, false, rcvl);
	
	Set<OutOfScopeValueProblem> outOfScopeValueProblems = rcvl.getOutOfScopeValueProblems();
	assertFalse(outOfScopeValueProblems.isEmpty());
	boolean problem = false;
	for (OutOfScopeValueProblem nlp : outOfScopeValueProblems) {
		if (nlp.getBean().equals(pb) && nlp.getFieldName().equals("boundProcessor") && nlp.getValue().equals(orphanProcessor)) {
			problem = true;
		}
	}
	assertTrue(problem);	
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:25,代码来源:TestProcessorBinding.java


示例16: testCorrectnessOfInScopeBoundActivity1

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
@Test
public void testCorrectnessOfInScopeBoundActivity1() {
	// Test when in same profile
	WorkflowBundle wb = new WorkflowBundle();
	Profile profile = new Profile();
	profile.setParent(wb);
	ProcessorBinding pb = new ProcessorBinding();
	Activity activity = new Activity();
	activity.setParent(profile); 
	pb.setBoundActivity(activity);
	pb.setParent(profile);
	CorrectnessValidator cv = new CorrectnessValidator();
	ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener();
	
	cv.checkCorrectness(pb, false, rcvl);
	
	Set<OutOfScopeValueProblem> outOfScopeValueProblems = rcvl.getOutOfScopeValueProblems();
	boolean problem = false;
	for (OutOfScopeValueProblem nlp : outOfScopeValueProblems) {
		if (nlp.getBean().equals(pb) && nlp.getFieldName().equals("boundActivity") && nlp.getValue().equals(activity)) {
			problem = true;
		}
	}
	assertFalse(problem);	
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:26,代码来源:TestProcessorBinding.java


示例17: configurationNotAddedTwice

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
/**
 * Similar bug to {@link DataLinkCompareTest#dataLinkNotAddedTwice()}
 */
@Test
public void configurationNotAddedTwice() throws Exception {
	Configuration c1a = new Configuration("c1");
	Profile p1 = new Profile("p1");
	p1.getConfigurations().add(c1a);		
	c1a.setParent(p1);
	p1.getConfigurations().add(c1a);
	
	
	Configuration c1b = new Configuration("c1");
	Profile p2 = new Profile("p2");
	p2.getConfigurations().add(c1b);		
	c1b.setParent(p2);
	p2.getConfigurations().add(c1b);
	
	
	WorkflowBundle bundle = new WorkflowBundle();
	p1.setParent(bundle);
	p2.setParent(bundle);
	new Scufl2Tools().setParents(bundle);
	assertEquals(1, p1.getConfigurations().size());
	assertEquals(1, p2.getConfigurations().size());
	
}
 
开发者ID:apache,项目名称:incubator-taverna-language,代码行数:28,代码来源:ConfigurationTest.java


示例18: update

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
/** @see #update(Workflow) */
	private void update(Workflow workflow, Profile profile) {
		boolean first = true;
		for (final Workflow workflowItem : getPath(
				new NamedSet<>(profile.getActivities()), workflow, profile)) {
			JButton button = new JButton(workflowItem.getName());
//				button.setBorder(null);
			button.addActionListener(new ActionListener() {
				@Override
				public void actionPerformed(ActionEvent e) {
					selectionManager.setSelectedWorkflow(workflowItem);
				}
			});
			if (!first)
				add(new JLabel(">"));
			first = false;
			add(button);
		}
	}
 
开发者ID:apache,项目名称:incubator-taverna-workbench,代码行数:20,代码来源:WorkflowSelectorComponent.java


示例19: createProcessorFromActivity

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的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


示例20: createActivityFromProcessor

import org.apache.taverna.scufl2.api.profiles.Profile; //导入依赖的package包/类
@Test
public void createActivityFromProcessor() 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);	

	Profile profile = new Profile();
	Activity a = scufl2Tools.createActivityFromProcessor(p, profile);
	
	assertEquals(profile, a.getParent());
	ProcessorBinding binding = scufl2Tools.processorBindingForProcessor(p, profile);
	
	assertEquals(2, a.getInputPorts().size());
	assertEquals(3, a.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,代码行数:27,代码来源:TestScufl2Tools.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Koan类代码示例发布时间:2022-05-23
下一篇:
Java RMSecretManagerService类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap