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.supplemental.identifier;
|
11
|
|
12
|
import java.util.Collection;
|
13
|
|
14
|
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
|
15
|
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
|
16
|
import eu.etaxonomy.cdm.model.common.Identifier;
|
17
|
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
18
|
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
|
19
|
|
20
|
/**
|
21
|
*
|
22
|
* @author pplitzner
|
23
|
*
|
24
|
*/
|
25
|
public class IdentifierSection extends AbstractIdentifierSection<IdentifiableEntity> {
|
26
|
|
27
|
public IdentifierSection(CdmFormFactory formFactory,
|
28
|
ConversationHolder conversation, ICdmFormElement parentElement,
|
29
|
int style) {
|
30
|
super(formFactory, conversation, parentElement, style);
|
31
|
}
|
32
|
|
33
|
@Override
|
34
|
public Collection<Identifier> getCollection(IdentifiableEntity entity) {
|
35
|
return entity.getIdentifiers();
|
36
|
}
|
37
|
|
38
|
@Override
|
39
|
public void addElement(Identifier element) {
|
40
|
getEntity().addIdentifier(element);
|
41
|
}
|
42
|
|
43
|
@Override
|
44
|
public void removeElement(Identifier element) {
|
45
|
getEntity().removeIdentifier(element);
|
46
|
}
|
47
|
|
48
|
}
|