Package org.springside.examples.showcase.report.DummyDataFetcher

Examples of org.springside.examples.showcase.report.DummyDataFetcher.TemperatureAnomaly


    Element graphAnomaly = graphs.addElement("graph").addAttribute("gid", "1");
    Element graphSmoothed = graphs.addElement("graph").addAttribute("gid", "2");

    for (int i = 0; i < temperatureAnomalyArray.length; i++) {
      String xid = String.valueOf(i);
      TemperatureAnomaly data = temperatureAnomalyArray[i];

      series.addElement("value").addAttribute("xid", xid).addText(String.valueOf(data.getYear()));

      Element graphAnomalyValue = graphAnomaly.addElement("value").addAttribute("xid", String.valueOf(i))
          .addText(String.valueOf(data.getAnomaly()));

      graphAnomalyValue.addAttribute("url", url + i);

      if (data.getAnomaly() < 0) {
        graphAnomalyValue.addAttribute("color", "#318DBD");
      }

      graphSmoothed.addElement("value").addAttribute("xid", xid).addText(String.valueOf(data.getSmoothed()));
    }

    HttpServletResponse response = Struts2Utils.getResponse();
    response.setContentType("text/xml;charset=utf-8");
View Full Code Here

TOP

Related Classes of org.springside.examples.showcase.report.DummyDataFetcher.TemperatureAnomaly

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.