FindPaperFromReaction Class Reference

Collaboration diagram for FindPaperFromReaction:

Collaboration graph
[legend]

List of all members.


Public Member Functions

String getQueryParam (String param)
String getQueryParameters ()
String getFirstNumber ()
String getLastNumber ()
String getPageSize ()
Long getCount ()
Paper getPaper ()
void setPaper (Paper p)
List< Paper > getPapers ()

Detailed Description

Definition at line 15 of file FindPaperFromReaction.java.


Member Function Documentation

String getQueryParam ( String  param  ) 

Definition at line 24 of file FindPaperFromReaction.java.

Referenced by FindPaperFromReaction.getFirstNumber(), FindPaperFromReaction.getLastNumber(), FindPaperFromReaction.getPageSize(), and FindPaperFromReaction.getQueryParameters().

00024                                              {
00025        return _reqGlobals.getRequest().getParameter(param);
00026     }

String getQueryParameters (  ) 

Definition at line 28 of file FindPaperFromReaction.java.

References FindPaperFromReaction.getQueryParam().

00028                                       {
00029         StringBuffer qs = new StringBuffer();
00030         String mid = "";
00031         int number =  Integer.parseInt(getQueryParam("number"));
00032         int newstart = Integer.parseInt(getQueryParam("start"));
00033         newstart += number;
00034         qs.append(mid + "beam=" + getQueryParam("beam"));  mid = "&";
00035         qs.append(mid + "targ=" + getQueryParam("targ"));  mid = "&";
00036         qs.append(mid + "fsp1=" + getQueryParam("fsp1"));  mid = "&"; 
00037         qs.append(mid + "mfsp1=" + getQueryParam("mfsp1"));  mid = "&";
00038         qs.append(mid + "fsp2=" + getQueryParam("fsp2"));  mid = "&"; 
00039         qs.append(mid + "mfsp2=" + getQueryParam("mfsp2"));  mid = "&";
00040         qs.append(mid + "fsp3=" + getQueryParam("fsp3"));  mid = "&"; 
00041         qs.append(mid + "mfsp3=" + getQueryParam("mfsp3"));  mid = "&";
00042         qs.append(mid + "number=" + getQueryParam("number") + mid + "start=" + Integer.toString(newstart));
00043         return qs.toString().replaceAll("\\+","%2B");
00044     }

String getFirstNumber (  ) 

Definition at line 46 of file FindPaperFromReaction.java.

References FindPaperFromReaction.getQueryParam().

00046                                   {
00047        return getQueryParam("start");
00048     }

String getLastNumber (  ) 

Definition at line 50 of file FindPaperFromReaction.java.

References FindPaperFromReaction.getQueryParam().

00050                                  {
00051         int first =  Integer.parseInt(getQueryParam("start"));
00052         int number = Integer.parseInt(getQueryParam("number"));
00053         int last = first + number - 1;
00054         return Integer.toString(last);
00055    }

String getPageSize (  ) 

Definition at line 57 of file FindPaperFromReaction.java.

References FindPaperFromReaction.getQueryParam().

00057                                {
00058        return getQueryParam("number");
00059     }

Long getCount (  ) 

Definition at line 61 of file FindPaperFromReaction.java.

00061                           {
00062         return (Long) constructQuery("count").uniqueResult();
00063     }

Paper getPaper (  ) 

Definition at line 77 of file FindPaperFromReaction.java.

00077 { return _paper; }

void setPaper ( Paper  p  ) 

Definition at line 78 of file FindPaperFromReaction.java.

00078 { _paper = p; }

List<Paper> getPapers (  ) 

Definition at line 83 of file FindPaperFromReaction.java.

00083                                    {
00084         Query q = constructQuery();
00085 //      q.setFirstResult(Integer.parseInt(getQueryParam("start"))).setMaxResults(Integer.parseInt(getQueryParam("number")));
00086 //      q.setFirstResult(Integer.parseInt(getQueryParam("start"))).setMaxResults(Integer.parseInt(getQueryParam("number")));
00087         
00088         pout.clear();
00089         old = null;
00090         for (Iterator it = q.iterate();  it.hasNext();){
00091             AxisReaction _reaction = (AxisReaction) it.next();
00092             _paper = _reaction.getYAxis().getDataset().getPaper(); 
00093 //          if(_paper.getSpiresId().equals(old) )  {} else { pout.add(_paper); }
00094             if(_paper.getSpiresId() != old) { pout.add(_paper); }
00095             old = _paper.getSpiresId(); 
00096             if(pout.size() > 9) break;
00097         }
00098         return pout;
00099     }


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


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