BGBM BDI Projects
/
cdmlib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ref #7903: add comparator for taxa in cdm light configurator
[cdmlib.git]
/
cdmlib-io
/
src
/
main
/
java
/
eu
/
etaxonomy
/
cdm
/
io
/
cdmLight
/
CdmLightExportResultProcessor.java
diff --git
a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/cdmLight/CdmLightExportResultProcessor.java
b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/cdmLight/CdmLightExportResultProcessor.java
index dfe765c299b0f856e81b6cbec332d5d599d4edc3..3899075959ebbb84d817858aeed8e199a9190754 100755
(executable)
--- a/
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/cdmLight/CdmLightExportResultProcessor.java
+++ b/
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/cdmLight/CdmLightExportResultProcessor.java
@@
-17,12
+17,13
@@
import java.util.Map;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.IOUtils;
+import eu.etaxonomy.cdm.io.common.ExportType;
import eu.etaxonomy.cdm.model.common.ICdmBase;
/**
* @author k.luther
import eu.etaxonomy.cdm.model.common.ICdmBase;
/**
* @author k.luther
- * @
dat
e 16.03.2017
+ * @
sinc
e 16.03.2017
*
*/
public class CdmLightExportResultProcessor {
*
*/
public class CdmLightExportResultProcessor {
@@
-79,6
+80,10
@@
public class CdmLightExportResultProcessor {
}
}
}
}
+ public String[] getRecord(CdmLightExportTable table, String id){
+ return result.get(table).get(id);
+
+ }
/**
* @param table
/**
* @param table
@@
-86,7
+91,7
@@
public class CdmLightExportResultProcessor {
* @param csvLine
*/
public void put(CdmLightExportTable table, ICdmBase cdmBase, String[] csvLine) {
* @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);
}
}
@@
-96,6
+101,11
@@
public class CdmLightExportResultProcessor {
public void createFinalResult(CdmLightExportState state) {
if (!result.isEmpty() ){
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...
//Replace quotes by double quotes
for (CdmLightExportTable table: result.keySet()){
//schreibe jede Tabelle in einen Stream...
@@
-125,6
+135,7
@@
public class CdmLightExportResultProcessor {
}
state.getResult().putExportData(table.getTableName(), exportStream.toByteArray());
}
state.getResult().putExportData(table.getTableName(), exportStream.toByteArray());
+ state.getResult().setExportType(ExportType.CDM_LIGHT);
}
}
}
}