Project

General

Profile

Download (1.5 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

    
10
package eu.etaxonomy.taxeditor.io.wizard;
11

    
12
import java.io.File;
13

    
14
import org.eclipse.jface.viewers.IStructuredSelection;
15
import org.eclipse.ui.IImportWizard;
16
import org.eclipse.ui.IWorkbench;
17

    
18
import eu.etaxonomy.cdm.io.reference.endnote.in.EndnoteImportConfigurator;
19
import eu.etaxonomy.taxeditor.store.CdmStore;
20

    
21
/**
22
 * <p>EndnoteImportWizard class.</p>
23
 *
24
 * @author n.hoffmann
25
 * @created Sep 18, 2009
26
 */
27
public class EndnoteImportWizard extends AbstractImportWizard<EndnoteImportConfigurator> implements IImportWizard {
28

    
29
	private EndnoteImportConfigurator configurator;
30

    
31
	private ImportFromFileDataSourceWizardPage dataSourcePage;
32

    
33
	@Override
34
	public boolean performFinish() {
35
		
36
		File file = dataSourcePage.getFile();
37
		configurator.setSource(file.toURI());
38
		
39
		CdmStore.getImportManager().run(configurator);
40
		
41
		return true;
42
	}
43
	
44
	@Override
45
	public void addPages() {
46
		super.addPages();
47
		
48
		dataSourcePage = ImportFromFileDataSourceWizardPage.XML();
49
		addPage(dataSourcePage);
50
	}
51

    
52
	public void init(IWorkbench workbench, IStructuredSelection selection) {
53
		super.init(workbench, selection);
54
		configurator =  CdmStore.getImportManager().EndnoteConfigurator();
55
	}
56

    
57
	@Override
58
	public EndnoteImportConfigurator getConfigurator() {
59
		return configurator;
60
	}
61
}
(14-14/30)