jetweb is hosted by Hepforge, IPPP Durham

cedar.jetweb.html
Class HTMLPlotWriter

java.lang.Object
  extended by cedar.jetweb.html.HTMLWriter
      extended by cedar.jetweb.html.HTMLPlotWriter

public class HTMLPlotWriter
extends HTMLWriter

A class containg a BufferedWriter and various methods for writing JetWeb objects to it.

Version:
$Date: 2006-04-14 14:23:21 +0100 (Fri, 14 Apr 2006) $ $Revision: 1104 $
Author:
Jon Butterworth

Field Summary
 
Fields inherited from class cedar.jetweb.html.HTMLWriter
dateFormat, dform, hidden, LISTLENGTH, modifiable, ofile, servletPath, verbose
 
Constructor Summary
HTMLPlotWriter(java.io.BufferedWriter out, java.lang.String newServletPath)
           
HTMLPlotWriter(java.io.PrintWriter out, java.lang.String newServletPath)
          Start a new html stream.
HTMLPlotWriter(java.lang.String filename, java.lang.String newServletPath)
          Start a new html stream.
 
Method Summary
 void display(DataPlot plot)
          Write a real DataPlot to HTML.
 void display(DataPlot plot, Fit fit)
          Write a fitted DataPlot to HTML.
 void displaySelection(PlotSelection plotsel)
          Write out HTML properties form with papers selected
 void setImagePath(java.lang.String path)
          Directory, relative to root, for the graphics file for the plot.
static void writeDataPointText(java.util.Vector points, java.lang.String title, java.io.PrintWriter out)
          Write out HTML text of the data points in simple table form, with an HTML title.
static void writePlotComparison(java.io.BufferedWriter ofile, DataPlot plot1, double chi21, double chi22)
          Compare 2 plots Write the crosssection Id and chi2/dof for each plot.
static void writePlotText(java.lang.String fitId, java.lang.String plotId, java.io.PrintWriter out)
          Write out HTML text of the data points for the plot with this plotId and and fitId.
 
Methods inherited from class cedar.jetweb.html.HTMLWriter
close, display, displayList, endForm, endListPage, forwardTo, getWriter, listHiddenPars, listLogs, listPendingJobs, makeActionButtons, makeCommonForm, makeControlForm, makeRequestForm, makeSubmitButtons, setDateFormat, setHidden, setModifiable, setNumberFormat, setVerbose, startControlForm, startControlForm, startForm, writeDirChoiceForm, writeInputId, writeList, writeListContinued, writeOkCancel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLPlotWriter

public HTMLPlotWriter(java.io.PrintWriter out,
                      java.lang.String newServletPath)
Start a new html stream. This does nothing except assign the output stream and the path which will be used to refer back to the current servlet. This version writes output to the given PrintWriter.

Parameters:
out - - output writer
newServletPath - required for links back


HTMLPlotWriter

public HTMLPlotWriter(java.io.BufferedWriter out,
                      java.lang.String newServletPath)

HTMLPlotWriter

public HTMLPlotWriter(java.lang.String filename,
                      java.lang.String newServletPath)
Start a new html stream. This does nothing except assign the output stream and the path which will be used to refer back to the current servlet. This version writes output to the given file. (Deletes any existing file with the same name).

Parameters:
filename - for output file
newServletPath - required for links on output html page

Method Detail

displaySelection

public void displaySelection(PlotSelection plotsel)
                      throws JetWebException
Write out HTML properties form with papers selected

Parameters:
plotsel - PlotSelection collection of papers and plots whose parameters are to be used to construct properties form
Throws:
JetWebException


writePlotComparison

public static void writePlotComparison(java.io.BufferedWriter ofile,
                                       DataPlot plot1,
                                       double chi21,
                                       double chi22)
Compare 2 plots Write the crosssection Id and chi2/dof for each plot. Note: these plots may not be populated with chi2, so have to get them from the database.


display

public void display(DataPlot plot)
             throws JetWebException
Write a real DataPlot to HTML.

Throws:
JetWebException


display

public void display(DataPlot plot,
                    Fit fit)
             throws JetWebException
Write a fitted DataPlot to HTML. If fit is null, the real data only is written out.

Throws:
JetWebException


setImagePath

public void setImagePath(java.lang.String path)
Directory, relative to root, for the graphics file for the plot.


writePlotText

public static void writePlotText(java.lang.String fitId,
                                 java.lang.String plotId,
                                 java.io.PrintWriter out)
                          throws JetWebException
Write out HTML text of the data points for the plot with this plotId and and fitId. Output is in simple table form, with an HTML title.

Parameters:
fitId - The Fit ID for this cross section information (if applicable; zero otherwise)
plotId - The Plot ID for this cross section (required).
out - The printwriter to which the text is sent.
Throws:
JetWebException


writeDataPointText

public static void writeDataPointText(java.util.Vector points,
                                      java.lang.String title,
                                      java.io.PrintWriter out)
Write out HTML text of the data points in simple table form, with an HTML title.

Parameters:
points - Vector of datapoints
title - The HTML title string
out - The printwriter to which the text is sent.