2 * Copyright (C) 2015 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
;
11 import java
.util
.Collection
;
13 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
14 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
15 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasure
;
16 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
18 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractUnboundEntityCollectionSection
;
25 public class StatisticalMeasureCollectionSection
extends AbstractUnboundEntityCollectionSection
<Feature
, StatisticalMeasure
> {
27 public StatisticalMeasureCollectionSection(CdmFormFactory formFactory
,
28 ConversationHolder conversation
, ICdmFormElement parentElement
, int style
) {
29 super(formFactory
, conversation
, parentElement
, "Statistical measures", style
);
33 * @see eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AbstractNullEntityCollectionSection#getEntityCollection(java.lang.Object)
37 protected Collection
<StatisticalMeasure
> getEntityCollection(Feature entity
) {
38 return entity
.getRecommendedStatisticalMeasures();
42 * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#createNewElement()
46 public StatisticalMeasure
createNewElement() {
47 return StatisticalMeasure
.NewInstance();
51 * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#addElement(eu.etaxonomy.cdm.model.common.IVersionableEntity)
55 public void addElement(StatisticalMeasure element
) {
60 * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#removeElement(eu.etaxonomy.cdm.model.common.IVersionableEntity)
64 public void removeElement(StatisticalMeasure element
) {
65 getEntity().removeRecommendedStatisticalMeasure(element
);
69 * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getEmptyString()
73 public String
getEmptyString() {
74 return "No statistical measures yet.";
78 * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getTooltipString()
82 protected String
getTooltipString() {
83 return "Add a statistical measure";
90 public StatisticalMeasure
addExisting() {
91 // TODO Auto-generated method stub
99 public boolean allowAddExisting() {
100 // TODO Auto-generated method stub