2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.io
.wizard
;
15 import org
.eclipse
.core
.runtime
.jobs
.Job
;
16 import org
.eclipse
.jface
.viewers
.IStructuredSelection
;
17 import org
.eclipse
.ui
.IWorkbench
;
18 import org
.eclipse
.ui
.progress
.IProgressConstants
;
20 import eu
.etaxonomy
.cdm
.io
.jaxb
.JaxbExportConfigurator
;
21 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
24 * <p>JaxbExportWizard class.</p>
30 public class JaxbExportWizard
extends AbstractExportWizard
<JaxbExportConfigurator
> {
32 private ExportToFileDestinationWizardPage page
;
34 private JaxbExportConfigurator configurator
;
37 * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
41 public void init(IWorkbench workbench
, IStructuredSelection selection
) {
42 this.setWindowTitle("JAXB Export");
43 this.configurator
= CdmStore
.getExportManager().JaxbConfigurator();
47 * @see org.eclipse.jface.wizard.Wizard#performFinish()
51 public boolean performFinish() {
52 boolean performFinish
= false;
54 File exportFile
= new File(page
.getFolderText() + File
.separator
+ page
.getExportFileName());
55 URI urlString
= exportFile
.toURI();
56 configurator
.setDestination(urlString
);
59 Job job
= CdmStore
.getExportManager().createIOServiceJob(configurator
, exportFile
);
61 job
.setProperty(IProgressConstants
.KEEP_PROPERTY
, true);
71 * @see org.eclipse.jface.wizard.Wizard#addPages()
75 public void addPages() {
78 page
= ExportToFileDestinationWizardPage
.Jaxb();
83 * @see eu.etaxonomy.taxeditor.io.AbstractExportWizard#getConfigurator()
87 public JaxbExportConfigurator
getConfigurator() {