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
.ui
.section
.agent
;
13 import org
.apache
.log4j
.Logger
;
14 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
16 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
17 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
18 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
19 import eu
.etaxonomy
.cdm
.model
.agent
.TeamOrPersonBase
;
20 import eu
.etaxonomy
.taxeditor
.ui
.forms
.CdmFormFactory
;
21 import eu
.etaxonomy
.taxeditor
.ui
.forms
.ICdmFormElement
;
22 import eu
.etaxonomy
.taxeditor
.ui
.forms
.CdmFormFactory
.DetailType
;
23 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
26 * <p>TeamOrPersonBaseDetailSection class.</p>
29 * @created Apr 26, 2010
32 public class TeamOrPersonBaseDetailSection
extends AbstractCdmDetailSection
<TeamOrPersonBase
> {
34 private static final Logger logger
= Logger
35 .getLogger(TeamOrPersonBaseDetailSection
.class);
38 * <p>Constructor for TeamOrPersonBaseDetailSection.</p>
40 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
41 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
42 * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
43 * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
46 public TeamOrPersonBaseDetailSection(CdmFormFactory cdmFormFactory
, ConversationHolder conversation
,
47 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
48 super(cdmFormFactory
, conversation
, parentElement
, selectionProvider
, style
);
53 protected DetailType
getDetailType() {
54 return DetailType
.TEAMORPERSONBASE
;
59 public String
getHeading() {
60 if (getEntity() != null){
61 if(getEntity() instanceof Team
){
63 }else if (getEntity().getClass().isAssignableFrom(Person
.class)){
67 return "Team or Person";