import org.apache.commons.io.IOUtils;
+import eu.etaxonomy.cdm.io.common.ExportType;
import eu.etaxonomy.cdm.model.common.ICdmBase;
/**
* @author k.luther
- * @date 16.03.2017
+ * @since 16.03.2017
*
*/
public class CdmLightExportResultProcessor {
}
}
+ public String[] getRecord(CdmLightExportTable table, String id){
+ return result.get(table).get(id);
+
+ }
/**
* @param table
* @param csvLine
*/
public void put(CdmLightExportTable table, ICdmBase cdmBase, String[] csvLine) {
- this.put(table, String.valueOf(cdmBase.getId()), csvLine);
+ this.put(table, cdmBase.getUuid().toString(), csvLine);
}
public void createFinalResult(CdmLightExportState state) {
if (!result.isEmpty() ){
+ state.setAuthorStore(new HashMap<>());
+ state.setHomotypicalGroupStore(new HashMap<>());
+ state.setReferenceStore(new HashMap<>());
+ state.setSpecimenStore(new HashMap<>());
+ state.setNodeChildrenMap(new HashMap<>());
//Replace quotes by double quotes
for (CdmLightExportTable table: result.keySet()){
//schreibe jede Tabelle in einen Stream...
}
state.getResult().putExportData(table.getTableName(), exportStream.toByteArray());
+ state.getResult().setExportType(ExportType.CDM_LIGHT);
}
}