/** * Written by: * Jun Peng (junpeng@stanford.edu) * Kincho Law (law@stanford.edu) * ---------------------------------- * ReportGenDB defines the functions for generating engineering report. * Data are saved in MySQL database. */ import java.sql.*; import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; public class DBDataRetrieval extends HttpServlet { DBMapping theMap = new DBMapping(); /* Depends on the user's choice, we will take different action to * display a portion of the project-related data. */ public void handleGenReport(String project, String category, PrintWriter out) { if (category.equals("summary")) { theMap.getSummary(project, out); } else if (category.equals("scope")) { theMap.getScope(project, out); } else if (category.equals("setupoverview")) { theMap.getSetupOverview(project, out); } else if (category.equals("infrastructure")) { theMap.getInfrastructure(project, out); } else if (category.equals("specimen")) { theMap.getSpecimen(project, out); } else if (category.equals("loading")) { theMap.getLoading(project, out); } else if (category.equals("instrumentation")) { theMap.getInstrumentation(project, out); } else if (category.equals("schedule")) { theMap.getSchedule(project, out); } else if (category.equals("results")) { theMap.getResults(project, out); } else if (category.equals("dataprocessing")) { theMap.getDataProcessing(project, out); } else if (category.equals("predications")) { theMap.getPredications(project, out); } } public void genReport(PrintWriter out) { out.println("
\n" + "