cleanup
[cdmlib.git] / cdmlib-io / src / main / java / eu / etaxonomy / cdm / io / cdmLight / CdmLightClassificationExport.java
index 2bbb9218585746c57eb5b91204700a02cb13fb93..2f19184b9024b03b450a73f7d2fb501ca2c07dd0 100755 (executable)
@@ -112,6 +112,8 @@ import eu.etaxonomy.cdm.strategy.cache.TaggedText;
 import eu.etaxonomy.cdm.strategy.exceptions.UnknownCdmTypeException;
 
 /**
+ * The export exporting a classification or a taxonomic subtree into CDM light.
+ *
  * @author k.luther
  * @since 15.03.2017
  */
@@ -164,7 +166,7 @@ public class CdmLightClassificationExport
             if (state.getRootId() != null) {
                 List<TaxonNodeDto> childrenOfRoot = state.getNodeChildrenMap().get(state.getRootId());
 
-                Comparator<TaxonNodeDto> comp = state.getConfig().getComparator();
+                Comparator<TaxonNodeDto> comp = state.getConfig().getTaxonNodeComparator();
                 if (comp == null) {
                     comp = new TaxonNodeDtoByRankAndNameComparator();
                 }
@@ -221,7 +223,7 @@ public class CdmLightClassificationExport
         if (children == null) {
             return null;
         }
-        Comparator<TaxonNodeDto> comp = state.getConfig().getComparator();
+        Comparator<TaxonNodeDto> comp = state.getConfig().getTaxonNodeComparator();
         if (comp == null) {
             comp = new TaxonNodeDtoByRankAndNameComparator();
         }
@@ -429,6 +431,9 @@ public class CdmLightClassificationExport
     }
 
     private void handleDescriptions(CdmLightExportState state, CdmBase cdmBase) {
+        if (!state.getConfig().isDoFactualData()) {
+            return;
+        }
         String titleCache = null;
         try {