Definition at line 39 of file PaperBank.java.
Static Public Member Functions | |
Collection< Paper > | getPapers (String accelerator) |
Collection< Paper > | getPapers (MCProcessType proc) throws JetWebException |
Collection< Paper > | getPapers (Collision coll) throws JetWebException |
Paper | getPaper (DataPlot plot) throws JetWebException |
Collection< Paper > | getPapers () |
Collection< RealPaper > | getRealPapers () |
int | getNPapers () |
Collection< RealPlot > | getAllPlots () |
Collection< RealPlot > | getPlots (Collision coll) throws JetWebException |
Collection< RealPlot > | getPlots (MCProcessType proc) throws JetWebException |
void | getConfig () throws JetWebException |
void | mkdirs (File xmldir) |
void | rmdirs (File dir) |
Paper | getPaper (int id) |
RealPlot | getPlot (int plotId) |
Static Private Attributes | |
Hashtable< Integer, Paper > | papers |
Hashtable< Integer, RealPaper > | realPapers_ |
Hashtable< Integer, RealPlot > | plots = new Hashtable<IntegerRealPlot>() |
|
Return a Collection containing all the plots of all the papers. Probably should use a Collection?
Definition at line 118 of file PaperBank.java. References PaperBank.plots. 00118 { 00119 return plots.values(); 00120 }
|
|
Initialise the PaperBank database.
Definition at line 157 of file PaperBank.java. References PaperBank.papers, PaperBank.plots, and PaperBank.realPapers_. 00157 { 00158 if (papers.size()>0) { 00159 System.out.println("Already initialised paperBank"); 00160 return; 00161 } 00162 00163 for (Paper paper : DBPlotManager.getPapers()){ 00164 papers.put(paper.getId(),paper); 00165 // Now fill the Hashtable of plots. 00166 for (DataPlot plot : paper.getPlots()){ 00167 plots.put(new Integer(plot.getId()),(RealPlot)plot); 00168 } 00169 } 00170 00171 for(RealPaper paper: DBPlotManager.getRealPapers()){ 00172 realPapers_.put(paper.getId(), paper); 00173 for(RealPlot plot: paper.getPlots()){ 00174 plots.put(new Integer(plot.getId()), plot); 00175 } 00176 } 00177 00178 }
|
|
Return the number of papers Definition at line 109 of file PaperBank.java. References PaperBank.papers. 00109 { 00110 return papers.size(); 00111 }
|
|
Return the Data Paper which matches any Paper sent (with Real or MC data).
Definition at line 217 of file PaperBank.java. References PaperBank.papers. 00217 { 00218 return papers.get(id); 00219 }
|
|
Get the paper to which the plot belongs Definition at line 85 of file PaperBank.java. References PaperBank.papers. 00085 { 00086 for (Paper paper : papers.values()){ 00087 if (paper.getPlots().contains(plot)) { 00088 return paper; 00089 } 00090 } 00091 throw new JetWebException("PaperBank: no paper found for plot",plot.toString()); 00092 }
|
|
Return a Collection containing all the Papers.
Definition at line 98 of file PaperBank.java. References PaperBank.papers. 00098 { 00099 return papers.values(); 00100 }
|
|
Get papers for a given collision Definition at line 73 of file PaperBank.java. References PaperBank.papers. 00073 { 00074 Collection<Paper> cPapers = new Vector<Paper>(); 00075 for (Paper paper : papers.values()){ 00076 if (paper.containsDataFor(coll)) { 00077 cPapers.add(paper); 00078 } 00079 } 00080 return cPapers; 00081 }
|
|
Get papers for a given processType Definition at line 62 of file PaperBank.java. References PaperBank.papers. 00062 { 00063 Collection<Paper> procPapers = new Vector<Paper>(); 00064 for (Paper paper : papers.values()){ 00065 if (paper.containsDataFor(proc)) { 00066 procPapers.add(paper); 00067 } 00068 } 00069 return procPapers; 00070 }
|
|
Get papers for a given accelerator Definition at line 51 of file PaperBank.java. References PaperBank.papers. 00051 { 00052 Collection<Paper> accPapers = new Vector<Paper>(); 00053 for (Paper paper : papers.values()){ 00054 if (paper.getAccelerator().equalsIgnoreCase(accelerator)) { 00055 accPapers.add(paper); 00056 } 00057 } 00058 return accPapers; 00059 }
|
|
Return the RealPlot with the given Id. Definition at line 224 of file PaperBank.java. References PaperBank.plots. 00224 { 00225 return plots.get(plotId); 00226 }
|
|
Return a Collection containing all the plots of all the papers which are relevant to proc.
Definition at line 141 of file PaperBank.java. References Paper.add(), and PaperBank.plots. 00141 { 00142 Collection<RealPlot> list = new Vector<RealPlot>(); 00143 for (RealPlot plot : plots.values()){ 00144 if (plot.getMCProcessType().getId()==proc.getId()){ 00145 list.add(plot); 00146 } 00147 } 00148 return list; 00149 }
|
|
Return a Collection containing all the plots of all the papers relevant to coll.
Definition at line 126 of file PaperBank.java. References Paper.add(), and PaperBank.plots. 00126 { 00127 00128 Collection<RealPlot> list = new Vector<RealPlot>(); 00129 for (RealPlot plot : plots.values()){ 00130 if (plot.getMCProcessType().getCollision().getId()==coll.getId()){ 00131 list.add(plot); 00132 } 00133 } 00134 return list; 00135 }
|
|
Definition at line 102 of file PaperBank.java. References PaperBank.realPapers_. 00102 { 00103 return realPapers_.values(); 00104 }
|
|
Make subdirectories for all papers in the directory specified
Definition at line 186 of file PaperBank.java. References Paper.getDirName(), and PaperBank.papers. 00186 { 00187 00188 if (!xmldir.isDirectory()) { return; } 00189 00190 for (Paper p : papers.values()){ 00191 String name = p.getDirName(); 00192 File dir = new File(xmldir.getPath()+"/"+name); 00193 dir.mkdir(); 00194 } 00195 }
|
|
Delete subdirectories and contents of specified directory
Definition at line 201 of file PaperBank.java. 00201 { 00202 try { 00203 FileUtils.deleteDirectory(dir); 00204 } catch (IOException e) { 00205 System.out.println(e); 00206 } 00207 }
|
|
Initial value:
new Hashtable<IntegerPaper>()
Definition at line 41 of file PaperBank.java. Referenced by PaperBank.getConfig(), PaperBank.getNPapers(), PaperBank.getPaper(), PaperBank.getPapers(), and PaperBank.mkdirs(). |
|
Definition at line 47 of file PaperBank.java. Referenced by PaperBank.getAllPlots(), PaperBank.getConfig(), PaperBank.getPlot(), and PaperBank.getPlots(). |
|
Initial value:
new Hashtable<Integer RealPaper>()
Definition at line 44 of file PaperBank.java. Referenced by PaperBank.getConfig(), and PaperBank.getRealPapers(). |
Generated Wed Jan 17 09:14:27 GMT 2007