Examples of FetchData


Examples of org.jrobin.core.FetchData

        private double[][] fetchData(String function, long startTime, long endTime, int dataPoints) {
            RrdDb db = null;
            try {
                db = new RrdDb(getDbPath(), true);

                FetchData data;
                if (dataPoints > 0) {
                    data = db.createFetchRequest(function, startTime, endTime,
                            getResolution(startTime, endTime, dataPoints)).fetchData();
                }
                else {
                    data = db.createFetchRequest(function, startTime, endTime).fetchData();
                }
                return data.getValues();
            }
            catch (IOException e) {
                Log.error("Error initializing Rrdb", e);
            }
            catch (RrdException e) {
View Full Code Here

Examples of org.openqreg.util.FetchData

  /**
   * @see junit.framework.TestCase#setUp()
   */
  @Before
  public void setUp() throws Exception {
    fetch = new FetchData();
  }
View Full Code Here

Examples of org.openqreg.util.FetchData

   */
  @Override
  public String createJournalHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    // if this variable exists in fetch and it is not empty print the value
    FetchData fetch = elemParam.getFetch();
    if (fetch.containsValue(this.getName())
        && !"".equals(fetch.getValueAsString(this.getName()))) {
      out.append("<span class=\"").append(getStylesheet()).append("\">");
      out.append(fetch.getValueAsString(this.getName()));
      out.append("</span>");
    }
    return out.toString();
  }
View Full Code Here

Examples of org.openqreg.util.FetchData

   */
  @Override
  public String createJournalHTML(ElementParameter elemParam) {

    StringBuffer out = new StringBuffer();
    FetchData fetch = elemParam.getFetch();
    // if this variable exists in fetch and it is not empty print the value
    if (fetch.containsValue(this.getName())
        && !"".equals(fetch.getValueAsString(this.getName()))) {
      out.append("<span class=\"").append(getStylesheet()).append("\">");
      out.append(fetch.getValueAsString(this.getName()));
      out.append("</span>");
    }

    return out.toString();
  }
View Full Code Here

Examples of org.openqreg.util.FetchData

   *         nessecary javascripts
   */
  @Override
  public String createPaperFormHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    FetchData fetch = elemParam.getFetch();
    // if this variable exists in fetch and it is not empty print the value
    if (fetch.containsValue(this.getName())
        && !"".equals(fetch.getValueAsString(this.getName()))) {
      // print value with stylesheet
      out.append("<span class=\"PF");
      out.append(getStylesheet()).append("\">");
      out.append(fetch.getValueAsString(this.getName()));
      out.append("</span>");

    } else {
      out
          .append("<IMG src=\"images/smallrectangle.gif\" height=\"25\" width=\"20\"/>");
View Full Code Here

Examples of org.openqreg.util.FetchData

   * @see se.ucr.element.StandardVariable#createJournalHTML(se.ucr.element.ElementParameter)
   */
  @Override
  public String createJournalHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    FetchData fetch = elemParam.getFetch();
    // if this variable exists in fetch and it is not empty print the value
    if (fetch.containsValue(this.getName())
        && !"".equals(fetch.getValueAsString(this.getName()))) {
      out.append("<span class=\"").append(getStylesheet()).append("\"");
      out.append(" id=\"" + getName() + "\">");
      out.append(fetch.getValueAsString(this.getName()));
      out.append("</span>");
    }

    return out.toString();
  }
View Full Code Here

Examples of org.openqreg.util.FetchData

   */
  @Override
  public String createPaperFormHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    // if this variable exists in fetch and it is not empty print the value
    FetchData fetch = elemParam.getFetch();
    if (fetch.containsValue(this.getName())
        && !"".equals(fetch.getValueAsString(this.getName()))) {
      // print value with stylesheet
      out.append("<span class=\"PF");
      out.append(getStylesheet());
      out.append(" " + getStylesheet());
      out.append("\">");
      out.append(fetch.getValueAsString(this.getName()).trim());
      out.append("</span>");

    } else {
      for (int i = 1; i <= getMaxNrOfCharacters(); i++) {
        if (i != getMaxNrOfCharacters()
View Full Code Here

Examples of org.openqreg.util.FetchData

   *         nessecary javascripts
   */
  @Override
  public String createPaperFormHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    FetchData fetch = elemParam.getFetch();
    // if this variable exists in fetch and it is not empty print the value
    if (fetch.containsValue(this.getName())
        && !"".equals(fetch.getValueAsString(this.getName()))) {
      // print value with stylesheet
      out.append("<span class=\"PF");
      out.append(getStylesheet()).append("\">");
      out.append(fetch.getValueAsString(this.getName()));
      out.append("</span>");

    } else {
      out.append("<br/>________________________________________________");
    }
View Full Code Here

Examples of org.openqreg.util.FetchData

    out.append("<table id='").append(this.getName()).append("'>");
   
    if (listOptions != null) {

      int i=0;
      FetchData fetch = elemParam.getFetch();
      for(ListOption listOption : listOptions.values()) { 
        //prevents output of first empty option
        if (fetch.containsValue(this.getName())) {
          if (listOption.getValue().equals(fetch.getValueAsString(this.getName()))) {
            out.append("<tr id='").append(this.getName()).append(i).append("'><td><span class=\"").append(getStylesheet()).append("\">");
            out.append(listOption.getText());
            out.append("</span></td></tr>");
          }
        }
View Full Code Here

Examples of org.openqreg.util.FetchData

   *      se.ucr.util.FetchData)
   */
  @Override
  public String createPaperFormHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    FetchData fetch = elemParam.getFetch();
    //if this variable exists in fetch and it is not empty print the value
    if (fetch.containsValue(this.getName()) && !"".equals(fetch.getValueAsString(this.getName()))) {
      //print value with stylesheet
      out.append("<span class=\"PF");
      out.append(getStylesheet()).append("\">");
      out.append(fetch.getValueAsString(this.getName()));
      out.append("</span>");

    } else {
      out.append("<IMG src=\"images\\bigsquare.gif\" height=\"105\" width=\"205\"/>");

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.