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
.occurrence
.derivedUnit
;
13 import java
.util
.Collection
;
14 import java
.util
.HashSet
;
17 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
18 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
19 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
20 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
21 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
25 * @created May 11, 2011
28 public class PreservedSpecimenDeterminationHistoryDetailSection
extends
29 PreservedSpecimenAbstractDeterminationEventDetailSection
{
34 * @param parentElement
37 public PreservedSpecimenDeterminationHistoryDetailSection(CdmFormFactory formFactory
,
38 ConversationHolder conversation
, ICdmFormElement parentElement
,
40 super(formFactory
, conversation
, parentElement
, "Determination History", style
);
44 * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#getCollection(java.lang.Object)
47 public Collection
<DeterminationEvent
> getCollection(DerivedUnit entity
) {
49 Set
<DeterminationEvent
> events
= entity
.getDeterminations();
50 Set
<DeterminationEvent
> result
= new HashSet
<DeterminationEvent
>();
51 for (DeterminationEvent event
: events
){
52 if (event
.getPreferredFlag() != true){
62 public void refresh() {
63 internalUpdateSection(false);
68 * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getTooltipString()
72 protected String
getTooltipString() {
73 return "Add a determination event to the history";