2 * Copyright (C) 2016 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.
9 package eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
;
11 import org
.eclipse
.jface
.wizard
.Wizard
;
13 import eu
.etaxonomy
.cdm
.model
.common
.Representation
;
14 import eu
.etaxonomy
.cdm
.model
.common
.TermBase
;
15 import eu
.etaxonomy
.taxeditor
.ui
.translation
.TermTranslationWizardPage
;
22 public class TermTranslationWizard
extends Wizard
{
23 private TermTranslationWizardPage page
;
25 private final TermBase term
;
28 * <p>Constructor for TranslationWizard.</p>
30 * @param multilanguageText a {@link java.util.Map} object.
32 public TermTranslationWizard(TermBase term
) {
33 setWindowTitle("Translation Editor");
35 setNeedsProgressMonitor(true);
39 * @see org.eclipse.jface.wizard.Wizard#addPages()
43 public void addPages() {
44 page
= new TermTranslationWizardPage(term
);
49 * @see org.eclipse.jface.wizard.Wizard#performFinish()
53 public boolean performFinish() {
54 Representation representation
= page
.getTargetRepresentation();
56 if (representation
.getLanguage() == null){
59 if (!representation
.getText().equals("") || !representation
.getLabel().equals("") || !representation
.getAbbreviatedLabel().equals("")) {
60 term
.addRepresentation(representation
);