3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.io
.wizard
;
15 import org
.eclipse
.jface
.viewers
.IStructuredSelection
;
16 import org
.eclipse
.ui
.IWorkbench
;
18 import eu
.etaxonomy
.cdm
.database
.DbSchemaValidation
;
19 import eu
.etaxonomy
.cdm
.io
.excel
.taxa
.NormalExplicitImportConfigurator
;
20 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
24 * <p>ExcelNormalExplicitTaxaImportWizard class.</p>
27 * @created Sep 22, 2009
30 public class ExcelNormalExplicitTaxaImportWizard
extends AbstractImportWizard
<NormalExplicitImportConfigurator
>{
32 private NormalExplicitImportConfigurator configurator
;
34 private ImportFromFileDataSourceWizardPage dataSourcePage
;
37 * @see eu.etaxonomy.taxeditor.io.wizard.AbstractImportWizard#getConfigurator()
41 public NormalExplicitImportConfigurator
getConfigurator() {
46 * @see org.eclipse.jface.wizard.Wizard#performFinish()
50 public boolean performFinish() {
51 URI source
= dataSourcePage
.getUri();
52 configurator
.setSource(source
);
53 configurator
.setDbSchemaValidation(DbSchemaValidation
.CREATE
);
55 CdmStore
.getImportManager().run(configurator
);
61 * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
65 public void init(IWorkbench workbench
, IStructuredSelection selection
) {
66 super.init(workbench
, selection
);
67 configurator
= CdmStore
.getImportManager().NormalExplicitConfigurator();
71 * @see eu.etaxonomy.taxeditor.io.wizard.AbstractImportWizard#addPages()
75 public void addPages() {
78 dataSourcePage
= new ImportFromFileDataSourceWizardPage("Choose NormalExplicit",
79 "Please choose an xls file in the NormalExplicit format.", new String
[]{"*.xls" ,"*.xlsx", "*.*"});
80 addPage(dataSourcePage
);