3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.taxeditor
.section
.reference
;
13 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
15 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
16 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
17 import eu
.etaxonomy
.cdm
.model
.name
.NonViralName
;
18 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
19 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
20 import eu
.etaxonomy
.taxeditor
.editor
.EditorUtil
;
21 import eu
.etaxonomy
.taxeditor
.forms
.CdmFormFactory
;
22 import eu
.etaxonomy
.taxeditor
.forms
.CdmFormFactory
.DetailType
;
23 import eu
.etaxonomy
.taxeditor
.forms
.ICdmFormElement
;
24 import eu
.etaxonomy
.taxeditor
.section
.AbstractCdmDetailSection
;
25 import eu
.etaxonomy
.taxeditor
.section
.ITaxonBaseDetailSection
;
28 * <p>ReferenceBaseDetailSection class.</p>
34 public class ReferenceDetailSection
extends AbstractCdmDetailSection
<Reference
> implements ITaxonBaseDetailSection
{
36 private TaxonBase taxonBase
;
39 * <p>Constructor for ReferenceBaseDetailSection.</p>
41 * @param parentElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object.
43 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object.
44 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
45 * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
47 public ReferenceDetailSection(CdmFormFactory cdmFormFactory
, ConversationHolder conversation
, ICdmFormElement parentElement
,
48 ISelectionProvider selectionProvider
, int style
) {
49 super(cdmFormFactory
, conversation
, parentElement
, selectionProvider
, style
);
54 * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#setTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
57 public void setTaxonBase(TaxonBase entity
) {
58 this.taxonBase
= entity
;
59 NonViralName name
= (NonViralName
) HibernateProxyHelper
.deproxy(entity
.getName());
61 Reference reference
= (Reference
) HibernateProxyHelper
.deproxy(name
.getNomenclaturalReference());
68 * @see eu.etaxonomy.taxeditor.forms.section.cdmdetail.AbstractCdmDetailSection#getHeading()
72 public String
getHeading() {
78 protected DetailType
getDetailType() {
79 return DetailType
.REFERENCEBASE
;
84 public void refresh() {
86 EditorUtil
.refreshDetailsViewer();
90 * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#getTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
93 public TaxonBase
getTaxonBase() {