endnote and excel import added. fixes #779
[taxeditor.git] / taxeditor-store / src / main / java / eu / etaxonomy / taxeditor / io / TcsExportWizard.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
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.
9 */
10
11 package eu.etaxonomy.taxeditor.io;
12
13 import java.io.File;
14
15 import org.apache.log4j.Logger;
16 import org.eclipse.jface.viewers.IStructuredSelection;
17 import org.eclipse.ui.IWorkbench;
18
19 import eu.etaxonomy.cdm.io.tcsxml.out.TcsXmlExportConfigurator;
20 import eu.etaxonomy.taxeditor.store.CdmStore;
21
22 /**
23 * @author n.hoffmann
24 * @created 15.06.2009
25 * @version 1.0
26 */
27 public class TcsExportWizard extends AbstractExportWizard<TcsXmlExportConfigurator> {
28 private static final Logger logger = Logger
29 .getLogger(TcsExportWizard.class);
30 private static final String TCS_EXPORT = "TCS_EXPORT";
31 private TcsXmlExportConfigurator configurator;
32 private ExportToFileDestinationWizardPage page;
33
34 /* (non-Javadoc)
35 * @see org.eclipse.jface.wizard.Wizard#performFinish()
36 */
37 @Override
38 public boolean performFinish() {
39 String urlString = page.getFolderText() + File.separator + page.getExportFileName();
40
41 configurator.setDestination(new File(urlString));
42 configurator.setCdmAppController(CdmStore.getApplicationControllerWillBeObsolete());
43
44 return doExport(configurator);
45 }
46
47 /* (non-Javadoc)
48 * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
49 */
50 public void init(IWorkbench workbench, IStructuredSelection selection) {
51 configurator = TcsXmlExportConfigurator.NewInstance(null, null);
52 }
53
54 /* (non-Javadoc)
55 * @see eu.etaxonomy.taxeditor.io.AbstractExportWizard#getConfigurator()
56 */
57 @Override
58 public TcsXmlExportConfigurator getConfigurator() {
59 return configurator;
60 }
61
62 /* (non-Javadoc)
63 * @see eu.etaxonomy.taxeditor.io.AbstractExportWizard#addPages()
64 */
65 @Override
66 public void addPages() {
67 super.addPages();
68
69 page = ExportToFileDestinationWizardPage.Tcs();
70 addPage(page);
71 }
72
73
74 }