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, "settings", exp.getSettings());
addUpload(exp.getWorkflow(), experiment, "workflow", addDigitalObjectData);
Element results = experiment.addElement("results");
for (Entry<SampleObject, DigitalObject> entry : exp.getResults().entrySet()) {
Element result = addUpload(entry.getValue(), results, "result", addDigitalObjectData);
if (result != null) {
result.addAttribute("key", entry.getKey().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());