Definition at line 14 of file JetWebGeneratorReader.java.
Public Member Functions | |
JetWebGeneratorReader (String filename) throws JetWebException, JetWebXMLException | |
GeneratorWrapper | getGeneratorWrapper () throws JetWebException |
Generator | getGenerator () throws JetWebException |
void | fillLog (LogFile log) throws JetWebException |
Static Public Member Functions | |
void | main (String args[]) |
Protected Member Functions | |
Document | getDocument () |
String | getFileName () |
Protected Attributes | |
RunSeries | runSeries_ = null |
Static Protected Attributes | |
final String | NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces" |
final String | VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation" |
final String | SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema" |
final String | SCHEMA_FULL_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking" |
final String | DYNAMIC_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/dynamic" |
final String | LOAD_EXTERNAL_DTD_FEATURE_ID = "http://apache.org/xml/features/nonvalidating/load-external-dtd" |
final String | DEFAULT_PARSER_NAME = "org.apache.xerces.parsers.SAXParser" |
final boolean | DEFAULT_NAMESPACES = true |
final boolean | DEFAULT_VALIDATION = false |
final boolean | DEFAULT_LOAD_EXTERNAL_DTD = true |
final boolean | DEFAULT_SCHEMA_VALIDATION = false |
final boolean | DEFAULT_SCHEMA_FULL_CHECKING = false |
final boolean | DEFAULT_DYNAMIC_VALIDATION = false |
final boolean | DEFAULT_CANONICAL = false |
Package Attributes | |
GeneratorWrapper | genWrapper = null |
Generator | generator_ |
|
Instantiate a new GeneratorReader from the given logfile
Definition at line 24 of file JetWebGeneratorReader.java. 00026 { 00027 super(filename); 00028 System.out.println("Making the log file"); 00029 LogFile log = new LogFile(filename); 00030 System.out.println("log file made"); 00031 this.fillLog(log); 00032 System.out.println("log file filled"); 00033 }
|
|
Populates LogFile from an xml file containing hepdata element. This replaces the "findParms" method on LogFile which populated the LogFile from the job printout. Definition at line 155 of file JetWebLogReader.java. References RunSeries.addRun(), JetWebLogReader.fillRun(), RunSeries.getCrossSection(), JetWebXMLReader.getDocument(), JetWebXMLReader.getFileName(), RunSeries.getLumi(), JetWebLogReader.hepml, JetWebLogReader.HEPML, JetWebLogReader.logfile, JetWebLogReader.ns, JetWebLogReader.REACTION, JetWebLogReader.RUN, JetWebLogReader.RUNSERIES, JetWebLogReader.runSeries_, RunSeries.setCrossSection(), RunSeries.setLumi(), and ResultSearchPattern.setSoftDefaults(). Referenced by FileUploader.doModelUpload(), JobUtils.getLogFiles(), JobUtils.getNewData(), and JetWebLogReader.main(). 00155 { 00156 00157 try { 00158 logfile = log; 00159 logfile.setValid(false); 00160 runSeries_ = logfile.getRunSeries(); 00161 if (runSeries_==null) { 00162 System.out.println 00163 ("JetWebLogReader.fillLog: LogFile contains null runSeries"); 00164 runSeries_ = new RunSeries(); 00165 logfile.setRunSeries(runSeries_); 00166 }else{ 00167 System.out.println 00168 ("JetWebLogReader.fillLog: LogFile already contains a runSeries"); 00169 } 00170 00171 Element root = getDocument().getRootElement(); 00172 00173 if(root.getName().equals(HEPML)){ 00174 hepml = root; 00175 } else { 00176 //hepdata = root.getChild(HEPDATA,ns); 00177 hepml = root.getChild(HEPML, ns); 00178 if (hepml==null){ 00179 throw new JetWebXMLException 00180 ("XML LogReader cannot find " 00181 +HEPML+" in "+root.getName(),getFileName()); 00182 // +HEPDATA+" in "+root.getName(),getFileName()); 00183 } 00184 } 00185 00186 List<Element> runs = null;//new List<Element>(); 00187 Element runSeries = null; 00188 Element reaction = null; 00189 00190 try{ 00191 reaction = hepml.getChild(REACTION, ns); 00192 //reaction = (Element)hepml.getChildren().get(0); 00193 }catch (Exception e){ 00194 throw new JetWebXMLException 00195 ("XML LogReader cannot find "+REACTION 00196 +" in "+root.getName(),getFileName()); 00197 } 00198 00199 try{ 00200 runSeries = hepml.getChild(RUNSERIES, ns); 00201 }catch (Exception e){ 00202 throw new JetWebXMLException 00203 ("XML LogReader cannot find "+RUNSERIES 00204 +" in "+root.getName(),getFileName()); 00205 } 00206 00207 try{ 00208 runs = runSeries.getChildren(RUN, ns); 00209 System.out.println 00210 ("JetWebLogReader: found " + runs.size() +" runs"); 00211 }catch (Exception e){ 00212 00213 throw new JetWebXMLException 00214 ("XML LogReader cannot find "+RUN 00215 +" in "+root.getName(),getFileName()); 00216 } 00217 00218 for(int ii=0; ii!= runs.size(); ++ii){ 00219 runSeries_.addRun(fillRun(reaction, runs.get(ii))); 00220 } 00221 runSeries_.setSoftDefaults(); 00222 // at this stage only the current log lumi is here. 00223 logfile.setLumi(runSeries_.getLumi()); 00224 logfile.setCrossSection(runSeries_.getCrossSection()); 00225 00226 logfile.doChecks(); 00227 00228 //make sure LogReader xml file and Logfile xml file are same 00229 if (!this.getFileName().equals(logfile.getXmlFileName())){ 00230 System.out.println 00231 ("LogReader Warning: xmlfile "+this.getFileName() 00232 + " different from logfile xmlfile " + 00233 logfile.getXmlFileName() + 00234 " changing logfile version"); 00235 logfile.setXmlFile(this.getFileName()); 00236 } 00237 00238 } catch (JetWebException jwe) { 00239 System.out.println 00240 ("JetWebLogReader: Problem reading "+log.getFile()); 00241 System.out.println(jwe.getMessage()); 00242 jwe.printStackTrace(System.out); 00243 logfile.setValid(false); 00244 logfile.setStatus(LogFile.ERROR); 00245 } 00246 }
|
|
Definition at line 365 of file JetWebXMLReader.java. Referenced by JetWebLogReader.fillLog(), and JetWebPlotMLReader.populateSoloPlot(). 00365 { 00366 //if (doc==null) throw new JetWebXMLException("XML Reader not initialised: Document is null",null); 00367 return doc; 00368 }
|
|
Definition at line 369 of file JetWebXMLReader.java. Referenced by JetWebLogReader.fillLog(). 00369 { 00370 //if (filename==null) throw new JetWebXMLException("XML Reader not initialised: No Filename provided",null); 00371 return filename; 00372 }
|
|
Definition at line 60 of file JetWebGeneratorReader.java. References JetWebGeneratorReader.generator_, and RunSeries.getGenerator(). 00061 { 00062 00063 // fillGenerator(); 00064 00065 generator_ = runSeries_.getGenerator(); 00066 00067 return(generator_); 00068 }
|
|
Definition at line 41 of file JetWebGeneratorReader.java. References JetWebGeneratorReader.generator_, JetWebGeneratorReader.genWrapper, and RunSeries.getGenerator(). Referenced by FileUploader.doDefaultsXMLUpload(), and GenDefaults.main(). 00042 { 00043 00044 //fillGenerator(); 00045 00046 generator_ = runSeries_.getGenerator(); 00047 00048 if(genWrapper==null){ 00049 genWrapper = new GeneratorWrapper(generator_); 00050 } 00051 00052 return(genWrapper); 00053 }
|
|
test main method args[0] : xml filename Definition at line 111 of file JetWebLogReader.java. References JetWebLogReader.fillLog(), and JetWebLogReader.JetWebLogReader(). 00111 { 00112 if (args[0]==null){ 00113 System.out.println("Please give xml doc URI"); 00114 return; 00115 } 00116 00117 00118 try { 00119 System.out.println("Converting to JDOM.."); 00120 JetWebLogReader reader = new JetWebLogReader(args[0]); 00121 LogFile log = new LogFile(args[0]); 00122 reader.fillLog(log); 00123 System.out.println(log.toString()); 00124 00125 00126 } catch (Throwable t) { 00127 System.err.println("Error reading XML"); 00128 System.err.println(t.toString()); 00129 } 00130 }
|
|
Default canonical output (false). Definition at line 65 of file JetWebXMLReader.java. |
|
Default dynamic validation support (false). Definition at line 62 of file JetWebXMLReader.java. |
|
Default load external DTD (true). Definition at line 53 of file JetWebXMLReader.java. |
|
Default namespaces support (true). Definition at line 47 of file JetWebXMLReader.java. |
|
Default parser name. Definition at line 44 of file JetWebXMLReader.java. |
|
Default Schema full checking support (false). Definition at line 59 of file JetWebXMLReader.java. |
|
Default Schema validation support (false). Definition at line 56 of file JetWebXMLReader.java. |
|
Default validation support (false). Definition at line 50 of file JetWebXMLReader.java. |
|
Dynamic validation feature id (http://apache.org/xml/features/validation/dynamic). Definition at line 36 of file JetWebXMLReader.java. |
|
Definition at line 17 of file JetWebGeneratorReader.java. Referenced by JetWebGeneratorReader.getGenerator(), and JetWebGeneratorReader.getGeneratorWrapper(). |
|
Definition at line 16 of file JetWebGeneratorReader.java. Referenced by JetWebGeneratorReader.getGeneratorWrapper(). |
|
Load external DTD feature id (http://apache.org/xml/features/nonvalidating/load-external-dtd). Definition at line 39 of file JetWebXMLReader.java. |
|
Namespaces feature id (http://xml.org/sax/features/namespaces). Definition at line 24 of file JetWebXMLReader.java. |
|
Definition at line 35 of file JetWebLogReader.java. Referenced by JetWebLogReader.fillLog(). |
|
Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). Definition at line 33 of file JetWebXMLReader.java. |
|
Schema validation feature id (http://apache.org/xml/features/validation/schema). Definition at line 30 of file JetWebXMLReader.java. |
|
Validation feature id (http://xml.org/sax/features/validation). Definition at line 27 of file JetWebXMLReader.java. |
Generated Wed Jan 17 09:14:27 GMT 2007