DisplayReferences.java

Go to the documentation of this file.
00001 package cedar.hepdata.webapp.components;
00002 
00003 import org.apache.tapestry.MarkupWriter;
00004 import org.apache.tapestry.annotations.*;
00005 import cedar.hepdata.model.*;
00006 
00007 public class DisplayReferences {
00008 
00009     @BeginRender
00010     void renderMessage(MarkupWriter writer) {
00011         if (_yaxis != null) {
00012           _paper = _yaxis.getPaper();
00013         }
00014 
00015         if (_reaction != null) {
00016           _yaxis = _reaction.getYAxis();
00017           _paper = _yaxis.getPaper();
00018         }
00019 
00020         if (_dataset != null) {
00021           _paper = _dataset.getPaper();
00022         }
00023 
00024         if (_paper != null) {
00025             for (String author : _paper.getAuthors()) {
00026                 writer.write(author + " et al., ");
00027             }
00028             for (Reference ref : _paper.getReferences()) {
00029                 writer.write(ref.getDescription());
00030             }
00031         }
00032     }
00033 
00034     @Parameter(name="p")
00035     private Paper _paper;
00036 
00037     @Parameter(name="yax")
00038     private YAxis _yaxis;
00039 
00040     @Parameter(name="re")
00041     private AxisReaction _reaction;
00042 
00043     @Parameter(name="ds")
00044     private Dataset _dataset;
00045 
00046 }

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