commit df9fa40dd352274b65db308307197ec73a88c2e8
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Mon Jun 4 15:16:09 2018 +0200

    ref #7362 Ask for detail loading when importing term

diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureNodeDropAdapter.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureNodeDropAdapter.java
index 9a046b9dd..69ec88074 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureNodeDropAdapter.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureNodeDropAdapter.java
@@ -33,6 +33,7 @@ import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.TermVocabularySelectionDialog;
+import eu.etaxonomy.taxeditor.view.webimport.termimport.parser.ParserUtil;
 import eu.etaxonomy.taxeditor.view.webimport.termimport.wrapper.OntologyTermWrapper;
 
 public class FeatureNodeDropAdapter extends ViewerDropAdapter {
@@ -111,6 +112,10 @@ public class FeatureNodeDropAdapter extends ViewerDropAdapter {
 		            return false;
 		        }
 		        if(vocabulary!=null){
+		            if(wrapper.getDescription()==null && MessagingUtils.confirmDialog("Load Details?", "Not all details for this term have been loaded yet.\n"
+		                    + "Do you want to load the details before adding it?")){
+		                ParserUtil.loadDetails(wrapper);
+		            }
 		            Feature feature = Feature.NewInstance(wrapper.getDescription(), wrapper.getLabel(), null);
 		            feature.setUri(URI.create(wrapper.getUri()));
 		            vocabulary.addTerm(feature);
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportPresenter.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportPresenter.java
index 7fddce9ed..5b3aee970 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportPresenter.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportPresenter.java
@@ -35,11 +35,11 @@ import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.ColorResources;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.Resources;
+import eu.etaxonomy.taxeditor.view.webimport.termimport.parser.ParserUtil;
 import eu.etaxonomy.taxeditor.view.webimport.termimport.parser.TermParser;
 import eu.etaxonomy.taxeditor.view.webimport.termimport.parser.TerminologyParser;
 import eu.etaxonomy.taxeditor.view.webimport.termimport.requests.RequestSearch;
 import eu.etaxonomy.taxeditor.view.webimport.termimport.requests.RequestSuggest;
-import eu.etaxonomy.taxeditor.view.webimport.termimport.requests.RequestTerm;
 import eu.etaxonomy.taxeditor.view.webimport.termimport.requests.RequestTerminologies;
 import eu.etaxonomy.taxeditor.view.webimport.termimport.wrapper.OntologyTermWrapper;
 import eu.etaxonomy.taxeditor.view.webimport.termimport.wrapper.TerminologyWrapper;
@@ -185,10 +185,7 @@ public class GfBioTerminologyImportPresenter {
 
     private void loadTermDetails(){
         OntologyTermWrapper selectedWrapper = getSelectedTerm((IStructuredSelection) composite.getTreeTermHierarchy().getSelection());
-        //load term description
-        String request = new RequestTerm(selectedWrapper.getUri(), selectedWrapper.getSourceTerminology()).request();
-        OntologyTermWrapper detailTerm = TermParser.parseSingleTerm(request);
-        selectedWrapper.setDescription(detailTerm.getDescription());
+        ParserUtil.loadDetails(selectedWrapper);
         updateDetails(new StructuredSelection(selectedWrapper));
     }
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/parser/ParserUtil.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/parser/ParserUtil.java
index a73c21c95..4a24298cd 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/parser/ParserUtil.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/parser/ParserUtil.java
@@ -12,6 +12,9 @@ import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import eu.etaxonomy.taxeditor.view.webimport.termimport.requests.RequestTerm;
+import eu.etaxonomy.taxeditor.view.webimport.termimport.wrapper.OntologyTermWrapper;
+
 /**
  * @author pplitzner
  * @since May 31, 2018
@@ -42,4 +45,14 @@ public class ParserUtil {
     public static String parseTerminology(JSONObject jsonObject) throws JSONException {
         return jsonObject.getString("sourceTerminology");
     }
+
+    /**
+     * Loads and sets detail information for the given wrapper
+     * @param wrapper the wrapper for which the detailed information will be loaded and set
+     */
+    public static void loadDetails(OntologyTermWrapper wrapper) {
+        String request = new RequestTerm(wrapper.getUri(), wrapper.getSourceTerminology()).request();
+        OntologyTermWrapper detailTerm = TermParser.parseSingleTerm(request);
+        wrapper.setDescription(detailTerm.getDescription());
+    }
 }
