use of org.akaza.openclinica.bean.odmbeans.SymbolBean in project OpenClinica by OpenClinica.
the class MetaDataReportBean method addSymbol.
public void addSymbol(MeasurementUnitBean unit, String currentIndent) {
SymbolBean symbol = unit.getSymbol();
StringBuffer xml = this.getXmlOutput();
String indent = this.getIndent();
ArrayList<TranslatedTextBean> texts = symbol.getTranslatedText();
xml.append(currentIndent + "<Symbol>");
xml.append(nls);
for (TranslatedTextBean text : symbol.getTranslatedText()) {
xml.append(currentIndent + indent + "<TranslatedText>" + StringEscapeUtils.escapeXml(text.getText()) + "</TranslatedText>");
xml.append(nls);
}
xml.append(currentIndent + "</Symbol>");
xml.append(nls);
}
use of org.akaza.openclinica.bean.odmbeans.SymbolBean in project OpenClinica by OpenClinica.
the class OdmExtractDAO method getBasicDefinitions.
public void getBasicDefinitions(String crfVersionOID, BasicDefinitionsBean basicDef) {
ArrayList<MeasurementUnitBean> units = basicDef.getMeasurementUnits();
String uprev = "";
this.setStudyMeasurementUnitsTypesExpected();
ArrayList rows = this.select(this.getStudyMeasurementUnitsSql(crfVersionOID));
Iterator it = rows.iterator();
while (it.hasNext()) {
HashMap row = (HashMap) it.next();
String oid = (String) row.get("mu_oid");
String name = (String) row.get("name");
MeasurementUnitBean u = new MeasurementUnitBean();
SymbolBean symbol = new SymbolBean();
ArrayList<TranslatedTextBean> texts = new ArrayList<TranslatedTextBean>();
if (uprev.equals(oid)) {
u = units.get(units.size() - 1);
symbol = u.getSymbol();
texts = symbol.getTranslatedText();
} else {
u.setOid(oid);
u.setName(name);
units.add(u);
}
TranslatedTextBean t = new TranslatedTextBean();
t.setText(name);
texts.add(t);
symbol.setTranslatedText(texts);
u.setSymbol(symbol);
}
}
use of org.akaza.openclinica.bean.odmbeans.SymbolBean in project OpenClinica by OpenClinica.
the class OdmExtractDAO method getBasicDefinitions.
public void getBasicDefinitions(int studyId, BasicDefinitionsBean basicDef) {
ArrayList<MeasurementUnitBean> units = basicDef.getMeasurementUnits();
String uprev = "";
this.setStudyMeasurementUnitsTypesExpected();
ArrayList rows = this.select(this.getStudyMeasurementUnitsSql(studyId));
Iterator it = rows.iterator();
while (it.hasNext()) {
HashMap row = (HashMap) it.next();
String oid = (String) row.get("mu_oid");
String name = (String) row.get("name");
MeasurementUnitBean u = new MeasurementUnitBean();
SymbolBean symbol = new SymbolBean();
ArrayList<TranslatedTextBean> texts = new ArrayList<TranslatedTextBean>();
if (uprev.equals(oid)) {
u = units.get(units.size() - 1);
symbol = u.getSymbol();
texts = symbol.getTranslatedText();
} else {
u.setOid(oid);
u.setName(name);
units.add(u);
}
TranslatedTextBean t = new TranslatedTextBean();
t.setText(name);
texts.add(t);
symbol.setTranslatedText(texts);
u.setSymbol(symbol);
}
}
Aggregations