Merge branch 'develop' into LibrAlign
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / classification / CloneClassificationWizardPage.java
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.ui.section.classification;
11
12 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
13 import eu.etaxonomy.cdm.model.reference.Reference;
14 import eu.etaxonomy.cdm.model.taxon.Classification;
15 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
16 import eu.etaxonomy.taxeditor.ui.dialog.CloneClassificationDetailElement;
17 import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
18 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
19 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
20
21 /**
22 *
23 * @author pplitzner
24 * @date Nov 6, 2016
25 *
26 */
27 public class CloneClassificationWizardPage extends
28 AbstractCdmEntityWizardPage<Classification> {
29
30 private CloneClassificationDetailElement detailElement;
31
32 public CloneClassificationWizardPage(CdmFormFactory formFactory,
33 ConversationHolder conversation, Classification entity) {
34 super(formFactory, conversation, entity);
35 setTitle("Clone Classification");
36 }
37
38 /** {@inheritDoc} */
39 @Override
40 public CloneClassificationDetailElement createElement(ICdmFormElement rootElement) {
41 detailElement = formFactory.createCloneClassificationDetailElement(rootElement);
42 detailElement.setEntity(getEntity());
43 return detailElement;
44 }
45
46 public String getClassificationName(){
47 return detailElement.getClassificationName();
48 }
49
50 public TaxonRelationshipType getRelationType(){
51 return detailElement.getRelationType();
52 }
53
54 public Reference getReference(){
55 return detailElement.getReference();
56 }
57
58 }