1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2007 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
|
|
11
|
package eu.etaxonomy.taxeditor.section.name;
|
12
|
|
13
|
import org.apache.log4j.Logger;
|
14
|
import org.eclipse.jface.viewers.ISelectionProvider;
|
15
|
|
16
|
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
|
17
|
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
|
18
|
import eu.etaxonomy.cdm.model.name.NonViralName;
|
19
|
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
|
20
|
import eu.etaxonomy.taxeditor.forms.CdmFormFactory;
|
21
|
import eu.etaxonomy.taxeditor.forms.ICdmFormElement;
|
22
|
import eu.etaxonomy.taxeditor.forms.CdmFormFactory.DetailType;
|
23
|
import eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection;
|
24
|
import eu.etaxonomy.taxeditor.section.ITaxonDetailSection;
|
25
|
|
26
|
/**
|
27
|
* @author n.hoffmann
|
28
|
* @created May 20, 2010
|
29
|
* @version 1.0
|
30
|
*/
|
31
|
public class NonViralNameDetailSection extends AbstractCdmDetailSection<NonViralName>
|
32
|
implements ITaxonDetailSection {
|
33
|
|
34
|
|
35
|
private static final Logger logger = Logger
|
36
|
.getLogger(NonViralNameDetailSection.class);
|
37
|
|
38
|
public NonViralNameDetailSection(CdmFormFactory formFactory, ConversationHolder conversation,
|
39
|
ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
|
40
|
super(formFactory, conversation, parentElement, selectionProvider, style);
|
41
|
}
|
42
|
|
43
|
/* (non-Javadoc)
|
44
|
* @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#getDetailType()
|
45
|
*/
|
46
|
@Override
|
47
|
protected DetailType getDetailType() {
|
48
|
return DetailType.NONVIRALNAME;
|
49
|
}
|
50
|
|
51
|
/* (non-Javadoc)
|
52
|
* @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#getHeading()
|
53
|
*/
|
54
|
@Override
|
55
|
public String getHeading() {
|
56
|
return "Name";
|
57
|
}
|
58
|
|
59
|
/* (non-Javadoc)
|
60
|
* @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#setTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
|
61
|
*/
|
62
|
public void setTaxon(TaxonBase taxon) {
|
63
|
NonViralName name = (NonViralName) HibernateProxyHelper.deproxy(taxon.getName());
|
64
|
setEntity(name);
|
65
|
}
|
66
|
}
|