FindYAxisPhysics2 Class Reference

Collaboration diagram for FindYAxisPhysics2:

Collaboration graph
[legend]

List of all members.


Public Member Functions

String getQueryParam (String param)
String getQueryParameters ()
String getFirstNumber ()
String getSearchString ()
String getLastNumber ()
String getPageSize ()
Long getCount ()
Paper getPaper ()
void setPaper (Paper p)
Set< Paper > getPapers ()
YAxis getYAxis ()
void setYAxis (YAxis yax)
List< YAxis > getYAxes ()

Detailed Description

Definition at line 17 of file FindYAxisPhysics2.java.


Member Function Documentation

String getQueryParam ( String  param  ) 

String getQueryParameters (  ) 

Definition at line 29 of file FindYAxisPhysics2.java.

References FindYAxisPhysics2.getQueryParam().

00029                                       {
00030         StringBuffer qs = new StringBuffer();
00031         String mid = "";
00032         int number =  Integer.parseInt(getQueryParam("number"));
00033         int newstart = Integer.parseInt(getQueryParam("start"));
00034         newstart += number;
00035         qs.append(mid + "reac=" + getQueryParam("reac"));  mid = "&";
00036         qs.append(mid + "obs=" + getQueryParam("obs"));  mid = "&";
00037         qs.append(mid + "sqrtslo=" + getQueryParam("sqrtslo"));  mid = "&";
00038         qs.append(mid + "number=" + getQueryParam("number") + mid + "start=" + Integer.toString(newstart));
00039         return qs.toString().replaceAll("\\+","%2B");
00040     }

String getFirstNumber (  ) 

Definition at line 42 of file FindYAxisPhysics2.java.

References FindYAxisPhysics2.getQueryParam().

00042                                   {
00043        return getQueryParam("start");
00044     }

String getSearchString (  ) 

Definition at line 46 of file FindYAxisPhysics2.java.

References FindYAxisPhysics2.getQueryParam().

00046                                    {
00047         StringBuffer qs = new StringBuffer();
00048         qs.append("(");
00049         qs.append(getQueryParam("reac"));
00050         qs.append(")");
00051         qs.append(" " + getQueryParam("obs"));
00052         qs.append(" " + getQueryParam("sqrtslo"));
00053         qs.append(" " + getQueryParam("sqrtshi"));
00054         return qs.toString();
00055     }

String getLastNumber (  ) 

Definition at line 57 of file FindYAxisPhysics2.java.

References FindYAxisPhysics2.getQueryParam().

00057                                  {
00058         int first =  Integer.parseInt(getQueryParam("start"));
00059         int number = Integer.parseInt(getQueryParam("number"));
00060         int last = first + number - 1;
00061         return Integer.toString(last);
00062    }

String getPageSize (  ) 

Definition at line 64 of file FindYAxisPhysics2.java.

References FindYAxisPhysics2.getQueryParam().

00064                                {
00065        return getQueryParam("number");
00066     }

Long getCount (  ) 

Definition at line 68 of file FindYAxisPhysics2.java.

00068                           {
00069         return (Long) constructQuery("count").uniqueResult();
00070     }

Paper getPaper (  ) 

Definition at line 91 of file FindYAxisPhysics2.java.

00091 { return _currentPaper; }

void setPaper ( Paper  p  ) 

Definition at line 92 of file FindYAxisPhysics2.java.

00092 { _currentPaper = p; }

Set<Paper> getPapers (  ) 

Definition at line 96 of file FindYAxisPhysics2.java.

References FindYAxisPhysics2.getQueryParam().

00096                                    {
00097         Query q = constructQuery();
00098         int first = Integer.parseInt(getQueryParam("start"));
00099         first=first-1;
00100         
00101 //      q.setFirstResult(first).setMaxResults(Integer.parseInt(getQueryParam("number")));
00102 //      q.setFirstResult(first).setMaxResults(50);
00103 
00104         map.clear();
00105         for (Iterator it=q.iterate(); it.hasNext(); ){
00106             YAxis _yAxis = (YAxis) it.next();
00107             Paper _paper=_yAxis.getDataset().getPaper();
00108             if(map.get(_paper) == null) { map.put(_paper,new ArrayList<YAxis>());}
00109             map.get(_paper).add(_yAxis);
00110             if (map.size() > (Integer.parseInt(getQueryParam("number"))-1)) { break; }
00111         }
00112         return map.keySet();
00113     }

YAxis getYAxis (  ) 

Definition at line 118 of file FindYAxisPhysics2.java.

00118 { return _yAxis; }

void setYAxis ( YAxis  yax  ) 

Definition at line 119 of file FindYAxisPhysics2.java.

00119 { _yAxis = yax; }

List<YAxis> getYAxes (  ) 

Definition at line 121 of file FindYAxisPhysics2.java.

00121                                   {
00122        return map.get(_currentPaper);
00123     }


The documentation for this class was generated from the following file:


Generated on Tue Apr 21 15:55:04 2009 for HepData Web servlets by  doxygen 1.5.5