Project

General

Profile

Download (1.76 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.taxeditor.io.wizard;
10

    
11
import java.io.File;
12

    
13
import javax.inject.Inject;
14

    
15
import org.eclipse.e4.core.contexts.IEclipseContext;
16
import org.eclipse.e4.ui.workbench.modeling.EPartService;
17

    
18
import eu.etaxonomy.cdm.common.URI;
19
import eu.etaxonomy.cdm.io.reference.endnote.in.EndnoteImportConfigurator;
20
import eu.etaxonomy.taxeditor.io.e4.in.AbstractImportWizard;
21
import eu.etaxonomy.taxeditor.io.e4.in.ImportFromFileDataSourceWizardPage;
22
import eu.etaxonomy.taxeditor.store.CdmStore;
23

    
24
/**
25
 * TODO adapt to remoting, currently not in use
26
 *
27
 * @author n.hoffmann
28
 * @created Sep 18, 2009
29
 */
30
public class EndnoteImportWizard extends AbstractImportWizard<EndnoteImportConfigurator>  {
31

    
32
	private EndnoteImportConfigurator configurator;
33

    
34
	private ImportFromFileDataSourceWizardPage dataSourcePage;
35

    
36
	@Inject
37
    public EndnoteImportWizard(IEclipseContext context, EPartService partService) {
38
        super(context, partService);
39
    }
40

    
41
	@Override
42
	public boolean performFinish() {
43

    
44
		File file = dataSourcePage.getFile();
45
		configurator.setSource(URI.fromFile(file));
46

    
47
		//TODO local IO not supportd anymore
48
//		CdmStore.getImportManager().run(configurator);
49

    
50
		return true;
51
	}
52

    
53
	@Override
54
	public void addPages() {
55
		super.addPages();
56

    
57
		dataSourcePage = new ImportFromFileDataSourceWizardPage();
58
		addPage(dataSourcePage);
59
	}
60

    
61
	@Override
62
    public void init() {
63
		configurator =  CdmStore.getImportManager().EndnoteConfigurator();
64
	}
65

    
66
	@Override
67
	public EndnoteImportConfigurator getConfigurator() {
68
		return configurator;
69
	}
70
}
(3-3/6)