Project

General

Profile

« Previous | Next » 

Revision 4039

include changes to the first/metacat integration project
merging/union across multiple datapackages now supported

View differences:

lib/style/skins/first/assessmentQuery.jsp
1 1
<%@page 
2 2
import="java.sql.ResultSet"%><%@page 
3
import="edu.ucsb.nceas.first.metacat.client.AssessmentQuery"%><%@page 
3
import="edu.ucsb.nceas.first.metacat.client.AssessmentQuery"%><%@page
4
import="edu.ucsb.nceas.utilities.OrderedMap"%><%@page 
4 5
import="au.com.bytecode.opencsv.CSVWriter"%><%@page 
5 6
import="java.util.*"%><%@page 
6 7
import="java.io.*"%><%
......
13 14

  
14 15
	List assessmentDocIds = Arrays.asList(docids);
15 16
	
17
	//the "columns" to extract from the metadata document (will be param soon)
18
	Map attributeMap = new OrderedMap();
19
	attributeMap.put("id", "//@packageId");
20
	attributeMap.put("title", "//assessment/@title");
21
	attributeMap.put("duration", "//assessment/duration");
22
	attributeMap.put("badColumn", "//does/not/exist");
23
	attributeMap.put("item", "//assessmentItems/assessmentItem/assessmentItemId");
24
	
16 25
	//make a title
17 26
	String tableTitle = "Showing data for ";
18 27
	String fileName = "results-";
......
31 40
		rs = AssessmentQuery.selectResponseData(assessmentDocIds, questionId, "=", new Integer(1));
32 41
	}
33 42
	else {
34
		rs = AssessmentQuery.selectMergedResponseData(assessmentDocIds);
43
		rs = AssessmentQuery.selectMergedResponseData(assessmentDocIds, attributeMap);
35 44
	}
36 45
	
37 46
	if (rs == null) {

Also available in: Unified diff