use of org.akaza.openclinica.bean.odmbeans.FormDefBean in project OpenClinica by OpenClinica.
the class MetaDataReportBean method addFormDef.
public void addFormDef(boolean isStudy, String currentIndent) {
StringBuffer xml = this.getXmlOutput();
String indent = this.getIndent();
ArrayList<FormDefBean> forms = (ArrayList<FormDefBean>) odmstudy.getMetaDataVersion().getFormDefs();
for (FormDefBean form : forms) {
xml.append(currentIndent + "<FormDef OID=\"" + StringEscapeUtils.escapeXml(form.getOid()) + "\" Name=\"" + StringEscapeUtils.escapeXml(form.getName()) + "\" Repeating=\"" + form.getRepeating() + "\">");
xml.append(nls);
ArrayList<ElementRefBean> igs = (ArrayList<ElementRefBean>) form.getItemGroupRefs();
for (ElementRefBean ig : igs) {
xml.append(currentIndent + indent + "<ItemGroupRef ItemGroupOID=\"" + StringEscapeUtils.escapeXml(ig.getElementDefOID()) + "\" Mandatory=\"" + ig.getMandatory() + "\"/>");
xml.append(nls);
}
ArrayList<ElementRefBean> formLayoutRefs = (ArrayList<ElementRefBean>) form.getFormLayoutRefs();
for (ElementRefBean formLayoutRef : formLayoutRefs) {
xml.append(currentIndent + indent + "<OpenClinica:FormLayoutDef OID=\"" + StringEscapeUtils.escapeXml(formLayoutRef.getName()) + "\">");
xml.append(nls);
xml.append(currentIndent + indent + "<OpenClinica:URL>" + StringEscapeUtils.escapeXml(formLayoutRef.getUrl()) + "</OpenClinica:URL>");
xml.append(nls);
xml.append(currentIndent + indent + "</OpenClinica:FormLayoutDef>");
xml.append(nls);
}
// add FormDetails for oc1.3
if ("oc1.3".equals(this.getODMVersion())) {
this.addFormDetails(form.getFormDetails(), currentIndent + indent);
}
xml.append(currentIndent + "</FormDef>");
xml.append(nls);
}
}
Aggregations