Package org.dom4j

Examples of org.dom4j.Element.addAttribute()


    presentationXML.addAttribute("label", getLable());

    // Question
    getQuestion().addToElement(presentationXML);
    Element response_lid = presentationXML.addElement("response_lid");
    response_lid.addAttribute("ident", getIdent());
    response_lid.addAttribute("rcardinality", (getType() == TYPE_SC) ? "Single" : "Multiple");
    response_lid.addAttribute("rtiming", "No");
    Element render_choice = response_lid.addElement("render_choice");
    render_choice.addAttribute("shuffle", isShuffle() ? "Yes" : "No");
    render_choice.addAttribute("minnumber", getType() == TYPE_SC ? "1" : "0");
View Full Code Here


    // Question
    getQuestion().addToElement(presentationXML);
    Element response_lid = presentationXML.addElement("response_lid");
    response_lid.addAttribute("ident", getIdent());
    response_lid.addAttribute("rcardinality", (getType() == TYPE_SC) ? "Single" : "Multiple");
    response_lid.addAttribute("rtiming", "No");
    Element render_choice = response_lid.addElement("render_choice");
    render_choice.addAttribute("shuffle", isShuffle() ? "Yes" : "No");
    render_choice.addAttribute("minnumber", getType() == TYPE_SC ? "1" : "0");
    render_choice.addAttribute("maxnumber", getType() == TYPE_SC ? "1" : String.valueOf(getResponses().size()));
View Full Code Here

    // Question
    getQuestion().addToElement(presentationXML);
    Element response_lid = presentationXML.addElement("response_lid");
    response_lid.addAttribute("ident", getIdent());
    response_lid.addAttribute("rcardinality", (getType() == TYPE_SC) ? "Single" : "Multiple");
    response_lid.addAttribute("rtiming", "No");
    Element render_choice = response_lid.addElement("render_choice");
    render_choice.addAttribute("shuffle", isShuffle() ? "Yes" : "No");
    render_choice.addAttribute("minnumber", getType() == TYPE_SC ? "1" : "0");
    render_choice.addAttribute("maxnumber", getType() == TYPE_SC ? "1" : String.valueOf(getResponses().size()));
View Full Code Here

    Element response_lid = presentationXML.addElement("response_lid");
    response_lid.addAttribute("ident", getIdent());
    response_lid.addAttribute("rcardinality", (getType() == TYPE_SC) ? "Single" : "Multiple");
    response_lid.addAttribute("rtiming", "No");
    Element render_choice = response_lid.addElement("render_choice");
    render_choice.addAttribute("shuffle", isShuffle() ? "Yes" : "No");
    render_choice.addAttribute("minnumber", getType() == TYPE_SC ? "1" : "0");
    render_choice.addAttribute("maxnumber", getType() == TYPE_SC ? "1" : String.valueOf(getResponses().size()));

    for (Iterator i = getResponses().iterator(); i.hasNext();) {
      ChoiceResponse tmpChoice = (ChoiceResponse) i.next();
View Full Code Here

    response_lid.addAttribute("ident", getIdent());
    response_lid.addAttribute("rcardinality", (getType() == TYPE_SC) ? "Single" : "Multiple");
    response_lid.addAttribute("rtiming", "No");
    Element render_choice = response_lid.addElement("render_choice");
    render_choice.addAttribute("shuffle", isShuffle() ? "Yes" : "No");
    render_choice.addAttribute("minnumber", getType() == TYPE_SC ? "1" : "0");
    render_choice.addAttribute("maxnumber", getType() == TYPE_SC ? "1" : String.valueOf(getResponses().size()));

    for (Iterator i = getResponses().iterator(); i.hasNext();) {
      ChoiceResponse tmpChoice = (ChoiceResponse) i.next();
      Element flow_label = render_choice.addElement("flow_label");
View Full Code Here

    response_lid.addAttribute("rcardinality", (getType() == TYPE_SC) ? "Single" : "Multiple");
    response_lid.addAttribute("rtiming", "No");
    Element render_choice = response_lid.addElement("render_choice");
    render_choice.addAttribute("shuffle", isShuffle() ? "Yes" : "No");
    render_choice.addAttribute("minnumber", getType() == TYPE_SC ? "1" : "0");
    render_choice.addAttribute("maxnumber", getType() == TYPE_SC ? "1" : String.valueOf(getResponses().size()));

    for (Iterator i = getResponses().iterator(); i.hasNext();) {
      ChoiceResponse tmpChoice = (ChoiceResponse) i.next();
      Element flow_label = render_choice.addElement("flow_label");
      // Add horizontal or vertical alignment. All flow_labels get the
View Full Code Here

    for (Iterator i = getResponses().iterator(); i.hasNext();) {
      ChoiceResponse tmpChoice = (ChoiceResponse) i.next();
      Element flow_label = render_choice.addElement("flow_label");
      // Add horizontal or vertical alignment. All flow_labels get the
      // same value
      flow_label.addAttribute("class", getFlowLabelClass());
      Element response_lable = flow_label.addElement("response_label");
      response_lable.addAttribute("ident", tmpChoice.getIdent());
      response_lable.addAttribute("rshuffle", "Yes"); // QTI default value
      tmpChoice.getContent().addToElement(response_lable);
    }
View Full Code Here

      Element flow_label = render_choice.addElement("flow_label");
      // Add horizontal or vertical alignment. All flow_labels get the
      // same value
      flow_label.addAttribute("class", getFlowLabelClass());
      Element response_lable = flow_label.addElement("response_label");
      response_lable.addAttribute("ident", tmpChoice.getIdent());
      response_lable.addAttribute("rshuffle", "Yes"); // QTI default value
      tmpChoice.getContent().addToElement(response_lable);
    }
    // ------------------
    Element resprocessingXML = root.addElement("resprocessing");
View Full Code Here

      // Add horizontal or vertical alignment. All flow_labels get the
      // same value
      flow_label.addAttribute("class", getFlowLabelClass());
      Element response_lable = flow_label.addElement("response_label");
      response_lable.addAttribute("ident", tmpChoice.getIdent());
      response_lable.addAttribute("rshuffle", "Yes"); // QTI default value
      tmpChoice.getContent().addToElement(response_lable);
    }
    // ------------------
    Element resprocessingXML = root.addElement("resprocessing");
View Full Code Here

    // ------------------
    Element resprocessingXML = root.addElement("resprocessing");

    Element outcomes = resprocessingXML.addElement("outcomes");
    Element decvar = outcomes.addElement("decvar");
    decvar.addAttribute("varname", "SCORE");
    decvar.addAttribute("vartype", "Decimal");
    decvar.addAttribute("defaultval", "0");
    decvar.addAttribute("minvalue", "" + getMinValue());
    float maxScore = QTIEditHelper.calculateMaxScore(this);
    maxScore = maxScore > getMaxValue() ? getMaxValue() : maxScore;
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.