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


Java WorkflowReport类代码示例

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


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

示例1: generateWorkflowReport

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
public WorkflowReport generateWorkflowReport(Workflow workflow) {
	WorkflowReport workflowReport = createWorkflowReport(workflow);
	for (Processor processor : workflow.getProcessors()) {
		ProcessorReport processorReport = createProcessorReport(processor);
		processorReport.setParentReport(workflowReport);
		workflowReport.addProcessorReport(processorReport);
		for (ProcessorBinding processorBinding : scufl2Tools.processorBindingsForProcessor(
				processor, profile)) {
			Activity boundActivity = processorBinding.getBoundActivity();
			ActivityReport activityReport = createActivityReport(boundActivity);
			activityReport.setParentReport(processorReport);
			if (scufl2Tools.containsNestedWorkflow(processor, profile)) {
				Workflow nestedWorkflow = scufl2Tools.nestedWorkflowForProcessor(processor,
						profile);
				WorkflowReport nestedWorkflowReport = generateWorkflowReport(nestedWorkflow);
				nestedWorkflowReport.setParentReport(activityReport);
				activityReport.setNestedWorkflowReport(nestedWorkflowReport);
			}
			processorReport.addActivityReport(activityReport);
		}
	}
	return workflowReport;
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:24,代码来源:AbstractExecution.java

示例2: parseWorkflowReport

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
protected WorkflowReport parseWorkflowReport(JsonNode reportJson,
		Path workflowReportJson, ActivityReport actReport,
		WorkflowBundle workflowBundle) throws ParseException {
	Workflow wf = (Workflow) getSubject(reportJson, workflowBundle);
	WorkflowReport workflowReport = new WorkflowReport(wf);
	workflowReport.setParentReport(actReport);

	parseDates(reportJson, workflowReport);

	for (JsonNode invocJson : reportJson.path("invocations"))
		// NOTE: Invocation constructor will add to parents
		parseInvocation(invocJson, workflowReportJson, workflowReport);

	for (JsonNode procJson : reportJson.path("processorReports")) {
		ProcessorReport procReport = parseProcessorReport(procJson,
				workflowReportJson, workflowReport, workflowBundle);
		workflowReport.addProcessorReport(procReport);
	}
	return workflowReport;
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:21,代码来源:WorkflowReportJSON.java

示例3: parseProcessorReport

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
protected ProcessorReport parseProcessorReport(JsonNode reportJson,
		Path workflowReportJson, WorkflowReport workflowReport,
		WorkflowBundle workflowBundle) throws ParseException {
	Processor p = (Processor) getSubject(reportJson, workflowBundle);
	ProcessorReport procReport = new ProcessorReport(p);
	procReport.setParentReport(workflowReport);

	procReport.setJobsQueued(reportJson.path("jobsQueued").asInt());
	procReport.setJobsStarted(reportJson.path("jobsStarted").asInt());
	procReport.setJobsCompleted(reportJson.path("jobsCompleted").asInt());
	procReport.setJobsCompletedWithErrors(reportJson.path(
			"jobsCompletedWithErrors").asInt());
	// TODO: procReport properties

	parseDates(reportJson, procReport);

	for (JsonNode invocJson : reportJson.path("invocations"))
		parseInvocation(invocJson, workflowReportJson, procReport);

	for (JsonNode actJson : reportJson.path("activityReports")) {
		ActivityReport activityReport = parseActivityReport(actJson,
				workflowReportJson, procReport, workflowBundle);
		procReport.addActivityReport(activityReport);
	}
	return procReport;
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:27,代码来源:WorkflowReportJSON.java

示例4: getTreeCellRendererComponent

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
@Override
public Component getTreeCellRendererComponent(JTree tree, Object value,
		boolean sel, boolean expanded, boolean leaf, int row,
		boolean hasFocus) {
	Component result = super.getTreeCellRendererComponent(tree, value, sel,
			expanded, leaf, row, hasFocus);

	Object userObject = ((DefaultMutableTreeNode) value).getUserObject();

	WorkflowRunProgressTreeCellRenderer renderer = (WorkflowRunProgressTreeCellRenderer) result;

	if (userObject instanceof WorkflowReport) // the root node
		renderWorkflowReport(renderer, (WorkflowReport) userObject);
	else if (userObject instanceof ProcessorReport)
		renderProcessorReport(renderer, (ProcessorReport) userObject);

	return result;
}
 
开发者ID:apache,项目名称:incubator-taverna-workbench,代码行数:19,代码来源:WorkflowRunProgressTreeCellRenderer.java

示例5: showProcessorResults

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
private void showProcessorResults(Processor processor) throws InvalidRunIdException {
	if (!processorResults.containsKey(workflowRun))
		processorResults.put(workflowRun, new HashMap<Processor, ReportView>());
	Map<Processor, ReportView> components = processorResults.get(workflowRun);
	if (!components.containsKey(processor)) {
		WorkflowReport workflowReport = runService.getWorkflowReport(workflowRun);
		ProcessorReport processorReport = findProcessorReport(workflowReport, processor);
		ReportView reportView = new ReportView(processorReport, rendererRegistry,
				saveAllResultsSPIs, saveIndividualResultSPIs);
		components.put(processor, reportView);
		add(reportView, String.valueOf(reportView.hashCode()));
	}
	updatableComponent = components.get(processor);
	cardLayout.show(this, String.valueOf(updatableComponent.hashCode()));
	update();
}
 
开发者ID:apache,项目名称:incubator-taverna-workbench,代码行数:17,代码来源:ResultsComponent.java

示例6: workflowFinished

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
private boolean workflowFinished(WorkflowReport report) {
	State state = report.getState();
	if (state == State.CANCELLED || state == State.COMPLETED || state == State.FAILED) {
		return true;
	}
	return false;
}
 
开发者ID:apache,项目名称:incubator-taverna-commandline,代码行数:8,代码来源:CommandLineTool.java

示例7: LocalExecutionMonitor

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
public LocalExecutionMonitor(WorkflowReport workflowReport,
		Bundle dataBundle, WorkflowToDataflowMapper mapping, String facadeId)
		throws InvalidWorkflowException {
	this.dataBundle = dataBundle;
	this.facadeId = facadeId;
	reports = new HashMap<>();
	invocations = new HashMap<>();
	invocationToActivity = new HashMap<>();
	referenceToPath = new HashMap<>();
	mapReports("", workflowReport, mapping);
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:12,代码来源:LocalExecutionMonitor.java

示例8: mapReports

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
private void mapReports(String id, WorkflowReport workflowReport,
		WorkflowToDataflowMapper mapping) throws InvalidWorkflowException {
	Dataflow dataflow = mapping.getDataflow(workflowReport.getSubject());
	String dataflowId = null;
	if (id.isEmpty()) {
		dataflowId = dataflow.getLocalName();
	} else {
		dataflowId = id + ID_SEPARATOR + dataflow.getLocalName();
	}
	reports.put(dataflowId, workflowReport);
	for (ProcessorReport processorReport : workflowReport
			.getProcessorReports()) {
		Processor processor = mapping.getDataflowProcessor(processorReport
				.getSubject());
		String processorId = dataflowId + ID_SEPARATOR
				+ processor.getLocalName();
		reports.put(processorId, (LocalProcessorReport) processorReport);
		for (ActivityReport activityReport : processorReport
				.getActivityReports()) {
			Activity<?> activity = mapping
					.getDataflowActivity(activityReport.getSubject());
			String activityId = processorId + ID_SEPARATOR
					+ activity.hashCode();
			reports.put(activityId, activityReport);
			WorkflowReport nestedWorkflowReport = activityReport
					.getNestedWorkflowReport();
			if (nestedWorkflowReport != null)
				mapReports(activityId, nestedWorkflowReport, mapping);
		}
	}
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:32,代码来源:LocalExecutionMonitor.java

示例9: waitForResult

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
@SuppressWarnings("unused")
private void waitForResult(Map<String, Object> results, String port, WorkflowReport report)
		throws InterruptedException {
	int wait = 0;
	while (!results.containsKey(port) && wait++ < 10) {
		System.out.println(report);
		Thread.sleep(500);
	}
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:10,代码来源:LocalExecutionTest.java

示例10: setUp

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
/**
 * @throws java.lang.Exception
 */
@Before
public void setUp() throws Exception {
	workflowBundle = new WorkflowBundle();
	workflow = new Workflow();
	profile = new Profile();
	dataBundle = DataBundles.createBundle();
	execution = new AbstractExecution(workflowBundle, workflow, profile, dataBundle) {
		@Override
		public void start() {}
		@Override
		public void resume() {}
		@Override
		public void pause() {}
		@Override
		public void cancel() {}
		@Override
		public void delete() {}
		@Override
		protected WorkflowReport createWorkflowReport(Workflow workflow) {
			return new WorkflowReport(workflow) {
			};
		}
		@Override
		public ProcessorReport createProcessorReport(Processor processor) {
			return null;
		}
		@Override
		public ActivityReport createActivityReport(Activity activity) {
			return null;
		}
	};
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:36,代码来源:AbstractExecutionTest.java

示例11: save

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
public void save(WorkflowReport wfReport, Path path) throws IOException {
	ObjectMapper om = makeObjectMapperForSave();
	try (Writer w = newBufferedWriter(path, Charset.forName("UTF-8"),
			WRITE, CREATE, TRUNCATE_EXISTING)) {
		om.writeValue(w, wfReport);
	}
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:8,代码来源:WorkflowReportJSON.java

示例12: load

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
public WorkflowReport load(Path workflowReportJson,
		WorkflowBundle workflowBundle) throws IOException, ParseException {
	JsonNode json = loadWorkflowReportJson(workflowReportJson);
	if (!json.isObject())
		throw new IOException(
				"Invalid workflow report, expected JSON Object:\n" + json);
	return parseWorkflowReport(json, workflowReportJson, null,
			workflowBundle);
}
 
开发者ID:apache,项目名称:incubator-taverna-engine,代码行数:10,代码来源:WorkflowReportJSON.java

示例13: getListCellRendererComponent

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
@Override
public Component getListCellRendererComponent(JList<? extends String> list, String value,
		int index, boolean isSelected, boolean cellHasFocus) {
	try {
		WorkflowReport workflowReport = runService.getWorkflowReport(value);
		setText(workflowReport.getSubject().getName() + " "
				+ ISO_8601.format(workflowReport.getCreatedDate()));
	} catch (InvalidRunIdException e) {
		setText(value);
	}
	return this;
}
 
开发者ID:apache,项目名称:incubator-taverna-workbench,代码行数:13,代码来源:WorkflowRunListCellRenderer.java

示例14: addWorkflowRun

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
public void addWorkflowRun(String workflowRun) throws InvalidRunIdException {
	WorkflowReport workflowReport = runService
			.getWorkflowReport(workflowRun);
	WorkflowRunProgressTreeTableModel newTableModel = new WorkflowRunProgressTreeTableModel(
			workflowReport);
	WorkflowRunProgressTreeTable newTable = new WorkflowRunProgressTreeTable(
			newTableModel, activityIconManager,
			selectionManager.getWorkflowRunSelectionModel(workflowRun));

	add(new JScrollPane(newTable), String.valueOf(newTable.hashCode()));
	tableMap.put(workflowRun, newTable);
	tableModelMap.put(workflowRun, newTableModel);
}
 
开发者ID:apache,项目名称:incubator-taverna-workbench,代码行数:14,代码来源:TableMonitorComponent.java

示例15: GraphMonitor

import org.apache.taverna.platform.report.WorkflowReport; //导入依赖的package包/类
public GraphMonitor(GraphController graphController,
		WorkflowReport workflowReport) {
	this.graphController = graphController;
	this.workflowReport = workflowReport;
	createMonitorNodes(workflowReport.getSubject().getName(),
			workflowReport);
	redraw();
}
 
开发者ID:apache,项目名称:incubator-taverna-workbench,代码行数:9,代码来源:GraphMonitor.java


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