addStringElement(resourceDescr, "configSettings", a.getResourceDescription().getConfigSettings());
addStringElement(resourceDescr, "reasonForConsidering", a.getResourceDescription().getReasonForConsidering());
addChangeLog(a.getResourceDescription().getChangeLog(), resourceDescr);
Element experiment = alt.addElement("experiment");
Experiment exp = a.getExperiment();
addStringElement(experiment, "description", exp.getDescription());
//addStringElement(experiment, "runDescription", exp.getRunDescription());
addStringElement(experiment, "settings", exp.getSettings());
uploads = experiment.addElement("results");
for (SampleObject record : exp.getResults().keySet()) {
DigitalObject up = exp.getResults().get(record);
if (up != null) {
// only existing uploads are exported
Element upload = addUpload(up, uploads, "result", encoder, uploadIDs);
if (upload != null) {
upload.addAttribute("key", record.getShortName());
}
}
}
// // */experiment/xcdlDescriptions/xcdlDescription
// Element xcdls = experiment.addElement("xcdlDescriptions");
// for (SampleObject record : exp.getResults().keySet()) {
// DigitalObject result = exp.getResults().get(record);
// if (result != null) {
// XcdlDescription x = result.getXcdlDescription();
// if (x != null) {
// // only existing xcdls are exported
// Element upload = addUpload(x, xcdls, "xcdlDescription", encoder, uploadIDs);
// if (upload != null) {
// upload.addAttribute("key", record.getShortName());
// }
// }
// }
// }
// export detailed experiment info's
Element detailedInfos = experiment.addElement("detailedInfos");
for (SampleObject record : exp.getDetailedInfo().keySet()) {
DetailedExperimentInfo dinfo = exp.getDetailedInfo().get(record);
Element detailedInfo = detailedInfos.addElement("detailedInfo")
.addAttribute("key", record.getShortName())
.addAttribute("successful", ""+dinfo.getSuccessful());
addStringElement(detailedInfo, "programOutput", dinfo.getProgramOutput());
addStringElement(detailedInfo, "cpr", dinfo.getCpr());