ref #7334, ref #6627 Adapted CDM light to support pp synonyms (cont.)
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 16 May 2018 12:13:38 +0000 (14:13 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 16 May 2018 12:27:58 +0000 (14:27 +0200)
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/cdmLight/CdmLightClassificationExport.java
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/cdmLight/CdmLightExportTable.java

index a00759f14cd7b59050177e08f54a2611506b0926..947655b6a2fad4ad5d22f875111361d8eaeb0a07 100755 (executable)
@@ -747,16 +747,16 @@ public class CdmLightClassificationExport
             //As we currently do have only 1 reference column in CDM light the synonym relationship
             //reference is used here. This is according to how pro parte synonyms were mapped to
             //concept relationships in #7334
-            Reference secRef = rel.getCitation();
-            csvLine[table.getIndex(CdmLightExportTable.SEC_REFERENCE_FK)] = getId(state, secRef);
-            csvLine[table.getIndex(CdmLightExportTable.SEC_REFERENCE)] = getTitleCache(secRef);
-
-//            Reference secRef = ppSyonym.getSec();
+//            Reference secRef = rel.getCitation();
 //            csvLine[table.getIndex(CdmLightExportTable.SEC_REFERENCE_FK)] = getId(state, secRef);
 //            csvLine[table.getIndex(CdmLightExportTable.SEC_REFERENCE)] = getTitleCache(secRef);
-//            Reference synSecRef = rel.getCitation();
-//            csvLine[table.getIndex(CdmLightExportTable.SYN_SEC_REFERENCE_FK)] = getId(state, secRef);
-//            csvLine[table.getIndex(CdmLightExportTable.SYN_SEC_REFERENCE)] = getTitleCache(secRef);
+
+            Reference secRef = ppSyonym.getSec();
+            csvLine[table.getIndex(CdmLightExportTable.SEC_REFERENCE_FK)] = getId(state, secRef);
+            csvLine[table.getIndex(CdmLightExportTable.SEC_REFERENCE)] = getTitleCache(secRef);
+            Reference synSecRef = rel.getCitation();
+            csvLine[table.getIndex(CdmLightExportTable.SYN_SEC_REFERENCE_FK)] = getId(state, secRef);
+            csvLine[table.getIndex(CdmLightExportTable.SYN_SEC_REFERENCE)] = getTitleCache(secRef);
 
             //pro parte type
             TaxonRelationshipType type = rel.getType();
index 0d94ac65e96eeea1fb442431c3a2e94b4ba36b69..5bbc88bc04ff7dce590ee0749e5fd34e5ba34eb9 100644 (file)
@@ -45,6 +45,9 @@ public enum CdmLightExportTable {
     protected static final String PARENT_FK = "Parent_FK";
     protected static final String SEC_REFERENCE_FK = "SecReference_FK";
     protected static final String SEC_REFERENCE = "SecReference";
+    protected static final String SYN_SEC_REFERENCE_FK = "SynSecReference_FK";
+    protected static final String SYN_SEC_REFERENCE = "SynSecReference";
+
     protected static final String IS_PRO_PARTE = "IsProParteSynonym";
     protected static final String IS_PARTIAL = "IsPartial";
     protected static final String IS_MISAPPLIED = "IsMisapplied";