Revision 49a64920
Added by Cherian Mathew over 10 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/ScopeRestrictionSection.java | ||
---|---|---|
6 | 6 |
import java.util.Collection; |
7 | 7 |
|
8 | 8 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
9 |
import eu.etaxonomy.cdm.model.common.DefinedTerm; |
|
9 | 10 |
import eu.etaxonomy.cdm.model.description.PolytomousKey; |
10 |
import eu.etaxonomy.cdm.model.description.Scope; |
|
11 | 11 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
12 | 12 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
13 | 13 |
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection; |
... | ... | |
16 | 16 |
* @author n.hoffmann |
17 | 17 |
* |
18 | 18 |
*/ |
19 |
public class ScopeRestrictionSection extends AbstractEntityCollectionSection<PolytomousKey, Scope> {
|
|
19 |
public class ScopeRestrictionSection extends AbstractEntityCollectionSection<PolytomousKey, DefinedTerm> {
|
|
20 | 20 |
|
21 | 21 |
public ScopeRestrictionSection(CdmFormFactory formFactory, |
22 | 22 |
ConversationHolder conversation, ICdmFormElement parentElement, int style) { |
... | ... | |
24 | 24 |
} |
25 | 25 |
|
26 | 26 |
@Override |
27 |
public Collection<Scope> getCollection(PolytomousKey entity) {
|
|
27 |
public Collection<DefinedTerm> getCollection(PolytomousKey entity) {
|
|
28 | 28 |
return entity.getScopeRestrictions(); |
29 | 29 |
} |
30 | 30 |
|
31 | 31 |
@Override |
32 |
public Scope createNewElement() {
|
|
33 |
return Scope.NewInstance();
|
|
32 |
public DefinedTerm createNewElement() {
|
|
33 |
return DefinedTerm.NewInstance();
|
|
34 | 34 |
} |
35 | 35 |
|
36 | 36 |
@Override |
37 |
public void addElement(Scope element) {
|
|
37 |
public void addElement(DefinedTerm element) {
|
|
38 | 38 |
getEntity().addScopeRestriction(element); |
39 | 39 |
} |
40 | 40 |
|
41 | 41 |
@Override |
42 |
public void removeElement(Scope element) {
|
|
42 |
public void removeElement(DefinedTerm element) {
|
|
43 | 43 |
getEntity().removeScopeRestriction(element); |
44 | 44 |
} |
45 | 45 |
|
Also available in: Unified diff
Aligning Editor with 3.3 model changes. First phase commit which updates only the classes.
Branch not compilable at the moment.