Package org.dom4j

Examples of org.dom4j.Element.addAttribute()


  private void createCommentsXML(String pageURL, Element commentsElement) {
    List<CommentEntity> comments = getDao().getCommentDao().getByPage(
        pageURL);
    for (CommentEntity comment : comments) {
      Element commentElement = commentsElement.addElement("comment");
      commentElement.addAttribute("name", comment.getName());
      commentElement.addAttribute("disabled", String.valueOf(
          comment.isDisabled()));
      commentElement.addAttribute("publishDate",
        DateUtil.dateTimeToString(comment.getPublishDate()));
      commentElement.setText(comment.getContent());
View Full Code Here


    List<CommentEntity> comments = getDao().getCommentDao().getByPage(
        pageURL);
    for (CommentEntity comment : comments) {
      Element commentElement = commentsElement.addElement("comment");
      commentElement.addAttribute("name", comment.getName());
      commentElement.addAttribute("disabled", String.valueOf(
          comment.isDisabled()));
      commentElement.addAttribute("publishDate",
        DateUtil.dateTimeToString(comment.getPublishDate()));
      commentElement.setText(comment.getContent());
    }
View Full Code Here

    for (CommentEntity comment : comments) {
      Element commentElement = commentsElement.addElement("comment");
      commentElement.addAttribute("name", comment.getName());
      commentElement.addAttribute("disabled", String.valueOf(
          comment.isDisabled()));
      commentElement.addAttribute("publishDate",
        DateUtil.dateTimeToString(comment.getPublishDate()));
      commentElement.setText(comment.getContent());
    }
  }
View Full Code Here

  private void createLanguagesXML(Element configElement) {
    Element languagesElement = configElement.addElement("languages");
    List<LanguageEntity> langs = getDao().getLanguageDao().select();
    for (LanguageEntity lang : langs) {
      Element langElem = languagesElement.addElement("language");
      langElem.addAttribute("code", lang.getCode());
      langElem.addAttribute("title", lang.getTitle());
    }
  }
 
  public void readConfigs(Element configElement) throws DaoTaskException {
View Full Code Here

    Element languagesElement = configElement.addElement("languages");
    List<LanguageEntity> langs = getDao().getLanguageDao().select();
    for (LanguageEntity lang : langs) {
      Element langElem = languagesElement.addElement("language");
      langElem.addAttribute("code", lang.getCode());
      langElem.addAttribute("title", lang.getTitle());
    }
  }
 
  public void readConfigs(Element configElement) throws DaoTaskException {
    ConfigEntity config = getConfig();
View Full Code Here

   */
  public void addToElement(Element root) {
    if (outcomesProcessing.size() == 0) return;

    Element outcomes_processing = root.addElement("outcomes_processing");
    outcomes_processing.addAttribute("scoremodel", "SumOfScores");
    Element decvar = outcomes_processing.addElement("outcomes").addElement("decvar");
//    decvar.addAttribute(DEFAULTVAL, (String)outcomesProcessing.get(DEFAULTVAL));
    decvar.addAttribute("varname", "SCORE");
    decvar.addAttribute("vartype", "Decimal");
//    decvar.addAttribute(MINVALUE, (String)outcomesProcessing.get(MINVALUE));
View Full Code Here

    Element outcomes_processing = root.addElement("outcomes_processing");
    outcomes_processing.addAttribute("scoremodel", "SumOfScores");
    Element decvar = outcomes_processing.addElement("outcomes").addElement("decvar");
//    decvar.addAttribute(DEFAULTVAL, (String)outcomesProcessing.get(DEFAULTVAL));
    decvar.addAttribute("varname", "SCORE");
    decvar.addAttribute("vartype", "Decimal");
//    decvar.addAttribute(MINVALUE, (String)outcomesProcessing.get(MINVALUE));
//    decvar.addAttribute(MAXVALUE, (String)outcomesProcessing.get(MAXVALUE));
    decvar.addAttribute(CUTVALUE, (String)outcomesProcessing.get(CUTVALUE));
  }
View Full Code Here

    Element outcomes_processing = root.addElement("outcomes_processing");
    outcomes_processing.addAttribute("scoremodel", "SumOfScores");
    Element decvar = outcomes_processing.addElement("outcomes").addElement("decvar");
//    decvar.addAttribute(DEFAULTVAL, (String)outcomesProcessing.get(DEFAULTVAL));
    decvar.addAttribute("varname", "SCORE");
    decvar.addAttribute("vartype", "Decimal");
//    decvar.addAttribute(MINVALUE, (String)outcomesProcessing.get(MINVALUE));
//    decvar.addAttribute(MAXVALUE, (String)outcomesProcessing.get(MAXVALUE));
    decvar.addAttribute(CUTVALUE, (String)outcomesProcessing.get(CUTVALUE));
  }
View Full Code Here

//    decvar.addAttribute(DEFAULTVAL, (String)outcomesProcessing.get(DEFAULTVAL));
    decvar.addAttribute("varname", "SCORE");
    decvar.addAttribute("vartype", "Decimal");
//    decvar.addAttribute(MINVALUE, (String)outcomesProcessing.get(MINVALUE));
//    decvar.addAttribute(MAXVALUE, (String)outcomesProcessing.get(MAXVALUE));
    decvar.addAttribute(CUTVALUE, (String)outcomesProcessing.get(CUTVALUE));
  }

  public String getField(String key) { return (String)outcomesProcessing.get(key); }
 
  public void setField(String key, String value) { outcomesProcessing.put(key, value); }
View Full Code Here

  /**
   * Build XML tree (presentation & resprocessing)
   */
  public void addToElement(Element root) {
    Element presentationXML = root.addElement("presentation");
    presentationXML.addAttribute("label", getLable());

    // Question
    getQuestion().addToElement(presentationXML);
    Element response_lid = presentationXML.addElement("response_lid");
    response_lid.addAttribute("ident", getIdent());
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.