Project

General

Profile

Download (1.9 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2016 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
package eu.etaxonomy.taxeditor.molecular.io.wizard;
11

    
12

    
13
import info.bioinfweb.jphyloio.formatinfo.JPhyloIOFormatInfo;
14

    
15
import java.io.File;
16

    
17
import org.eclipse.jface.wizard.Wizard;
18

    
19

    
20

    
21
/**
22
 * A wizard to export a single read alignment from <i>CDM</i> using <i>JPhyloIO</i>.
23
 *
24
 * @author Ben Stöver
25
 * @date 23.06.2016
26
 */
27
public class ExportSingleReadAlignmentWizard extends Wizard {
28
    private ExportSingleReadAlignmentWizardPage page;
29

    
30
    private JPhyloIOFormatInfo selectedFormat = null;
31
    private File selectedFile = null;
32
    private String consensusSequenceLabel = null;
33

    
34

    
35
    public ExportSingleReadAlignmentWizard() {
36
        setWindowTitle("Export single read alignment");  //TODO Use multi languange message
37
    }
38

    
39

    
40
    @Override
41
    public void addPages() {
42
        page = new ExportSingleReadAlignmentWizardPage();
43
        addPage(page);
44
    }
45

    
46

    
47
    @Override
48
    public boolean performFinish() {
49
        if (!page.getConsensusSequenceLabel().isEmpty()) {
50
            selectedFormat = page.getSelectedFormat();
51
            selectedFile = page.getSelectedFile();
52
            consensusSequenceLabel = page.getConsensusSequenceLabel();
53
            return true;
54
        }
55
        else {
56
            return false;  //TODO Display according error message in wizard heading, as long as valid inputs are not completed.
57
        }
58
    }
59

    
60

    
61
    public JPhyloIOFormatInfo getSelectedFormat() {
62
        return selectedFormat;
63
    }
64

    
65

    
66
    public File getSelectedFile() {
67
        return selectedFile;
68
    }
69

    
70

    
71
    public String getConsensusSequenceLabel() {
72
        return consensusSequenceLabel;
73
    }
74
}
(1-1/2)