1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
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.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit;
|
11
|
|
12
|
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
|
13
|
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
|
14
|
import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
|
15
|
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
16
|
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
|
17
|
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
|
18
|
|
19
|
/**
|
20
|
* <p>DeterminationEventDetailSection class.</p>
|
21
|
*
|
22
|
* @author n.hoffmann
|
23
|
* @created Oct 13, 2010
|
24
|
* @version 1.0
|
25
|
*/
|
26
|
public abstract class PreservedSpecimenAbstractDeterminationEventDetailSection extends
|
27
|
AbstractEntityCollectionSection<DerivedUnit, DeterminationEvent> {
|
28
|
|
29
|
/**
|
30
|
* @param formFactory
|
31
|
* @param conversation
|
32
|
* @param parentElement
|
33
|
* @param title
|
34
|
* @param style
|
35
|
*/
|
36
|
public PreservedSpecimenAbstractDeterminationEventDetailSection(CdmFormFactory formFactory,
|
37
|
ConversationHolder conversation, ICdmFormElement parentElement,
|
38
|
String title, int style) {
|
39
|
super(formFactory, conversation, parentElement, title, style);
|
40
|
}
|
41
|
|
42
|
/* (non-Javadoc)
|
43
|
* @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#createNewElement()
|
44
|
*/
|
45
|
/** {@inheritDoc} */
|
46
|
@Override
|
47
|
public DeterminationEvent createNewElement() {
|
48
|
DeterminationEvent instance = DeterminationEvent.NewInstance();
|
49
|
instance.setIdentifiedUnit(getEntity());
|
50
|
return instance;
|
51
|
}
|
52
|
|
53
|
/* (non-Javadoc)
|
54
|
* @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#addElement(eu.etaxonomy.cdm.model.common.IVersionableEntity)
|
55
|
*/
|
56
|
/** {@inheritDoc} */
|
57
|
@Override
|
58
|
public void addElement(DeterminationEvent determination) {
|
59
|
getEntity().addDetermination(determination);
|
60
|
}
|
61
|
|
62
|
/* (non-Javadoc)
|
63
|
* @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#removeElement(eu.etaxonomy.cdm.model.common.IVersionableEntity)
|
64
|
*/
|
65
|
/** {@inheritDoc} */
|
66
|
@Override
|
67
|
public void removeElement(DeterminationEvent determination) {
|
68
|
getEntity().removeDetermination(determination);
|
69
|
}
|
70
|
|
71
|
/* (non-Javadoc)
|
72
|
* @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getEmptyString()
|
73
|
*/
|
74
|
/** {@inheritDoc} */
|
75
|
@Override
|
76
|
public String getEmptyString() {
|
77
|
return "No determinations yet.";
|
78
|
}
|
79
|
|
80
|
}
|