commit b2ce78349b7559166b90d60c119a01a63a53ccdd
Author: Andreas Müller <a.mueller@bgbm.org>
Date:   Mon Jun 20 17:06:18 2016 +0200

    Update to mexico import #5822 / #5892

diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/app/mexico/MexicoBorhidiActivator.java b/app-import/src/main/java/eu/etaxonomy/cdm/app/mexico/MexicoBorhidiActivator.java
index e7d05f1d..72c2f278 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/app/mexico/MexicoBorhidiActivator.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/app/mexico/MexicoBorhidiActivator.java
@@ -20,6 +20,7 @@ import eu.etaxonomy.cdm.database.ICdmDataSource;
 import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
 import eu.etaxonomy.cdm.io.common.IImportConfigurator.CHECK;
 import eu.etaxonomy.cdm.io.mexico.MexicoBorhidiImportConfigurator;
+import eu.etaxonomy.cdm.io.mexico.MexicoConabioTransformer;
 import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
@@ -37,8 +38,8 @@ public class MexicoBorhidiActivator {
     //database validation status (create, update, validate ...)
     static DbSchemaValidation hbm2dll = DbSchemaValidation.CREATE;
 
-    static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
-//  static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_test();
+//    static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
+  static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_test();
 //    static final ICdmDataSource cdmDestination = CdmDestinations.cdm_mexico_rubiaceae_production();
 
     static boolean invers = true;
@@ -64,7 +65,7 @@ public class MexicoBorhidiActivator {
 //    static final boolean doTaxa = false;
 //    static final boolean doDeduplicate = true;
 
-    private void doImport(ICdmDataSource cdmDestination){
+    protected void doImport(ICdmDataSource cdmDestination){
 
         URI source = borhidi();
 
@@ -87,17 +88,11 @@ public class MexicoBorhidiActivator {
         logger.warn(message);
 
         config.setSourceReference(getSourceReference(sourceReferenceTitle));
-//        config.setDoVocabularies(doVocabularies);
 
         CdmDefaultImport<MexicoBorhidiImportConfigurator> myImport = new CdmDefaultImport<MexicoBorhidiImportConfigurator>();
 
         myImport.invoke(config);
 
-//        if (makeFeatureTree){
-//            FeatureTree tree = makeFeatureNodes(myImport.getCdmAppController().getTermService());
-//            myImport.getCdmAppController().getFeatureTreeService().saveOrUpdate(tree);
-//        }
-
         System.out.println("End import from ("+ source.toString() + ")...");
 
     }
@@ -110,15 +105,15 @@ public class MexicoBorhidiActivator {
 
     private Reference getSourceReference(@SuppressWarnings("unused") String string) {
         Reference result = ReferenceFactory.newBook();
-//        result.setTitleCache(string, true);
         result.setTitle("Rubiáceas de México");
         result.setPlacePublished("Budapest");
         result.setPublisher("Akadémiai Kiadó");
-        result.setPages("512 pp.");
-        result.setDatePublished(TimePeriodParser.parseString("2006"));
+        result.setPages("608 pp.");
+        result.setDatePublished(TimePeriodParser.parseString("2012"));
         Person borhidi = Person.NewTitledInstance("Borhidi");
         borhidi.setFirstname("Attila");
         result.setAuthorship(borhidi);
+        result.setUuid(MexicoConabioTransformer.uuidReferenceBorhidi);
         return result;
     }
 
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/app/mexico/MexicoConabioActivator.java b/app-import/src/main/java/eu/etaxonomy/cdm/app/mexico/MexicoConabioActivator.java
index 12d026e8..8e39acbb 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/app/mexico/MexicoConabioActivator.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/app/mexico/MexicoConabioActivator.java
@@ -20,8 +20,13 @@ import eu.etaxonomy.cdm.database.ICdmDataSource;
 import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
 import eu.etaxonomy.cdm.io.common.IImportConfigurator.CHECK;
 import eu.etaxonomy.cdm.io.mexico.MexicoConabioImportConfigurator;
+import eu.etaxonomy.cdm.model.agent.Person;
+import eu.etaxonomy.cdm.model.description.Feature;
+import eu.etaxonomy.cdm.model.description.FeatureNode;
+import eu.etaxonomy.cdm.model.description.FeatureTree;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
+import eu.etaxonomy.cdm.strategy.parser.TimePeriodParser;
 
 /**
  * @author a.mueller
@@ -35,15 +40,12 @@ public class MexicoConabioActivator {
     static DbSchemaValidation hbm2dll = DbSchemaValidation.VALIDATE;
 
 //    static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
-  static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_test();
-//    static final ICdmDataSource cdmDestination = CdmDestinations.cdm_mexico_production();
-
-    static boolean invers = true;
-
-//    boolean doRubiaceae = include;
-
-//    static boolean include = !invers;
+//    static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_test();
+    static final ICdmDataSource cdmDestination = CdmDestinations.cdm_mexico_rubiaceae_production();
 
+    static final boolean doTaxa = true;
+    static final boolean doDistributions = true;
+    static final boolean doCommonNames = true;
 
     //feature tree uuid
     public static final UUID featureTreeUuid = UUID.fromString("d1f4ed29-9aae-4f6e-aa1e-4a3bf780e11d");
@@ -52,17 +54,11 @@ public class MexicoConabioActivator {
     static final UUID classificationUuid = UUID.fromString("61968b43-e881-4043-b5c2-ba192e8f72dc");
     private static final String classificationName = "Rubiaceae Conabio";
 
-    static final String sourceReferenceTitle = "Conabio XXX";
+    static final String sourceReferenceTitle = "OchaXXX";
 
     //check - import
     static final CHECK check = CHECK.IMPORT_WITHOUT_CHECK;
 
-    boolean doVocabularies = (hbm2dll == DbSchemaValidation.CREATE);
-    static final boolean doTaxa = true;
-    static final boolean doDistributions = false;
-    static final boolean doCommonNames = false;
-//    static final boolean doDeduplicate = true;
-
     private void doImport(ICdmDataSource cdmDestination){
 
         URI source = conabio_rubiaceae();
@@ -77,7 +73,6 @@ public class MexicoConabioActivator {
         config.setDoCommonNames(doCommonNames);
         config.setDbSchemaValidation(hbm2dll);
         config.setSourceReferenceTitle(sourceReferenceTitle);
-//        config.setDoVocabularies(doVocabularies);
 
         config.setSource(source);
         String fileName = source.toString();
@@ -88,16 +83,15 @@ public class MexicoConabioActivator {
         logger.warn(message);
 
         config.setSourceReference(getSourceReference(sourceReferenceTitle));
-//        config.setDoVocabularies(doVocabularies);
 
         CdmDefaultImport<MexicoConabioImportConfigurator> myImport = new CdmDefaultImport<MexicoConabioImportConfigurator>();
 
         myImport.invoke(config);
 
-//        if (makeFeatureTree){
-//            FeatureTree tree = makeFeatureNodes(myImport.getCdmAppController().getTermService());
-//            myImport.getCdmAppController().getFeatureTreeService().saveOrUpdate(tree);
-//        }
+        if (true){
+            FeatureTree tree = makeFeatureNodes();
+            myImport.getCdmAppController().getFeatureTreeService().saveOrUpdate(tree);
+        }
 
         System.out.println("End import from ("+ source.toString() + ")...");
 
@@ -112,8 +106,31 @@ public class MexicoConabioActivator {
     private Reference getSourceReference(String string) {
         Reference result = ReferenceFactory.newGeneric();
         result.setTitleCache(string, true);
-//        result.setInReference(inRef);
-//        inRef.setTitleCache(sourceReferenceTitle, true);
+//        result.setTitle("Rubiáceas de México");
+//        result.setPlacePublished("Budapest");
+//        result.setPublisher("Akadémiai Kiadó");
+//        result.setPages("512 pp.");
+        result.setDatePublished(TimePeriodParser.parseString("2016"));
+        Person author = Person.NewTitledInstance(string);
+        author.setFirstname("Helga");
+        result.setAuthorship(author);
+//        result.setUuid(MexicoConabioTransformer.uuidReferenceBorhidi);
+        return result;
+    }
+
+    private FeatureTree makeFeatureNodes(){
+
+        FeatureTree result = FeatureTree.NewInstance(featureTreeUuid);
+        result.setTitleCache("Mexico Rubiaceae Feature Tree", true);
+        FeatureNode root = result.getRoot();
+        FeatureNode newNode;
+
+        newNode = FeatureNode.NewInstance(Feature.DISTRIBUTION());
+        root.addChild(newNode);
+
+        newNode = FeatureNode.NewInstance(Feature.COMMON_NAME());
+        root.addChild(newNode);
+
         return result;
     }
 
@@ -121,8 +138,11 @@ public class MexicoConabioActivator {
      * @param args
      */
     public static void main(String[] args) {
-        MexicoConabioActivator me = new MexicoConabioActivator();
-        me.doImport(cdmDestination);
+        MexicoBorhidiActivator borhidi = new MexicoBorhidiActivator();
+        borhidi.doImport(cdmDestination);
+
+        MexicoConabioActivator conabio = new MexicoConabioActivator();
+        conabio.doImport(cdmDestination);
         System.exit(0);
     }
 }
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoBorhidiExcelImport.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoBorhidiExcelImport.java
index 331ad017..13407157 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoBorhidiExcelImport.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoBorhidiExcelImport.java
@@ -88,7 +88,7 @@ public class MexicoBorhidiExcelImport<CONFIG extends MexicoBorhidiImportConfigur
         String tropicosId = record.get("OutputNameID");
         if (isNotBlank(tropicosId)){
             String tropicosIdTypeLabel = "Tropicos Name Identifier";
-            UUID uuid = MexicoBorhidiTransformer.uuidTropicosNameIdentifier;
+            UUID uuid = MexicoConabioTransformer.uuidTropicosNameIdentifier;
             TermVocabulary<DefinedTerm> voc = null;  //for now it goes to user defined voc
             DefinedTerm identifierType = this.getIdentiferType(state, uuid, tropicosIdTypeLabel, tropicosIdTypeLabel, null, voc);
             Identifier<Taxon> identifier = Identifier.NewInstance(tropicosId, identifierType);
@@ -159,7 +159,7 @@ public class MexicoBorhidiExcelImport<CONFIG extends MexicoBorhidiImportConfigur
     //                volume = volume + "(" + issue + ")";
     //            }
                 volume = volumeDetail[0];
-                String detail = volumeDetail.length > 1 ? volumeDetail[1] : null;
+                String detail = volumeDetail.length > 1 ? volumeDetail[1].trim() : null;
 
                 //            String detail = page;
                 name.setNomenclaturalMicroReference(detail);
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoBorhidiImportConfigurator.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoBorhidiImportConfigurator.java
index 4b990270..8b00c7d9 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoBorhidiImportConfigurator.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoBorhidiImportConfigurator.java
@@ -25,7 +25,7 @@ import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
 public class MexicoBorhidiImportConfigurator extends ExcelImportConfiguratorBase{
     private static final long serialVersionUID = -4793138681632122831L;
 
-    private static IInputTransformer defaultTransformer = new MexicoBorhidiTransformer();
+    private static IInputTransformer defaultTransformer = new MexicoConabioTransformer();
 
     /**
      * @param source
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoBorhidiTransformer.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoBorhidiTransformer.java
deleted file mode 100644
index 2ca8724e..00000000
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoBorhidiTransformer.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2016 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.io.mexico;
-
-import java.util.UUID;
-
-import eu.etaxonomy.cdm.io.common.mapping.InputTransformerBase;
-
-/**
- * @author a.mueller
- * @date 16.06.2016
- *
- */
-public class MexicoBorhidiTransformer extends InputTransformerBase{
-    private static final long serialVersionUID = 4308493883009041513L;
-
-    public static UUID uuidTropicosNameIdentifier = UUID.fromString("6205e531-75b0-4f2a-9a9c-b1247fb080ab");
-
-}
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioCommonNamesImport.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioCommonNamesImport.java
index 258a8c91..b9619113 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioCommonNamesImport.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioCommonNamesImport.java
@@ -12,6 +12,7 @@ package eu.etaxonomy.cdm.io.mexico;
 import java.net.URI;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Set;
 import java.util.UUID;
 
 import org.apache.commons.lang3.StringUtils;
@@ -44,30 +45,39 @@ public class MexicoConabioCommonNamesImport<CONFIG extends MexicoConabioImportCo
     private TermVocabulary<Language> languagesVoc;
     private Map<String, Language> languagesMap = new HashMap<>();
 
+    private Map<String, Taxon> taxonIdMap;
+
+
+    @Override
+    protected String getWorksheetName() {
+        return "NombresComunes";
+    }
 
     @Override
     protected void firstPass(SimpleExcelTaxonImportState<CONFIG> state) {
         initLanguageVocabulary(state);
+        initTaxa();
 
         String line = state.getCurrentLine() + ": ";
         HashMap<String, String> record = state.getOriginalRecord();
 
         String idCat = getValue(record, "IdCAT");
-        Taxon taxon = state.getHigherTaxon(idCat);
+        Taxon taxon = taxonIdMap.get(idCat);
         if (taxon == null){
             logger.warn(line + "Taxon could not be found: " + idCat);
         }else{
             TaxonDescription desc = getTaxonDescription(taxon);
             String nomComunStr = getValue(record, "NomComun");
-            String langStr = getValue(record, "Lengua");
+            String langStr = getValueNd(record, "Lengua");
             Language language = languagesMap.get(langStr);
-            if (language == null){
+            if (language == null && langStr != null){
                 logger.warn("Language not found: " + langStr);
             }
 
             String refStr = getValue(record, "ReferenciasNombreComun");
             CommonTaxonName commonName = CommonTaxonName.NewInstance(nomComunStr,
                     language, null);
+            desc.addElement(commonName);
 
             Reference ref = getReference(state, refStr);
             if (ref != null){
@@ -80,6 +90,15 @@ public class MexicoConabioCommonNamesImport<CONFIG extends MexicoConabioImportCo
         }
     }
 
+    @SuppressWarnings("unchecked")
+    private void initTaxa() {
+        if (taxonIdMap == null){
+            Set<String> existingKeys = MexicoConabioTaxonImport.taxonIdMap.keySet();
+            taxonIdMap = (Map<String, Taxon>)getCommonService().getSourcedObjectsByIdInSource(Taxon.class,
+                    existingKeys, MexicoConabioTaxonImport.TAXON_NAMESPACE);
+        }
+    }
+
     /**
      * @param state
      */
@@ -100,12 +119,31 @@ public class MexicoConabioCommonNamesImport<CONFIG extends MexicoConabioImportCo
     private void createLanguagesVoc(SimpleExcelTaxonImportState<CONFIG> state) {
         URI termSourceUri = null;
         String label = "Mexican States";
-        String description = "Mexican States as used by the CONABIO Rubiaceae database";
+        String description = "Mexican languages as used by the CONABIO Rubiaceae database";
         languagesVoc = TermVocabulary.NewInstance(TermType.Language,
                 description, label, null, termSourceUri);
         languagesVoc.setUuid(MexicoConabioTransformer.uuidMexicanLanguagesVoc);
 
-        addLanguage(state, "Aguascalientes", MexicoConabioTransformer.uuidAguascalientes);
+        addLanguage(state, "Chontal", MexicoConabioTransformer.uuidChontal);
+        addLanguage(state, "Chinanteco", MexicoConabioTransformer.uuidChinanteco);
+        addLanguage(state, "Chiapaneca", MexicoConabioTransformer.uuidChiapaneca);
+        addLanguage(state, "Huasteco", MexicoConabioTransformer.uuidHuasteco);
+        addLanguage(state, "Español-Maya", MexicoConabioTransformer.uuidEspanol_Maya);
+        addLanguage(state, "Guarijío", MexicoConabioTransformer.uuidGuarijio);
+        addLanguage(state, "Huave", MexicoConabioTransformer.uuidHuave);
+        addLanguage(state, "Español", MexicoConabioTransformer.uuidEspanol);
+        addLanguage(state, "Maya", MexicoConabioTransformer.uuidMaya);
+        addLanguage(state, "Lacandón", MexicoConabioTransformer.uuidLacandon);
+        addLanguage(state, "Inglés", MexicoConabioTransformer.uuidIngles);
+        addLanguage(state, "Itzmal", MexicoConabioTransformer.uuidItzmal);
+        addLanguage(state, "Náhuatl", MexicoConabioTransformer.uuidNahuatl);
+        addLanguage(state, "Tarahumara", MexicoConabioTransformer.uuidTarahumara);
+        addLanguage(state, "Otomí", MexicoConabioTransformer.uuidOtomi);
+        addLanguage(state, "Mixe", MexicoConabioTransformer.uuidMixe);
+        addLanguage(state, "Tseltal", MexicoConabioTransformer.uuidTseltal);
+        addLanguage(state, "Zapoteco", MexicoConabioTransformer.uuidZapoteco);
+        addLanguage(state, "Totonaco", MexicoConabioTransformer.uuidTotonaco);
+        addLanguage(state, "Tarasco", MexicoConabioTransformer.uuidTarasco);
 
         this.getVocabularyService().save(languagesVoc);
 
@@ -157,6 +195,15 @@ public class MexicoConabioCommonNamesImport<CONFIG extends MexicoConabioImportCo
         }
     }
 
+    private String getValueNd(HashMap<String, String> record, String string) {
+        String value = getValue(record, string);
+        if ("ND".equals(value)){
+            return null;
+        }else{
+            return value;
+        }
+    }
+
     @Override
     protected boolean isIgnore(SimpleExcelTaxonImportState<CONFIG> state) {
         return ! state.getConfig().isDoCommonNames();
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioDistributionImport.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioDistributionImport.java
index 0fd26bad..3d3e238a 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioDistributionImport.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioDistributionImport.java
@@ -11,12 +11,16 @@ package eu.etaxonomy.cdm.io.mexico;
 
 import java.net.URI;
 import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
 import java.util.UUID;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
+import eu.etaxonomy.cdm.ext.geo.GeoServiceArea;
+import eu.etaxonomy.cdm.ext.geo.GeoServiceAreaAnnotatedMapping;
 import eu.etaxonomy.cdm.io.common.mapping.UndefinedTransformerMethodException;
 import eu.etaxonomy.cdm.model.common.OrderedTermVocabulary;
 import eu.etaxonomy.cdm.model.common.OriginalSourceType;
@@ -45,15 +49,33 @@ public class MexicoConabioDistributionImport<CONFIG extends MexicoConabioImportC
     private OrderedTermVocabulary<NamedArea> stateAreasVoc;
     private NamedArea mexico;
 
+    private Map<String, Taxon> taxonIdMap;
+
+
+    @Override
+    protected String getWorksheetName() {
+        return "DistribucionEstatal";
+    }
+
+    @SuppressWarnings("unchecked")
+    private void initTaxa() {
+        if (taxonIdMap == null){
+            Set<String> existingKeys = MexicoConabioTaxonImport.taxonIdMap.keySet();
+            taxonIdMap = (Map<String, Taxon>)getCommonService().getSourcedObjectsByIdInSource(Taxon.class,
+                    existingKeys, MexicoConabioTaxonImport.TAXON_NAMESPACE);
+        }
+    }
+
     @Override
     protected void firstPass(SimpleExcelTaxonImportState<CONFIG> state) {
         initAreaVocabulary(state);
+        initTaxa();
 
         String line = state.getCurrentLine() + ": ";
         HashMap<String, String> record = state.getOriginalRecord();
 
         String idCat = getValue(record, "IdCAT");
-        Taxon taxon = state.getHigherTaxon(idCat);
+        Taxon taxon = taxonIdMap.get(idCat);
         if (taxon == null){
             logger.warn(line + "Taxon could not be found: " + idCat);
         }else{
@@ -61,21 +83,26 @@ public class MexicoConabioDistributionImport<CONFIG extends MexicoConabioImportC
 
             String distrStatusStr = getValue(record, "TipoDistribucion");
             try {
-                PresenceAbsenceTerm mexicanDistributionStatus = state.getTransformer().getPresenceTermByKey(distrStatusStr);
-                if (mexicanDistributionStatus != null){
-                    Distribution mexicanDistribution = Distribution.NewInstance(mexico, mexicanDistributionStatus);
-                    desc.addElement(mexicanDistribution);
-                    String refStr = getValue(record, "ReferenciaTipoDistribucion");
-                    Reference ref = getReference(state, refStr);
-                    if (ref != null){
-                        mexicanDistribution.addSource(OriginalSourceType.PrimaryTaxonomicSource,
-                                null, null, ref, null);
+                if (distrStatusStr != null){
+                    PresenceAbsenceTerm mexicanDistributionStatus = state.getTransformer().getPresenceTermByKey(distrStatusStr);
+                    if (mexicanDistributionStatus == null){
+                        UUID statusUuid = state.getTransformer().getPresenceTermUuid(distrStatusStr);
+                        mexicanDistributionStatus = getPresenceTerm(state, statusUuid,
+                                distrStatusStr, distrStatusStr, null, false);
+                    }
+                    if (mexicanDistributionStatus != null){
+                        Distribution mexicanDistribution = Distribution.NewInstance(mexico, mexicanDistributionStatus);
+                        desc.addElement(mexicanDistribution);
+                        String refStr = getValue(record, "ReferenciaTipoDistribucion");
+                        Reference ref = getReference(state, refStr);
+                        if (ref != null){
+                            mexicanDistribution.addSource(OriginalSourceType.PrimaryTaxonomicSource,
+                                    null, null, ref, null);
+                        }
                     }
-
                 }
             } catch (UndefinedTransformerMethodException e) {}
 
-
             handleDistribution(state, desc, "AGUASCALIENTES", MexicoConabioTransformer.uuidAguascalientes, line);
             handleDistribution(state, desc, "BAJA CALIFORNIA", MexicoConabioTransformer.uuidBaja_california, line);
             handleDistribution(state, desc, "BAJA CALIFORNIA SUR", MexicoConabioTransformer.uuidBaja_california_sur, line);
@@ -181,7 +208,9 @@ public class MexicoConabioDistributionImport<CONFIG extends MexicoConabioImportC
      * @param state
      * @return
      */
+    @SuppressWarnings("unchecked")
     private void createStateAreasVoc(SimpleExcelTaxonImportState<CONFIG> state) {
+        //voc
         URI termSourceUri = null;
         String label = "Mexican States";
         String description = "Mexican States as used by the CONABIO Rubiaceae database";
@@ -189,62 +218,95 @@ public class MexicoConabioDistributionImport<CONFIG extends MexicoConabioImportC
                 description, label, null, termSourceUri);
         stateAreasVoc.setUuid(MexicoConabioTransformer.uuidMexicanStatesVoc);
 
+        //mexico country
         String mexicoLabel = "Mexico (Country)";
-        NamedArea newArea = NamedArea.NewInstance(
+        mexico = NamedArea.NewInstance(
                 mexicoLabel, mexicoLabel, null);
-        newArea.setUuid(MexicoConabioTransformer.uuidMexicoCountry);
-        stateAreasVoc.addTerm(newArea);
+        mexico.setUuid(MexicoConabioTransformer.uuidMexicoCountry);
+        stateAreasVoc.addTerm(mexico);
+         addMapping(mexico, "mex_adm0", "iso", "MEX");
 
-        addArea(state, "Aguascalientes", MexicoConabioTransformer.uuidAguascalientes);
-        addArea(state, "Baja California", MexicoConabioTransformer.uuidBaja_california);
-        addArea(state, "Baja California Sur", MexicoConabioTransformer.uuidBaja_california_sur);
-        addArea(state, "Campeche", MexicoConabioTransformer.uuidCampeche);
-        addArea(state, "Coahuila de Zaragoza", MexicoConabioTransformer.uuidCoahuila_de_zaragoza);
-        addArea(state, "Colima", MexicoConabioTransformer.uuidColima);
-        addArea(state, "Chiapas", MexicoConabioTransformer.uuidChiapas);
-        addArea(state, "Chihuahua", MexicoConabioTransformer.uuidChihuahua);
-        addArea(state, "Distrito ederal", MexicoConabioTransformer.uuidDistrito_federal);
-        addArea(state, "Durango", MexicoConabioTransformer.uuidDurango);
-        addArea(state, "Guanajuato", MexicoConabioTransformer.uuidGuanajuato);
-        addArea(state, "Guerrero", MexicoConabioTransformer.uuidGuerrero);
-        addArea(state, "Hidalgo", MexicoConabioTransformer.uuidHidalgo);
-        addArea(state, "Jalisco", MexicoConabioTransformer.uuidJalisco);
-        addArea(state, "Mexico", MexicoConabioTransformer.uuidMexico);
-        addArea(state, "Michoacan de Ocampo", MexicoConabioTransformer.uuidMichoacan_de_ocampo);
-        addArea(state, "Morelos", MexicoConabioTransformer.uuidMorelos);
-        addArea(state, "Nayarit", MexicoConabioTransformer.uuidNayarit);
-        addArea(state, "Nuevo Leon", MexicoConabioTransformer.uuidNuevo_leon);
-        addArea(state, "Oaxaca", MexicoConabioTransformer.uuidOaxaca);
-        addArea(state, "Puebla", MexicoConabioTransformer.uuidPuebla);
-        addArea(state, "Queretaro de Arteaga", MexicoConabioTransformer.uuidQueretaro_de_arteaga);
-        addArea(state, "Quintana Roo", MexicoConabioTransformer.uuidQuintana_roo);
-        addArea(state, "San luis Potosi", MexicoConabioTransformer.uuidSan_luis_potosi);
-        addArea(state, "Sinaloa", MexicoConabioTransformer.uuidSinaloa);
-        addArea(state, "Sonora", MexicoConabioTransformer.uuidSonora);
-        addArea(state, "Tabasco", MexicoConabioTransformer.uuidTabasco);
-        addArea(state, "Tamaulipas", MexicoConabioTransformer.uuidTamaulipas);
-        addArea(state, "Tlaxcala", MexicoConabioTransformer.uuidTlaxcala);
-        addArea(state, "Veracruz de Ignacio de la Llave", MexicoConabioTransformer.uuidVeracruz_de_ignacio_de_la_llave);
-        addArea(state, "Yucatan", MexicoConabioTransformer.uuidYucatan);
-        addArea(state, "Zacatecas", MexicoConabioTransformer.uuidZacatecas);
+         //Example with almost all areas is Chiococca alba
+         addArea(state, "Aguascalientes", MexicoConabioTransformer.uuidAguascalientes);
+         addArea(state, "Baja California", MexicoConabioTransformer.uuidBaja_california);
+         addArea(state, "Baja California Sur", MexicoConabioTransformer.uuidBaja_california_sur);
+         addArea(state, "Campeche", MexicoConabioTransformer.uuidCampeche);
+         addArea(state, "Coahuila de Zaragoza", MexicoConabioTransformer.uuidCoahuila_de_zaragoza, "Coahuila");
+         addArea(state, "Colima", MexicoConabioTransformer.uuidColima);
+         addArea(state, "Chiapas", MexicoConabioTransformer.uuidChiapas);
+         addArea(state, "Chihuahua", MexicoConabioTransformer.uuidChihuahua);
+         addArea(state, "Distrito Federal", MexicoConabioTransformer.uuidDistrito_federal);
+         addArea(state, "Durango", MexicoConabioTransformer.uuidDurango);
+         addArea(state, "Guanajuato", MexicoConabioTransformer.uuidGuanajuato);
+         addArea(state, "Guerrero", MexicoConabioTransformer.uuidGuerrero);
+         addArea(state, "Hidalgo", MexicoConabioTransformer.uuidHidalgo);
+         addArea(state, "Jalisco", MexicoConabioTransformer.uuidJalisco);
+        //??
+        addArea(state, "México", MexicoConabioTransformer.uuidMexico, null, 15);
+        //??
+        addArea(state, "Michoacan de Ocampo", MexicoConabioTransformer.uuidMichoacan_de_ocampo, "Michoacán");
+         addArea(state, "Morelos", MexicoConabioTransformer.uuidMorelos);
+         addArea(state, "Nayarit", MexicoConabioTransformer.uuidNayarit);
+        //gibt beim mapping vielleicht Probleme wg. des Accents
+        addArea(state, "Nuevo Leon", MexicoConabioTransformer.uuidNuevo_leon, "Nuevo León");
+         addArea(state, "Oaxaca", MexicoConabioTransformer.uuidOaxaca);
+         addArea(state, "Puebla", MexicoConabioTransformer.uuidPuebla);
+        //noch testen
+        addArea(state, "Queretaro de Arteaga", MexicoConabioTransformer.uuidQueretaro_de_arteaga, "Querétaro");
+         addArea(state, "Quintana Roo", MexicoConabioTransformer.uuidQuintana_roo);
+        //Problem
+        addArea(state, "San Luis Potosí", MexicoConabioTransformer.uuidSan_luis_potosi);
+         addArea(state, "Sinaloa", MexicoConabioTransformer.uuidSinaloa);
+         addArea(state, "Sonora", MexicoConabioTransformer.uuidSonora);
+         addArea(state, "Tabasco", MexicoConabioTransformer.uuidTabasco);
+         addArea(state, "Tamaulipas", MexicoConabioTransformer.uuidTamaulipas);
+         addArea(state, "Tlaxcala", MexicoConabioTransformer.uuidTlaxcala);
+         addArea(state, "Veracruz de Ignacio de la Llave", MexicoConabioTransformer.uuidVeracruz_de_ignacio_de_la_llave, "Veracruz");
+        //??
+        addArea(state, "Yucatán", MexicoConabioTransformer.uuidYucatan);
+         addArea(state, "Zacatecas", MexicoConabioTransformer.uuidZacatecas);
 
         this.getVocabularyService().save(stateAreasVoc);
 
         return;
     }
 
+
+    private void addArea(SimpleExcelTaxonImportState<CONFIG> state, String areaLabel, UUID uuid) {
+        addArea(state, areaLabel, uuid, areaLabel);  //short cut if label and mapping label are equal
+    }
+
+    private void addArea(SimpleExcelTaxonImportState<CONFIG> state, String areaLabel, UUID uuid, String mappingLabel) {
+        addArea(state, areaLabel, uuid, mappingLabel, null);  //short cut if label and mapping label are equal
+    }
+
+
     /**
      * @param state
      * @param string
      * @param uuidaguascalientes
      */
-    private void addArea(SimpleExcelTaxonImportState<CONFIG> state, String areaLabel, UUID uuid) {
+    private void addArea(SimpleExcelTaxonImportState<CONFIG> state, String areaLabel, UUID uuid, String mappingLabel, Integer id1) {
         String abbrev = null;
         NamedArea newArea = NamedArea.NewInstance(
                 areaLabel, areaLabel, abbrev);
         newArea.setUuid(uuid);
         newArea.setPartOf(mexico);
         stateAreasVoc.addTerm(newArea);
+        if (id1 != null){
+            addMapping(newArea, "mex_adm1", "id_1", String.valueOf(id1));
+        }else if (mappingLabel != null){
+            addMapping(newArea, "mex_adm1", "name_1", mappingLabel);
+        }
+
+
+    }
+
+    private void addMapping(NamedArea area, String mapping_layer, String mapping_field, String abbrev) {
+        GeoServiceAreaAnnotatedMapping mapping = (GeoServiceAreaAnnotatedMapping)this.getBean("geoServiceAreaAnnotatedMapping");
+        GeoServiceArea geoServiceArea = new GeoServiceArea();
+        geoServiceArea.add(mapping_layer, mapping_field, abbrev);
+        mapping.set(area, geoServiceArea);
     }
 
     @Override
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioImportConfigurator.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioImportConfigurator.java
index fb87f7fe..76a54077 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioImportConfigurator.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioImportConfigurator.java
@@ -52,7 +52,9 @@ public class MexicoConabioImportConfigurator extends ExcelImportConfiguratorBase
     @Override
     protected void makeIoClassList() {
         ioClassList = new Class[]{
-                MexicoConabioTaxonImport.class
+                MexicoConabioTaxonImport.class,
+                MexicoConabioDistributionImport.class,
+                MexicoConabioCommonNamesImport.class
         };
     }
 
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioImportState.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioImportState.java
deleted file mode 100644
index 8f19321e..00000000
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioImportState.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2016 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.io.mexico;
-
-import org.apache.log4j.Logger;
-
-import eu.etaxonomy.cdm.io.excel.common.ExcelImportState;
-import eu.etaxonomy.cdm.io.excel.common.ExcelRowBase;
-
-/**
- * @author a.mueller
- * @date 16.06.2016
- *
- */
-public class MexicoConabioImportState extends ExcelImportState<MexicoConabioImportConfigurator, ExcelRowBase>{
-
-    @SuppressWarnings("unused")
-    private static final Logger logger = Logger.getLogger(MexicoConabioImportState.class);
-
-    /**
-     * @param config
-     */
-    public MexicoConabioImportState(MexicoConabioImportConfigurator config) {
-        super(config);
-    }
-
-}
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioTaxonImport.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioTaxonImport.java
index 0e202148..fad1d129 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioTaxonImport.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioTaxonImport.java
@@ -11,6 +11,7 @@ package eu.etaxonomy.cdm.io.mexico;
 
 import java.util.Arrays;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -24,6 +25,7 @@ import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.agent.Team;
 import eu.etaxonomy.cdm.model.common.Annotation;
 import eu.etaxonomy.cdm.model.common.AnnotationType;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.Extension;
 import eu.etaxonomy.cdm.model.common.ExtensionType;
 import eu.etaxonomy.cdm.model.common.Language;
@@ -42,6 +44,8 @@ import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.cdm.strategy.exceptions.UnknownCdmTypeException;
 import eu.etaxonomy.cdm.strategy.parser.TimePeriodParser;
 
@@ -58,7 +62,15 @@ public class MexicoConabioTaxonImport<CONFIG extends MexicoConabioImportConfigur
 
     private static final Logger logger = Logger.getLogger(MexicoConabioTaxonImport.class);
 
-    private final Map<String, TaxonBase<?>> taxonIdMap = new HashMap<>();
+    public static final String TAXON_NAMESPACE = "Taxonomia";
+
+    @Override
+    protected String getWorksheetName() {
+        return "Taxonomia";
+    }
+
+    //dirty I know, but who cares, needed by distribution and commmon name import
+    protected static final Map<String, TaxonBase<?>> taxonIdMap = new HashMap<>();
 
     private Classification classification;
 
@@ -122,13 +134,10 @@ public class MexicoConabioTaxonImport<CONFIG extends MexicoConabioImportConfigur
         }
 
         String idCat = getValue(record, "IdCAT");
-        this.addOriginalSource(taxonBase, idCat, "IdCAT", state.getConfig().getSourceReference());
+        this.addOriginalSource(taxonBase, idCat, TAXON_NAMESPACE, state.getConfig().getSourceReference());
 
         getTaxonService().save(taxonBase);
         taxonIdMap.put(idCat, taxonBase);
-        if (taxonBase instanceof Taxon){
-            state.putHigherTaxon(idCat, (Taxon)taxonBase);
-        }
 
     }
 
@@ -182,7 +191,6 @@ public class MexicoConabioTaxonImport<CONFIG extends MexicoConabioImportConfigur
 
         String authorStr = getValueNd(record, "AutorSinAnio");
         String nameStr = getValue(record, "Nombre");
-        String fullNameStr = nameStr + (authorStr != null ? " " + authorStr : "");
         String nomRefStr = getValue(record, "CitaNomenclatural");
         String refType = getValue(record, "ReferenceType");
         String idCat = getValue(record, "IdCAT");
@@ -191,10 +199,16 @@ public class MexicoConabioTaxonImport<CONFIG extends MexicoConabioImportConfigur
         Rank rank = null;
         try {
             rank = state.getTransformer().getRankByKey(rankStr);
+            if (Rank.SUBSPECIES().equals(rank) || Rank.VARIETY().equals(rank)){
+                int i = nameStr.lastIndexOf(" ");
+                nameStr = nameStr.substring(0, i) + " " + rank.getAbbreviation() + nameStr.substring(i);
+            }
         } catch (UndefinedTransformerMethodException e) {
             logger.warn(line + "Rank not recognized: " + rankStr);
         }
 
+        String fullNameStr = nameStr + (authorStr != null ? " " + authorStr : "");
+
         BotanicalName fullName = (BotanicalName)nameParser.parseFullName(fullNameStr, NomenclaturalCode.ICNAFP, rank);
         if (fullName.isProtectedTitleCache()){
             logger.warn(line + "Name could not be parsed: " + fullNameStr );
@@ -203,35 +217,32 @@ public class MexicoConabioTaxonImport<CONFIG extends MexicoConabioImportConfigur
         }
         BotanicalName existingName = getExistingName(state, fullName);
 
-        String refNameStr = fullNameStr;
-        if ("A".equals(refType)){  //Article
-            refNameStr = fullNameStr + " in " + nomRefStr;
-        }else if ("B".equals(refType)){   //Book
-            refNameStr = fullNameStr + ", " + nomRefStr;
-        }
+        String refNameStr = getRefNameStr(nomRefStr, refType, fullNameStr);
 
-        BotanicalName referencedName = (BotanicalName)nameParser.parseFullName(refNameStr, NomenclaturalCode.ICNAFP, rank);
+        BotanicalName referencedName = (BotanicalName)nameParser.parseReferencedName(refNameStr, NomenclaturalCode.ICNAFP, rank);
         if (referencedName.isProtectedFullTitleCache() || referencedName.isProtectedTitleCache()){
             logger.warn(line + "Referenced name could not be parsed: " + refNameStr );
-            BotanicalName tmp = (BotanicalName)nameParser.parseFullName(refNameStr, NomenclaturalCode.ICNAFP, rank);
-
         }else{
             replaceAuthorNames(state, referencedName);
         }
 
         BotanicalName result= referencedName;
+        Boolean equal = null;
         if (existingName != null){
             String existingRefTitle = existingName.getFullTitleCache();
             String conabioRefTitle = referencedName.getFullTitleCache();
-            addNomRefExtension(state, referencedName);
             if (!existingRefTitle.equals(conabioRefTitle)){
                 existingName.setNomenclaturalMicroReference(referencedName.getNomenclaturalMicroReference());
                 existingName.setNomenclaturalReference(referencedName.getNomenclaturalReference());
-                result = existingName;
+                equal = false;
+            }else{
+                equal = true;
             }
+            result = existingName;
         }
+        addNomRefExtension(state, result, equal);
 
-        if (annotation != null && (annotation.equals("nom. illeg.") || annotation.equals("nom. cons."))){
+        if (annotation != null && ! annotation.equals("nom. illeg.") && ! annotation.equals("nom. cons.")){
             try {
                 NomenclaturalStatusType nomStatusType = NomenclaturalStatusType.getNomenclaturalStatusTypeByAbbreviation(annotation, result);
                 result.addStatus(NomenclaturalStatus.NewInstance(nomStatusType));
@@ -240,21 +251,42 @@ public class MexicoConabioTaxonImport<CONFIG extends MexicoConabioImportConfigur
             }
         }
 
-        this.addOriginalSource(result, idCat, "IdCAT", state.getConfig().getSourceReference());
+        this.addOriginalSource(result, idCat, TAXON_NAMESPACE + "_Name", state.getConfig().getSourceReference());
 
         return result;
     }
 
+
+
+    /**
+     * @param nomRefStr
+     * @param refType
+     * @param fullNameStr
+     * @return
+     */
+    private String getRefNameStr(String nomRefStr, String refType, String fullNameStr) {
+        String refNameStr = fullNameStr;
+        if ("A".equals(refType)){  //Article
+            refNameStr = fullNameStr + " in " + nomRefStr;
+        }else if ("B".equals(refType)){   //Book
+            refNameStr = fullNameStr + ", " + nomRefStr;
+        }
+        return refNameStr;
+    }
+
     /**
      * @param state
+     * @param equal
      * @param referencedName
      */
-    private void addNomRefExtension(SimpleExcelTaxonImportState<CONFIG> state, BotanicalName name) {
+    private void addNomRefExtension(SimpleExcelTaxonImportState<CONFIG> state, BotanicalName name, Boolean equal) {
+        String equalStr = equal == null ? "" : equal == true ? "EQUAL\n" : "NOT EQUAL\n";
+        name.setFullTitleCache(null, false);
         String newExtensionStr = name.getFullTitleCache() + " - CONABIO";
         UUID uuidNomRefExtension = MexicoConabioTransformer.uuidNomRefExtension;
         for (Extension extension : name.getExtensions()){
             if (extension.getType().getUuid().equals(uuidNomRefExtension)){
-                extension.setValue(extension.getValue() + "\n" + newExtensionStr);
+                extension.setValue(equalStr + extension.getValue() + "\n" + newExtensionStr);
                 return;
             }
         }
@@ -318,21 +350,66 @@ public class MexicoConabioTaxonImport<CONFIG extends MexicoConabioImportConfigur
             if (parent == null){
                 logger.warn(line + "Parent is missing: "+ parentStr);
             }else{
+                Taxon taxon = (Taxon)taxonBase;
                 Reference relRef = null;  //TODO
-                classification.addParentChild(parent, (Taxon)taxonBase, relRef, null);
+                classification.addParentChild(parent, taxon, relRef, null);
+                makeConceptRelation(line, taxon.getName());
+
             }
         }else if (statusStr.startsWith("sin")){
             parent = (Taxon)taxonIdMap.get(relStr);
             if (parent == null){
-                logger.warn(line + "Parent is missing: "+ relStr);
+                logger.warn(line + "Accepted taxon is missing: "+ relStr);
             }else{
+                Synonym synonym = (Synonym)taxonBase;
                 Reference synRef = null; //null
-                parent.addSynonym((Synonym)taxonBase, SynonymRelationshipType.SYNONYM_OF(), synRef, null);
+                parent.addSynonym(synonym, SynonymRelationshipType.SYNONYM_OF(), synRef, null);
+                makeConceptRelation(line, synonym.getName());
             }
         }
     }
 
      /**
+     * @param line
+     * @param name
+     */
+    private void makeConceptRelation(String line, TaxonNameBase<?,?> name) {
+        if (name.getTaxonBases().size()==2){
+            Iterator<TaxonBase> it = name.getTaxonBases().iterator();
+            Taxon taxon1 = getAccepted(it.next());
+            Taxon taxon2 = getAccepted(it.next());
+            Reference citation = null;
+            TaxonRelationship rel;
+            if (taxon1.getSec().getUuid().equals(MexicoConabioTransformer.uuidReferenceBorhidi)){
+                rel = taxon1.addTaxonRelation(taxon2, TaxonRelationshipType.CONGRUENT_TO(),
+                        citation, null);
+            }else{
+                rel = taxon2.addTaxonRelation(taxon1, TaxonRelationshipType.CONGRUENT_TO(),
+                        citation, null);
+            }
+            rel.setDoubtful(true);
+        }else if (name.getTaxonBases().size()>2){
+            logger.warn(line + "Names with more than 2 taxa not yet handled");
+        }
+
+    }
+
+    /**
+     * @param next
+     * @return
+     */
+    private Taxon getAccepted(TaxonBase<?> taxonBase) {
+        if (taxonBase.isInstanceOf(Taxon.class)){
+            return CdmBase.deproxy(taxonBase, Taxon.class);
+        }else{
+            Synonym syn = CdmBase.deproxy(taxonBase, Synonym.class);
+            return syn.getAcceptedTaxa().iterator().next();
+        }
+    }
+
+
+
+    /**
      * @return
      */
     private Classification getClassification(SimpleExcelTaxonImportState<CONFIG> state) {
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioTransformer.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioTransformer.java
index 4560e262..32baacfa 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioTransformer.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioTransformer.java
@@ -30,8 +30,17 @@ public class MexicoConabioTransformer extends InputTransformerBase{
 
     private static final Logger logger = Logger.getLogger(MexicoConabioTransformer.class);
 
+    public static UUID uuidTropicosNameIdentifier = UUID.fromString("6205e531-75b0-4f2a-9a9c-b1247fb080ab");
+    public static UUID uuidReferenceBorhidi = UUID.fromString("f76a535b-a1fd-437c-a09d-f94eddae2b5e");
+
+
     public static final UUID uuidNomRefExtension = UUID.fromString("0a7e2f5f-c62d-43e1-874a-07cb1dbb9fa0");
 
+    public static final UUID uuidStatusExotica = UUID.fromString("f7264a1d-5037-4d9a-9758-d81fea057e1b");
+    public static final UUID uuidStatusExoticaInvasora = UUID.fromString("4d135810-4af8-48ca-82f4-d4741d00d067");
+
+
+
     public static final UUID uuidMexicanStatesVoc = UUID.fromString("88556d4c-a171-4e14-ac56-3154d88f429b");
 
     public static final UUID uuidMexicoCountry = UUID.fromString("b451ccd8-dd40-4804-b507-1ba46fad151a");
@@ -123,7 +132,6 @@ public class MexicoConabioTransformer extends InputTransformerBase{
         }else if (key.equals("Endémica")){
             return PresenceAbsenceTerm.ENDEMIC_FOR_THE_RELEVANT_AREA();
         }else{
-            logger.warn("PresenceTerm not yet implemented: " + key);
             return null;
         }
     }
@@ -131,8 +139,16 @@ public class MexicoConabioTransformer extends InputTransformerBase{
 
     @Override
     public UUID getPresenceTermUuid(String key) throws UndefinedTransformerMethodException {
-        // TODO Auto-generated method stub
-        return super.getPresenceTermUuid(key);
+        if (StringUtils.isBlank(key)){
+            return null;
+        }else if (key.equals("Exótica")){
+            return uuidStatusExotica;
+        }else if (key.equals("Exótica-Invasora")){
+            return uuidStatusExoticaInvasora;
+        }else{
+            logger.warn("PresenceTerm not yet implemented: " + key);
+            return null;
+        }
     }
 
 
