commit 31e57990ad3dc2c278171f2ea7e0646aa321a2d1
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Fri Mar 15 08:18:45 2019 +0100

    Adapt imports to tem model changes

diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/PlantGlossaryCategoryAsPropertiesImport.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/PlantGlossaryCategoryAsPropertiesImport.java
index d455eb18..02a8a961 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/PlantGlossaryCategoryAsPropertiesImport.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/PlantGlossaryCategoryAsPropertiesImport.java
@@ -18,8 +18,9 @@ import org.springframework.stereotype.Component;
 import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.cdm.io.csv.in.CsvImportBase;
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
-import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.reference.OriginalSourceType;
+import eu.etaxonomy.cdm.model.term.DefinedTerm;
+import eu.etaxonomy.cdm.model.term.TermType;
 import eu.etaxonomy.cdm.model.term.TermVocabulary;
 
 /**
@@ -53,7 +54,7 @@ public class PlantGlossaryCategoryAsPropertiesImport extends CsvImportBase<Plant
 
         String description = currentRecord.get(HEADER_DESCRIPTION);
         String uri = currentRecord.get(HEADER_URI);
-        Feature property = Feature.NewInstance(description, label, null);
+        DefinedTerm property = DefinedTerm.NewInstance(TermType.Property, description, label, null);
         property.setUri(URI.create(uri));
         property.setIdInVocabulary(label);
 
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/PlantGlossaryCategoryImport.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/PlantGlossaryCategoryImport.java
index 31d7842e..9544fd20 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/PlantGlossaryCategoryImport.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/PlantGlossaryCategoryImport.java
@@ -21,6 +21,7 @@ import eu.etaxonomy.cdm.model.common.Annotation;
 import eu.etaxonomy.cdm.model.common.AnnotationType;
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
 import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.description.State;
 import eu.etaxonomy.cdm.model.reference.OriginalSourceType;
 import eu.etaxonomy.cdm.model.term.TermType;
 import eu.etaxonomy.cdm.model.term.TermVocabulary;
@@ -56,7 +57,7 @@ public class PlantGlossaryCategoryImport extends CsvImportBase<PlantGlossaryCsvI
             return;
         }
 
-        TermVocabulary<?> stateVoc = TermVocabulary.NewInstance(
+        TermVocabulary<State> stateVoc = TermVocabulary.NewInstance(
                 TermType.State,
                 currentRecord.get(HEADER_DESCRIPTION),
                 vocName,
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/PlantGlossaryCsvImportState.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/PlantGlossaryCsvImportState.java
index 75ef451a..a379c80b 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/PlantGlossaryCsvImportState.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/PlantGlossaryCsvImportState.java
@@ -23,11 +23,11 @@ import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.agent.Team;
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
 import eu.etaxonomy.cdm.model.common.VerbatimTimePeriod;
-import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.description.State;
 import eu.etaxonomy.cdm.model.reference.OriginalSourceType;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
+import eu.etaxonomy.cdm.model.term.DefinedTerm;
 import eu.etaxonomy.cdm.model.term.TermType;
 import eu.etaxonomy.cdm.model.term.TermVocabulary;
 
@@ -39,7 +39,7 @@ import eu.etaxonomy.cdm.model.term.TermVocabulary;
  */
 public class PlantGlossaryCsvImportState extends CsvImportState<PlantGlossaryCsvImportConfigurator> {
 
-    private TermVocabulary<Feature> propertyVoc;
+    private TermVocabulary<DefinedTerm> propertyVoc;
     private List<TermVocabulary> existingVocabularies = new ArrayList<>();
     private List<State> existingTerms = new ArrayList<>();
     private Set<TermVocabulary> vocabularies = new HashSet<>();
@@ -72,7 +72,7 @@ public class PlantGlossaryCsvImportState extends CsvImportState<PlantGlossaryCsv
         } catch (URISyntaxException e) {
         }
 
-        propertyVoc = TermVocabulary.NewInstance(TermType.Feature, Feature.class);
+        propertyVoc = TermVocabulary.NewInstance(TermType.Property, DefinedTerm.class);
         propertyVoc.setLabel("Plant Glossary Properties");
         propertyVoc.addSource(IdentifiableSource.NewInstance(OriginalSourceType.Import, citation.getTitle(), null, citation, null));
     }
@@ -82,7 +82,7 @@ public class PlantGlossaryCsvImportState extends CsvImportState<PlantGlossaryCsv
         super.resetSession();
     }
 
-    public TermVocabulary<Feature> getPropertyVoc() {
+    public TermVocabulary<DefinedTerm> getPropertyVoc() {
         return propertyVoc;
     }
 
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/kew/KewPlantGlossaryActivator.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/kew/KewPlantGlossaryActivator.java
index 13492aa3..915a6965 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/kew/KewPlantGlossaryActivator.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/kew/KewPlantGlossaryActivator.java
@@ -6,6 +6,7 @@ import java.net.URI;
 import org.apache.log4j.Logger;
 
 import eu.etaxonomy.cdm.app.common.CdmDestinations;
+import eu.etaxonomy.cdm.database.DatabaseTypeEnum;
 import eu.etaxonomy.cdm.database.DbSchemaValidation;
 import eu.etaxonomy.cdm.database.ICdmDataSource;
 import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
@@ -43,8 +44,8 @@ public class KewPlantGlossaryActivator {
 	public static void main(String[] args) {
 		KewPlantGlossaryActivator activator = new KewPlantGlossaryActivator();
 		try {
-//	        ICdmDataSource dataSource = CdmDestinations.makeDestination(DatabaseTypeEnum.MySQL, "127.0.0.1", "empty", 3306, "root", null);
-	        ICdmDataSource dataSource = CdmDestinations.cdm_additivity_ontology();
+	        ICdmDataSource dataSource = CdmDestinations.makeDestination(DatabaseTypeEnum.MySQL, "127.0.0.1", "empty", 3306, "root", null);
+//	        ICdmDataSource dataSource = CdmDestinations.cdm_additivity_ontology();
             activator.doImport(dataSource);
         } catch (IOException e) {
             e.printStackTrace();
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/kew/KewPlantGlossaryCsvImportState.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/kew/KewPlantGlossaryCsvImportState.java
index 470b79a2..2abc9bde 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/kew/KewPlantGlossaryCsvImportState.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/kew/KewPlantGlossaryCsvImportState.java
@@ -16,9 +16,9 @@ import eu.etaxonomy.cdm.io.csv.in.CsvImportState;
 import eu.etaxonomy.cdm.model.agent.Institution;
 import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.common.VerbatimTimePeriod;
-import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
+import eu.etaxonomy.cdm.model.term.DefinedTerm;
 import eu.etaxonomy.cdm.model.term.DefinedTermBase;
 import eu.etaxonomy.cdm.model.term.TermType;
 import eu.etaxonomy.cdm.model.term.TermVocabulary;
@@ -35,12 +35,12 @@ public class KewPlantGlossaryCsvImportState extends CsvImportState<KewPlantGloss
     private List<TermVocabulary> existingVocabularies = new ArrayList<>();
     private List<UuidAndTitleCache<DefinedTermBase>> existingTerms = new ArrayList<>();
     private final Reference citation;
-    private final TermVocabulary<Feature> structureVoc;
+    private final TermVocabulary<DefinedTerm> structureVoc;
 
 
     protected KewPlantGlossaryCsvImportState(KewPlantGlossaryCsvImportConfigurator config) {
         super(config);
-        structureVoc = TermVocabulary.NewInstance(TermType.Feature);
+        structureVoc = TermVocabulary.NewInstance(TermType.Structure, DefinedTerm.class);
         structureVoc.setLabel("Structures");
 
         citation = ReferenceFactory.newBook();
@@ -66,7 +66,7 @@ public class KewPlantGlossaryCsvImportState extends CsvImportState<KewPlantGloss
         return existingTerms.stream().anyMatch(term->term.getTitleCache().equals(termName));
     }
 
-    TermVocabulary<Feature> getStructureVoc() {
+    TermVocabulary<DefinedTerm> getStructureVoc() {
         return structureVoc;
     }
 
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/kew/KewPlantGlossaryImport.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/kew/KewPlantGlossaryImport.java
index 21d5447e..6b4f159d 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/kew/KewPlantGlossaryImport.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/plantglossary/kew/KewPlantGlossaryImport.java
@@ -17,8 +17,9 @@ import org.springframework.stereotype.Component;
 import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.cdm.io.csv.in.CsvImportBase;
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
-import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.reference.OriginalSourceType;
+import eu.etaxonomy.cdm.model.term.DefinedTerm;
+import eu.etaxonomy.cdm.model.term.TermType;
 import eu.etaxonomy.cdm.model.term.TermVocabulary;
 
 /**
@@ -52,7 +53,7 @@ public class KewPlantGlossaryImport extends CsvImportBase<KewPlantGlossaryCsvImp
             return;
         }
 
-        Feature structure = Feature.NewInstance(currentRecord.get(HEADER_DEFINITION), termLabel, null);
+        DefinedTerm structure = DefinedTerm.NewInstance(TermType.Structure, currentRecord.get(HEADER_DEFINITION), termLabel, null);
         structure.setIdInVocabulary(termLabel);
 
         TermVocabulary vocabulary = importState.getStructureVoc();
