--- /dev/null
+/**
+ *
+ */
+package eu.etaxonomy.taxeditor.io.wizard;
+
+import java.net.URI;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IWorkbench;
+
+import eu.etaxonomy.cdm.database.DbSchemaValidation;
+import eu.etaxonomy.cdm.io.specimen.excel.in.SpecimenCdmExcelImportConfigurator;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author n.hoffmann
+ *
+ */
+public class SpecimenCdmExcelImportWizard extends AbstractImportWizard<SpecimenCdmExcelImportConfigurator> {
+
+ private SpecimenCdmExcelImportConfigurator configurator;
+
+ private ImportFromFileDataSourceWizardPage dataSourcePage;
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.io.wizard.AbstractImportWizard#getConfigurator()
+ */
+ @Override
+ public SpecimenCdmExcelImportConfigurator getConfigurator() {
+ return configurator;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ /** {@inheritDoc} */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ super.init(workbench, selection);
+ configurator = CdmStore.getImportManager().SpecimenCdmExcelImportConfigurator();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#performFinish()
+ */
+ @Override
+ public boolean performFinish() {
+ URI source = dataSourcePage.getUri();
+ configurator.setSource(source);
+ configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
+
+ CdmStore.getImportManager().run(configurator);
+
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.io.wizard.AbstractImportWizard#addPages()
+ */
+ /** {@inheritDoc} */
+ @Override
+ public void addPages() {
+ super.addPages();
+
+ dataSourcePage = new ImportFromFileDataSourceWizardPage("Choose Specimen CDM Excel",
+ "Please choose an xls file in the SpecimenCdmExcel format.", new String[]{"*.xls"});
+ addPage(dataSourcePage);
+ }
+
+}