minor
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / view / dataimport / SpecimenProviderSelectionWizardPage.java
index fae847394171aed05c4bf15c102caf245063cf2f..4728a2c5de53ae0e780e4051151e74ba39e0c1a2 100644 (file)
@@ -7,7 +7,7 @@
 * 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.taxeditor.editor.view.dataimport;
+package eu.etaxonomy.taxeditor.view.dataimport;
 
 import java.net.MalformedURLException;
 import java.net.URI;
@@ -17,6 +17,8 @@ import java.net.URL;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.widgets.Composite;
 
+import eu.etaxonomy.cdm.ext.common.ServiceWrapperBase;
+import eu.etaxonomy.cdm.ext.occurrence.bioCase.BioCaseQueryServiceWrapper;
 import eu.etaxonomy.taxeditor.view.specimenSearch.SpecimenProviderSelectionController;
 
 
@@ -30,8 +32,9 @@ public class SpecimenProviderSelectionWizardPage extends WizardPage{
 
     private SpecimenProviderSelectionController specimenProviderSelectionController;
     private URI endPoint;
+    private ServiceWrapperBase serviceWrapper;
 
-    protected SpecimenProviderSelectionWizardPage(String pageName) {
+    public SpecimenProviderSelectionWizardPage(String pageName) {
         super(pageName);
         setTitle("Select Specimen Provider");
         setDescription("Select the provider to query for specimens.\nTo query a BioCASE " +
@@ -45,6 +48,8 @@ public class SpecimenProviderSelectionWizardPage extends WizardPage{
     public void createControl(Composite parent) {
         specimenProviderSelectionController = SpecimenProviderSelectionController.getInstance(parent, getWizard());
         setControl(specimenProviderSelectionController.getComposite());
+        //serviceWrapper = new BioCaseQueryServiceWrapper();
+
     }
 
     public QueryType getQueryType(){
@@ -73,6 +78,8 @@ public class SpecimenProviderSelectionWizardPage extends WizardPage{
             endPoint = null;
             try {
                 endPoint = new URL(specimenProviderSelectionController.getComposite().getTxtAccessPoint().getText()).toURI();
+                serviceWrapper = new BioCaseQueryServiceWrapper();
+                serviceWrapper.setBaseUrl(specimenProviderSelectionController.getComposite().getTxtAccessPoint().getText());
                 this.setErrorMessage(null);
                 return true;
             } catch (MalformedURLException e) {
@@ -90,6 +97,20 @@ public class SpecimenProviderSelectionWizardPage extends WizardPage{
         return false;
     }
 
+    /**
+     * @return the bioCaseQueryServiceWrapper
+     */
+    public ServiceWrapperBase getQueryServiceWrapper() {
+        return serviceWrapper;
+    }
+
+    /**
+     * @param bioCaseQueryServiceWrapper the bioCaseQueryServiceWrapper to set
+     */
+    public void setQueryServiceWrapper(ServiceWrapperBase queryServiceWrapper) {
+        this.serviceWrapper = queryServiceWrapper;
+    }
+
     /**
      * @return
      */
@@ -98,4 +119,6 @@ public class SpecimenProviderSelectionWizardPage extends WizardPage{
     }
 
 
+
+
 }