2 * Copyright (C) 2011 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
.userecords
;
11 import java
.util
.ArrayList
;
12 import java
.util
.Iterator
;
13 import java
.util
.List
;
14 import java
.util
.ListIterator
;
18 import org
.apache
.logging
.log4j
.LogManager
;
19 import org
.apache
.logging
.log4j
.Logger
;
20 import org
.eclipse
.swt
.events
.SelectionEvent
;
21 import org
.eclipse
.swt
.events
.SelectionListener
;
23 import eu
.etaxonomy
.cdm
.model
.term
.DefinedTerm
;
24 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
25 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
26 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
27 import eu
.etaxonomy
.cdm
.model
.term
.TermType
;
28 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
29 import eu
.etaxonomy
.cdm
.model
.description
.State
;
30 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
31 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
32 import eu
.etaxonomy
.taxeditor
.store
.TermStore
;
33 import eu
.etaxonomy
.taxeditor
.store
.UsageTermCollection
;
34 import eu
.etaxonomy
.taxeditor
.ui
.combo
.term
.TermComboElement
;
35 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
36 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
37 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
40 * The context manager mediates context start/stop and workbench shutdowns to all registered listeners.
43 * @created mar 13, 2012
45 public class UseRecordDetailElement
extends
46 AbstractCdmDetailElement
<CategoricalData
> implements SelectionListener
{
48 @SuppressWarnings("unused")
49 private static final Logger logger
= LogManager
.getLogger();
51 private TermComboElement
<State
> combo_UseCategory
;
52 private TermComboElement
<State
> combo_UseSubCategory
;
53 private TermComboElement
<DefinedTerm
> combo_PlantPart
;
54 private TermComboElement
<DefinedTerm
> combo_Country
;
55 private TermComboElement
<DefinedTerm
> combo_HumanGroup
;
56 private TermComboElement
<DefinedTerm
> combo_EthnicGroup
;
58 public UseRecordDetailElement(CdmFormFactory formFactory
,
59 ICdmFormElement formElement
) {
60 super(formFactory
, formElement
);
64 protected void createControls(ICdmFormElement formElement
,
65 CategoricalData entity
, int style
) {
67 combo_UseCategory
= formFactory
.createDefinedTermComboElement(TermType
.State
, this, UsageTermCollection
.useCategoryVocabularyLabel
, null, style
);
68 combo_UseCategory
.addSelectionListener(this);
69 combo_UseSubCategory
= formFactory
.createDefinedTermComboElement(TermType
.State
, this, UsageTermCollection
.useSubCategoryVocabularyLabel
, null, style
);
70 combo_PlantPart
= formFactory
.createDefinedTermComboElement(TermType
.Modifier
, this, UsageTermCollection
.plantPartLabel
, null, style
);
71 combo_HumanGroup
= formFactory
.createDefinedTermComboElement(TermType
.Modifier
, this, UsageTermCollection
.humanGroupLabel
, null, style
);
72 combo_HumanGroup
.addSelectionListener(this);
73 combo_EthnicGroup
= formFactory
.createDefinedTermComboElement(TermType
.Modifier
, this, UsageTermCollection
.ethnicGroupLabel
, null, style
);
74 combo_Country
= formFactory
.createDefinedTermComboElement(TermType
.Modifier
, this, UsageTermCollection
.countryLabel
, null, style
);
77 List
<State
> termsUseCategory
= setUseCategoryComboTerms(TermStore
.getTerms(State
.class, null, false));
78 combo_UseCategory
.setTerms(termsUseCategory
);
79 combo_UseCategory
.setSelection(stateSelection(UsageTermCollection
.useCategoryVocabularyLabel
));
81 List
<State
> termsSubCategory
= setUseCategoryComboTerms(TermStore
.getTerms(State
.class, null, false), combo_UseCategory
.getSelection());
83 if (termsSubCategory
!= null) {
84 combo_UseSubCategory
.setTerms(termsSubCategory
);
85 combo_UseSubCategory
.setSelection(stateSelection(UsageTermCollection
.useSubCategoryVocabularyLabel
));
86 combo_UseSubCategory
.setEnabled(true);
89 combo_UseSubCategory
.setEnabled(false);
92 List
<DefinedTerm
> plantPartsToAdd
= setModifierComboTerms(TermStore
.getTerms(DefinedTerm
.class, null, false), UsageTermCollection
.plantPartLabel
);
93 combo_PlantPart
.setTerms(plantPartsToAdd
);
94 combo_PlantPart
.setSelection(modifierSelection(UsageTermCollection
.plantPartLabel
));
96 List
<DefinedTerm
> countriesToAdd
= setModifierComboTerms(TermStore
.getTerms(DefinedTerm
.class, null, false), UsageTermCollection
.countryLabel
);
97 combo_Country
.setTerms(countriesToAdd
);
98 combo_Country
.setSelection(modifierSelection(UsageTermCollection
.countryLabel
));
100 List
<DefinedTerm
> humanGroupToAdd
= setModifierComboTerms(TermStore
.getTerms(DefinedTerm
.class, null, false), UsageTermCollection
.humanGroupLabel
);
101 combo_HumanGroup
.setTerms(humanGroupToAdd
);
102 combo_HumanGroup
.setSelection(modifierSelection(UsageTermCollection
.humanGroupLabel
));
104 List
<DefinedTerm
> ethnicGroupToAdd
= setEthnicGroupComboTerms(TermStore
.getTerms(DefinedTerm
.class, null, false), combo_HumanGroup
.getSelection());
105 if (ethnicGroupToAdd
!= null) {
106 combo_EthnicGroup
.setTerms(ethnicGroupToAdd
);
107 combo_EthnicGroup
.setSelection(modifierSelection(UsageTermCollection
.ethnicGroupLabel
));
108 combo_EthnicGroup
.setEnabled(true);
110 combo_EthnicGroup
.setEnabled(false);
115 * Returns the select modifier
117 private DefinedTerm
modifierSelection(String comboCategory
) {
118 if(!getEntity().getModifiers().isEmpty()) {
119 for (DefinedTerm modifier
: getEntity().getModifiers()) {
120 if(GetVocabularyType(modifier
, comboCategory
)) {
131 * Returns the selected state
132 * @param comboCategory
134 private State
stateSelection(String comboCategory
) {
135 if (!getEntity().getStateData().isEmpty()) {
136 for (StateData statedata
: getEntity().getStateData()) {
137 if (statedata
.getModifyingText().get(CdmStore
.getDefaultLanguage()) != null) {
138 String testString
= statedata
.getModifyingText().get(CdmStore
.getDefaultLanguage()).getText();
139 if(testString
.equals(comboCategory
)) {
140 if(statedata
.getState() !=null) {
141 return statedata
.getState();
154 * This function sets the combo terms (Besides EthnicGroup
159 private List
<DefinedTerm
> setModifierComboTerms(List
<DefinedTerm
> listOfTerms
, String modType
) {
160 List
<DefinedTerm
> termsToAdd
= new ArrayList
<DefinedTerm
>();
161 for (DefinedTerm term
: listOfTerms
) {
163 if ((term
.getPartOf() != null) && (term
.getPartOf().getTitleCache().equals(modType
))) {
164 termsToAdd
.add(term
);
166 else if ((term
.getVocabulary() != null) && (term
.getPartOf() == null) && (term
.getVocabulary().getTitleCache().equals(modType
))) {
167 termsToAdd
.add(term
);
175 * This function sets the Use Category combo term
177 private List
<State
> setUseCategoryComboTerms(List
<State
> listOfTerms
) {
178 List
<State
> termsToAdd
= new ArrayList
<State
>();
179 for (State term
: listOfTerms
) {
181 if ((term
.getPartOf() != null) && (term
.getPartOf().getUuid().equals( UsageTermCollection
.uuidUseCategoryVocabulary
))) {
182 termsToAdd
.add(term
);
184 else if ((term
.getVocabulary() !=null) && (term
.getPartOf() == null) && (term
.getVocabulary().getUuid().equals(UsageTermCollection
.uuidUseCategoryVocabulary
))) {
185 termsToAdd
.add(term
);
192 * This function sets the Use SubCategory combo term
194 private List
<State
> setUseCategoryComboTerms(List
<State
> listOfTerms
,
195 State selectedUseCategory
) {
196 List
<State
> termsToAdd
= new ArrayList
<State
>();
197 if (combo_UseCategory
.getSelection() != null) {
199 for (State term
: listOfTerms
) {
200 if ((term
.getPartOf() != null) && (term
.getPartOf().getTitleCache().equals(selectedUseCategory
.getTitleCache()))) {
201 termsToAdd
.add(term
);
203 else if ((term
.getVocabulary() !=null) && (term
.getVocabulary().getTitleCache().equals(selectedUseCategory
.getTitleCache()))) {
204 termsToAdd
.add(term
);
209 else if (!getEntity().getStateData().isEmpty()) {
210 for (StateData stateData
: getEntity().getStateData()) {
211 if (stateData
.getModifyingText().get(CdmStore
.getDefaultLanguage()) != null) {
212 if ((stateData
.getState() != null) && (stateData
.getModifyingText().get(CdmStore
.getDefaultLanguage()).getText() == UsageTermCollection
.useCategoryVocabularyLabel
)) {
213 for (State term
: listOfTerms
) {
214 if ((term
.getPartOf() != null) && (term
.getPartOf().getTitleCache().equals(stateData
.getState().getTitleCache()))) {
215 termsToAdd
.add(term
);
216 } else if ((term
.getVocabulary() != null) && (term
.getVocabulary().getTitleCache().equals(stateData
.getState().getTitleCache()))) {
217 termsToAdd
.add(term
);
234 * This function sets the EthnicGroup combo term
236 * @param selectedHumangroup
239 private List
<DefinedTerm
> setEthnicGroupComboTerms(List
<DefinedTerm
> listOfTerms
,
240 DefinedTerm selectedHumangroup
) {
241 List
<DefinedTerm
> termsToAdd
= new ArrayList
<DefinedTerm
>();
242 if (combo_HumanGroup
.getSelection() != null) {
243 for (DefinedTerm term
: listOfTerms
) {
245 if ((term
.getPartOf() != null) && (term
.getPartOf().getTitleCache().equals(selectedHumangroup
.getTitleCache()))) {
246 termsToAdd
.add(term
);
248 else if ((term
.getVocabulary() != null) && (term
.getVocabulary().getTitleCache().equals(selectedHumangroup
.getTitleCache()))) {
249 termsToAdd
.add(term
);
253 else if (!getEntity().getModifiers().isEmpty()) {
254 for (DefinedTerm modifier
: getEntity().getModifiers()) {
255 if (modifier
.getMarkers() != null) {
256 for (Marker marker
: modifier
.getMarkers()) {
257 if(marker
.getMarkerType().getTitleCache().equals(UsageTermCollection
.humanGroupLabel
)) {
258 for (DefinedTerm term
: listOfTerms
) {
259 if ((term
.getPartOf() != null) && (term
.getPartOf().getTitleCache().equals(modifier
.getTitleCache()))) {
260 termsToAdd
.add(modifier
);
261 } else if ((term
.getVocabulary() != null) && (term
.getVocabulary().getTitleCache().equals(modifier
.getTitleCache()))) {
262 termsToAdd
.add(modifier
);
280 public void handleEvent(Object eventSource
) {
281 if (eventSource
== combo_UseCategory
) {
282 if (combo_UseCategory
.getSelection() != null) {
283 boolean isChanged
= false;
284 boolean isUseCategoryChanged
= false;
285 if (!getEntity().getStateData().isEmpty()) {
286 for (StateData useCategoryStateDataCheck
: getEntity().getStateData()) {
287 Map
<Language
, LanguageString
> modText
= useCategoryStateDataCheck
.getModifyingText();
288 if(modText
.get(CdmStore
.getDefaultLanguage()) != null && modText
.get(CdmStore
.getDefaultLanguage()).getText().equals(UsageTermCollection
.useCategoryVocabularyLabel
)) {
289 if(!useCategoryStateDataCheck
.getState().getTitleCache().equals(combo_UseCategory
.getSelection().getTitleCache())) {
290 isUseCategoryChanged
= true;
295 ListIterator
<StateData
> itrExistingStates
= getEntity().getStateData().listIterator();
296 while(itrExistingStates
.hasNext()) {
297 StateData existingStateData
= itrExistingStates
.next();
298 Map
<Language
, LanguageString
> modifyingText
= existingStateData
300 if (modifyingText
.get(CdmStore
.getDefaultLanguage()) != null) {
301 if (modifyingText
.get(CdmStore
.getDefaultLanguage()).getText().equals(UsageTermCollection
.useCategoryVocabularyLabel
)) {
303 if(!existingStateData
.getState().getTitleCache().equals(combo_UseCategory
.getSelection().getTitleCache())) {
304 itrExistingStates
.remove();
305 StateData stateData
= StateData
.NewInstance(combo_UseCategory
.getSelection());
306 stateData
.setState(combo_UseCategory
.getSelection());
307 stateData
.putModifyingText(CdmStore
.getDefaultLanguage(),UsageTermCollection
.useCategoryVocabularyLabel
);
308 itrExistingStates
.add(stateData
);
311 } else if (modifyingText
.get(CdmStore
.getDefaultLanguage()).getText().equals(UsageTermCollection
.useSubCategoryVocabularyLabel
) && isUseCategoryChanged
== true) {
312 itrExistingStates
.remove();
319 if (isChanged
== false) {
320 StateData stateData
= StateData
321 .NewInstance(combo_UseCategory
.getSelection());
322 stateData
.setState(combo_UseCategory
.getSelection());
323 stateData
.putModifyingText(CdmStore
.getDefaultLanguage(), UsageTermCollection
.useCategoryVocabularyLabel
);
324 getEntity().addStateData(stateData
);
327 combo_UseSubCategory
.setEnabled(true);
331 if (!getEntity().getStateData().isEmpty()) {
332 Iterator
<StateData
> itr
= getEntity().getStateData().iterator();
333 while(itr
.hasNext()) {
337 List
<State
> termsSubCategory
= new ArrayList
<State
>();
338 State emptyState
= State
.NewInstance();
339 termsSubCategory
.add(emptyState
);
340 combo_UseSubCategory
.setTerms(termsSubCategory
);
341 combo_UseSubCategory
.setEnabled(false);
346 if (eventSource
== combo_UseSubCategory
) {
347 if (combo_UseSubCategory
.getSelection() != null) {
348 boolean isChanged
= false;
349 if (!getEntity().getStateData().isEmpty()) {
350 ListIterator
<StateData
> itrExistingStates
= getEntity().getStateData().listIterator();
351 while(itrExistingStates
.hasNext()) {
352 StateData existingStateData
= itrExistingStates
.next();
353 Map
<Language
, LanguageString
> modifyingText
= existingStateData
355 if (modifyingText
.get(CdmStore
.getDefaultLanguage()) != null) {
356 if (modifyingText
.get(CdmStore
.getDefaultLanguage()).getText().equals(UsageTermCollection
.useSubCategoryVocabularyLabel
)) {
358 if(!existingStateData
.getState().getTitleCache().equals(combo_UseSubCategory
.getSelection().getTitleCache())) {
359 itrExistingStates
.remove();
360 StateData stateData
= StateData
.NewInstance(combo_UseSubCategory
.getSelection());
361 stateData
.setState(combo_UseSubCategory
.getSelection());
362 stateData
.putModifyingText(CdmStore
.getDefaultLanguage(),UsageTermCollection
.useSubCategoryVocabularyLabel
);
363 itrExistingStates
.add(stateData
);
370 if (isChanged
== false){
371 StateData stateData
= StateData
372 .NewInstance(combo_UseSubCategory
.getSelection());
373 stateData
.setState(combo_UseSubCategory
.getSelection());
374 stateData
.putModifyingText(CdmStore
.getDefaultLanguage(), UsageTermCollection
.useSubCategoryVocabularyLabel
);
375 getEntity().addStateData(stateData
);
379 if (!getEntity().getStateData().isEmpty()) {
380 Iterator
<StateData
> itrStateData
= getEntity().getStateData().iterator();
381 while(itrStateData
.hasNext()) {
382 StateData existingStateData
= itrStateData
.next();
383 Map
<Language
, LanguageString
> modifyingText
= existingStateData
386 if (modifyingText
.get(CdmStore
.getDefaultLanguage()) != null) {
387 if (modifyingText
.get(CdmStore
.getDefaultLanguage()).getText() == UsageTermCollection
.useSubCategoryVocabularyLabel
) {
388 itrStateData
.remove();
395 if (eventSource
== combo_PlantPart
) {
396 if (combo_PlantPart
.getSelection() != null) {
397 Iterator
<DefinedTerm
> itrExistingModifiers
= getEntity().getModifiers().iterator();
398 while (itrExistingModifiers
.hasNext()) {
399 DefinedTerm modifier
= itrExistingModifiers
.next();
400 if(GetVocabularyType(modifier
, UsageTermCollection
.plantPartLabel
)) {
401 itrExistingModifiers
.remove();
405 DefinedTerm plantPart
= combo_PlantPart
.getSelection();
406 getEntity().addModifier(plantPart
);
408 Set
<DefinedTerm
> modifiers
= getEntity().getModifiers();
409 if(!modifiers
.isEmpty()) {
410 Iterator
<DefinedTerm
> itr
= modifiers
.iterator();
411 while (itr
.hasNext()) {
412 DefinedTerm currentMod
= itr
.next();
413 if(GetVocabularyType(currentMod
, UsageTermCollection
.plantPartLabel
)) {
421 if (eventSource
== combo_Country
) {
422 if (combo_Country
.getSelection() != null) {
423 Iterator
<DefinedTerm
> itrExistingModifiers
= getEntity().getModifiers().iterator();
424 while (itrExistingModifiers
.hasNext()) {
425 DefinedTerm modifier
= itrExistingModifiers
.next();
426 if(GetVocabularyType(modifier
, UsageTermCollection
.countryLabel
)) {
427 itrExistingModifiers
.remove();
431 DefinedTerm country
= combo_Country
.getSelection();
432 getEntity().addModifier(country
);
434 Set
<DefinedTerm
> modifiers
= getEntity().getModifiers();
435 if(!modifiers
.isEmpty()) {
436 Iterator
<DefinedTerm
> itr
= modifiers
.iterator();
437 while (itr
.hasNext()) {
438 DefinedTerm currentMod
= itr
.next();
439 if(GetVocabularyType(currentMod
, UsageTermCollection
.countryLabel
)) {
446 if (eventSource
== combo_HumanGroup
) {
447 if (combo_HumanGroup
.getSelection() != null) {
448 boolean isHumanGroupChanged
= true;
449 for (DefinedTerm modToCheck
: getEntity().getModifiers()) {
450 if(modToCheck
.equals(combo_HumanGroup
.getSelection()) && (GetVocabularyType(modToCheck
, UsageTermCollection
.humanGroupLabel
))) {
451 isHumanGroupChanged
= false;
456 Iterator
<DefinedTerm
> itrExistingModifiers
= getEntity().getModifiers().iterator();
457 while (itrExistingModifiers
.hasNext()) {
458 DefinedTerm modifier
= itrExistingModifiers
.next();
459 if((GetVocabularyType(modifier
, UsageTermCollection
.humanGroupLabel
) || GetVocabularyType(modifier
, UsageTermCollection
.ethnicGroupLabel
)) && isHumanGroupChanged
) {
460 itrExistingModifiers
.remove();
464 if(isHumanGroupChanged
){
465 DefinedTerm humanGroup
= combo_HumanGroup
.getSelection();
466 getEntity().addModifier(humanGroup
);
468 combo_EthnicGroup
.setEnabled(true);
470 Set
<DefinedTerm
> modifiers
= getEntity().getModifiers();
471 if(!modifiers
.isEmpty()) {
472 Iterator
<DefinedTerm
> itr
= modifiers
.iterator();
473 while (itr
.hasNext()) {
474 DefinedTerm currentMod
= itr
.next();
475 if(GetVocabularyType(currentMod
, UsageTermCollection
.humanGroupLabel
) || GetVocabularyType(currentMod
, UsageTermCollection
.ethnicGroupLabel
)) {
480 List
<DefinedTerm
> emptyListToResetComboBox
= new ArrayList
<DefinedTerm
>();
482 // DefinedTerm emptyMod = DefinedTerm.NewInstance();
483 DefinedTerm emptyMod
= null;
486 emptyListToResetComboBox
.add(emptyMod
);
487 combo_EthnicGroup
.setTerms(emptyListToResetComboBox
);
488 combo_EthnicGroup
.setEnabled(false);
492 if (eventSource
== combo_EthnicGroup
) {
493 if (combo_EthnicGroup
.getSelection() != null) {
494 Iterator
<DefinedTerm
> itrExistingModifiers
= getEntity().getModifiers().iterator();
495 while (itrExistingModifiers
.hasNext()) {
496 DefinedTerm modifier
= itrExistingModifiers
.next();
497 if(GetVocabularyType(modifier
, combo_HumanGroup
.getSelection().getTitleCache())) {
498 itrExistingModifiers
.remove();
502 DefinedTerm ethnicGroup
= combo_EthnicGroup
.getSelection();
503 getEntity().addModifier(ethnicGroup
);
505 Set
<DefinedTerm
> modifiers
= getEntity().getModifiers();
506 if(!modifiers
.isEmpty()) {
508 Iterator
<DefinedTerm
> itr
= modifiers
.iterator();
509 while (itr
.hasNext()) {
510 DefinedTerm currentMod
= itr
.next();
511 if(GetVocabularyType(currentMod
, UsageTermCollection
.ethnicGroupLabel
)) {
524 * This function Checks the vocabulary type
526 * @param vocabularyExpected
529 private boolean GetVocabularyType(DefinedTerm term
, String vocabularyExpected
) {
530 if ((term
.getPartOf() != null) && (term
.getPartOf().getTitleCache().equals(vocabularyExpected
))) {
533 else if ((term
.getVocabulary() != null) && (term
.getPartOf()==null) && (term
.getVocabulary().getTitleCache().equals(vocabularyExpected
))) {
536 else if ((vocabularyExpected
.equals(UsageTermCollection
.ethnicGroupLabel
)) && ((term
.getPartOf() != null))) {
546 public void setEntity(CategoricalData entity
) {
547 super.setEntity(entity
);
552 public void widgetSelected(SelectionEvent e
) {
553 Object eventSource
= e
.getSource();
554 for (Object object
: combo_UseCategory
.getControls()) {
555 if (object
== eventSource
) {
556 State selectedUseCategory
= combo_UseCategory
.getSelection();
557 if (selectedUseCategory
!= null) {
558 combo_UseSubCategory
.setTerms(setUseCategoryComboTerms(TermStore
.getTerms(State
.class, null, false),selectedUseCategory
));
560 if (!getEntity().getStateData().isEmpty()) {
561 Iterator
<StateData
> itrExistingState
= getEntity().getStateData().iterator();
562 while(itrExistingState
.hasNext()) {
563 StateData existingStateData
= itrExistingState
.next();
564 Map
<Language
, LanguageString
> modifyingText
= existingStateData
.getModifyingText();
565 if (modifyingText
.get(CdmStore
.getDefaultLanguage()) != null) {
566 if (modifyingText
.get(CdmStore
.getDefaultLanguage())
567 .getText().equals(UsageTermCollection
.useSubCategoryVocabularyLabel
)) {
568 combo_UseSubCategory
.setSelection(stateSelection(UsageTermCollection
.useSubCategoryVocabularyLabel
));
576 for (Object object
: combo_HumanGroup
.getControls()) {
577 if (object
== eventSource
) {
578 DefinedTerm selectedHumanGroup
= combo_HumanGroup
.getSelection();
579 if (selectedHumanGroup
!= null) {
580 combo_EthnicGroup
.setTerms(setEthnicGroupComboTerms(TermStore
.getTerms(DefinedTerm
.class, null, false), selectedHumanGroup
));
581 if (!getEntity().getModifiers().isEmpty()) {
582 Iterator
<DefinedTerm
> iterModifiers
= getEntity().getModifiers().iterator();
583 while (iterModifiers
.hasNext()) {
584 DefinedTerm existingModifier
= iterModifiers
.next();
585 if(GetVocabularyType(existingModifier
, UsageTermCollection
.ethnicGroupLabel
)) {
586 combo_EthnicGroup
.setSelection(modifierSelection(UsageTermCollection
.ethnicGroupLabel
));
598 public void widgetDefaultSelected(SelectionEvent e
) {
599 // TODO Auto-generated method stub