FindYAxesAsFull Class Reference

Collaboration diagram for FindYAxesAsFull:

Collaboration graph
[legend]

List of all members.


Public Member Functions

String getReaction ()
void setReaction (String reaction)
String getObservable ()
void setObservable (String observable)
String getSqrts ()
void setSqrts (String sqrts)
String getPlength ()
void setPlength (String plength)
String getStarting ()
void setStarting (String starting)
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 16 of file FindYAxesAsFull.java.


Member Function Documentation

String getReaction (  ) 

Definition at line 20 of file FindYAxesAsFull.java.

00020 { return reaction; } 

void setReaction ( String  reaction  ) 

Definition at line 21 of file FindYAxesAsFull.java.

00021 {this.reaction = reaction;}

String getObservable (  ) 

Definition at line 25 of file FindYAxesAsFull.java.

00025 { return observable; } 

void setObservable ( String  observable  ) 

Definition at line 26 of file FindYAxesAsFull.java.

00026 {this.observable = observable;}

String getSqrts (  ) 

Definition at line 30 of file FindYAxesAsFull.java.

00030 { return sqrts; } 

void setSqrts ( String  sqrts  ) 

Definition at line 31 of file FindYAxesAsFull.java.

00031 {this.sqrts = sqrts;}

String getPlength (  ) 

Definition at line 35 of file FindYAxesAsFull.java.

00035 { return plength; } 

void setPlength ( String  plength  ) 

Definition at line 36 of file FindYAxesAsFull.java.

00036 {this.plength = plength;}

String getStarting (  ) 

Definition at line 40 of file FindYAxesAsFull.java.

00040 { return starting; } 

void setStarting ( String  starting  ) 

Definition at line 41 of file FindYAxesAsFull.java.

00041 {this.starting = starting;}

String getQueryParameters (  ) 

Definition at line 55 of file FindYAxesAsFull.java.

00055                                       {
00056         StringBuffer qs = new StringBuffer();
00057         String mid = "";
00058         int number =  Integer.parseInt(plength);
00059         int newstart = Integer.parseInt(starting);
00060         newstart += number;
00061         qs.append(mid + "reac=" + reaction); mid = "&";
00062         qs.append(mid + "obs=" + observable); mid = "&";
00063         qs.append(mid + "sqrtslo=" + sqrts); mid = "&";
00064         qs.append(mid + "number=" + plength + mid + "start=" + Integer.toString(newstart));
00065         return qs.toString().replaceAll("\\+","%2B");
00066     }

String getFirstNumber (  ) 

Definition at line 68 of file FindYAxesAsFull.java.

00068                                   {
00069 //       return getQueryParam("start");
00070         return starting;
00071     }

String getSearchString (  ) 

Definition at line 73 of file FindYAxesAsFull.java.

00073                                    {
00074         StringBuffer qs = new StringBuffer();
00075         qs.append("(");
00076         qs.append(reaction);
00077         qs.append(")");
00078         qs.append(" " + observable);
00079         qs.append(" " + sqrts);
00080         qs.append(" " + sqrts);
00081         return qs.toString();
00082     }

String getLastNumber (  ) 

Definition at line 84 of file FindYAxesAsFull.java.

00084                                  {
00085         int first =  Integer.parseInt(starting);
00086         int number = Integer.parseInt(plength);
00087         int last = first + number - 1;
00088         return Integer.toString(last);
00089    }

String getPageSize (  ) 

Definition at line 91 of file FindYAxesAsFull.java.

00091                                {
00092        return plength;
00093     }

Long getCount (  ) 

Definition at line 95 of file FindYAxesAsFull.java.

00095                           {
00096         return (Long) constructQuery("count").uniqueResult();
00097     }

Paper getPaper (  ) 

Definition at line 119 of file FindYAxesAsFull.java.

00119 { return _currentPaper; }

void setPaper ( Paper  p  ) 

Definition at line 120 of file FindYAxesAsFull.java.

00120 { _currentPaper = p; }

Set<Paper> getPapers (  ) 

Definition at line 125 of file FindYAxesAsFull.java.

00125                                    {
00126         Query q = constructQuery();
00127 //      System.out.println("query is:" + q.toString());
00128         int first = Integer.parseInt(starting);
00129 //      System.out.println(first);
00130         first=first-1;
00131         
00132 //      q.setFirstResult(first).setMaxResults(Integer.parseInt(getQueryParam("number")));
00133 //      q.setFirstResult(first).setMaxResults(50);
00134 
00135         map.clear();
00136         for (Iterator it=q.iterate(); it.hasNext(); ){
00137             YAxis _yAxis = (YAxis) it.next();
00138             Paper _paper=_yAxis.getDataset().getPaper();
00139             if(map.get(_paper) == null) { map.put(_paper,new ArrayList<YAxis>());}
00140             map.get(_paper).add(_yAxis);
00141 
00142 //          System.out.println("iterator");
00143             
00144             if (map.size() > (Integer.parseInt(plength)-1)) { break; }
00145         }
00146         return map.keySet();
00147     }

YAxis getYAxis (  ) 

Definition at line 152 of file FindYAxesAsFull.java.

00152 { return _yAxis; }

void setYAxis ( YAxis  yax  ) 

Definition at line 153 of file FindYAxesAsFull.java.

00153 { _yAxis = yax; }

List<YAxis> getYAxes (  ) 

Definition at line 155 of file FindYAxesAsFull.java.

00155                                   {
00156        return map.get(_currentPaper);
00157     }


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