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
.log4j
.Logger
;
19 import org
.eclipse
.swt
.events
.SelectionEvent
;
20 import org
.eclipse
.swt
.events
.SelectionListener
;
22 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTerm
;
23 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
24 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
25 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
26 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
27 import eu
.etaxonomy
.cdm
.model
.description
.State
;
28 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
29 import eu
.etaxonomy
.taxeditor
.editor
.UsageTermCollection
;
30 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
31 import eu
.etaxonomy
.taxeditor
.store
.TermStore
;
32 import eu
.etaxonomy
.taxeditor
.ui
.campanula
.compatibility
.ICdmFormElement
;
33 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
34 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
35 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
39 * The context manager mediates context start/stop and workbench shutdowns to all registered listeners.
42 * @created mar 13, 2012
45 public class UseRecordDetailElement
extends
46 AbstractCdmDetailElement
<CategoricalData
> implements SelectionListener
{
48 @SuppressWarnings("unused")
49 private static final Logger logger
= Logger
.getLogger(UseRecordDetailElement
.class);
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
);
65 protected void createControls(ICdmFormElement formElement
,
66 CategoricalData entity
, int style
) {
68 combo_UseCategory
= formFactory
.createTermComboElement(State
.class, this, UsageTermCollection
.useCategoryVocabularyLabel
, null, style
);
69 combo_UseCategory
.addSelectionListener(this);
70 combo_UseSubCategory
= formFactory
.createTermComboElement(State
.class, this, UsageTermCollection
.useSubCategoryVocabularyLabel
, null, style
);
71 combo_PlantPart
= formFactory
.createTermComboElement(DefinedTerm
.class, this, UsageTermCollection
.plantPartLabel
, null, style
);
72 combo_HumanGroup
= formFactory
.createTermComboElement(DefinedTerm
.class, this, UsageTermCollection
.humanGroupLabel
, null, style
);
73 combo_HumanGroup
.addSelectionListener(this);
74 combo_EthnicGroup
= formFactory
.createTermComboElement(DefinedTerm
.class, this, UsageTermCollection
.ethnicGroupLabel
, null, style
);
75 combo_Country
= formFactory
.createTermComboElement(DefinedTerm
.class, this, UsageTermCollection
.countryLabel
, null, style
);
78 List
<State
> termsUseCategory
= setUseCategoryComboTerms(TermStore
.getTerms(State
.class, null, false));
79 combo_UseCategory
.setTerms(termsUseCategory
);
80 combo_UseCategory
.setSelection(stateSelection(UsageTermCollection
.useCategoryVocabularyLabel
));
82 List
<State
> termsSubCategory
= setUseCategoryComboTerms(TermStore
.getTerms(State
.class, null, false), combo_UseCategory
.getSelection());
84 if (termsSubCategory
!= null) {
85 combo_UseSubCategory
.setTerms(termsSubCategory
);
86 combo_UseSubCategory
.setSelection(stateSelection(UsageTermCollection
.useSubCategoryVocabularyLabel
));
87 combo_UseSubCategory
.setEnabled(true);
90 combo_UseSubCategory
.setEnabled(false);
93 List
<DefinedTerm
> plantPartsToAdd
= setModifierComboTerms(TermStore
.getTerms(DefinedTerm
.class, null, false), UsageTermCollection
.plantPartLabel
);
94 combo_PlantPart
.setTerms(plantPartsToAdd
);
95 combo_PlantPart
.setSelection(modifierSelection(UsageTermCollection
.plantPartLabel
));
97 List
<DefinedTerm
> countriesToAdd
= setModifierComboTerms(TermStore
.getTerms(DefinedTerm
.class, null, false), UsageTermCollection
.countryLabel
);
98 combo_Country
.setTerms(countriesToAdd
);
99 combo_Country
.setSelection(modifierSelection(UsageTermCollection
.countryLabel
));
101 List
<DefinedTerm
> humanGroupToAdd
= setModifierComboTerms(TermStore
.getTerms(DefinedTerm
.class, null, false), UsageTermCollection
.humanGroupLabel
);
102 combo_HumanGroup
.setTerms(humanGroupToAdd
);
103 combo_HumanGroup
.setSelection(modifierSelection(UsageTermCollection
.humanGroupLabel
));
105 List
<DefinedTerm
> ethnicGroupToAdd
= setEthnicGroupComboTerms(TermStore
.getTerms(DefinedTerm
.class, null, false), combo_HumanGroup
.getSelection());
106 if (ethnicGroupToAdd
!= null) {
107 combo_EthnicGroup
.setTerms(ethnicGroupToAdd
);
108 combo_EthnicGroup
.setSelection(modifierSelection(UsageTermCollection
.ethnicGroupLabel
));
109 combo_EthnicGroup
.setEnabled(true);
111 combo_EthnicGroup
.setEnabled(false);
117 * Returns the select modifier
118 * @param comboCategory
121 private DefinedTerm
modifierSelection(String comboCategory
) {
122 if(!getEntity().getModifiers().isEmpty()) {
123 for (DefinedTerm modifier
: getEntity().getModifiers()) {
124 if(GetVocabularyType(modifier
, comboCategory
)) {
136 * Returns the selected state
137 * @param comboCategory
140 private State
stateSelection(String comboCategory
) {
141 if (!getEntity().getStateData().isEmpty()) {
142 for (StateData statedata
: getEntity().getStateData()) {
143 if (statedata
.getModifyingText().get(CdmStore
.getDefaultLanguage()) != null) {
144 String testString
= statedata
.getModifyingText().get(CdmStore
.getDefaultLanguage()).getText();
145 if(testString
.equals(comboCategory
)) {
146 if(statedata
.getState() !=null) {
147 return statedata
.getState();
161 * This function sets the combo terms (Besides EthnicGroup
166 private List
<DefinedTerm
> setModifierComboTerms(List
<DefinedTerm
> listOfTerms
, String modType
) {
167 List
<DefinedTerm
> termsToAdd
= new ArrayList
<DefinedTerm
>();
168 for (DefinedTerm term
: listOfTerms
) {
170 if ((term
.getPartOf() != null) && (term
.getPartOf().getTitleCache().equals(modType
))) {
171 termsToAdd
.add(term
);
173 else if ((term
.getVocabulary() != null) && (term
.getPartOf() == null) && (term
.getVocabulary().getTitleCache().equals(modType
))) {
174 termsToAdd
.add(term
);
183 * This function sets the Use Category combo term
187 private List
<State
> setUseCategoryComboTerms(List
<State
> listOfTerms
) {
188 List
<State
> termsToAdd
= new ArrayList
<State
>();
189 for (State term
: listOfTerms
) {
191 if ((term
.getPartOf() != null) && (term
.getPartOf().getTitleCache().equals(UsageTermCollection
.useCategoryVocabularyLabel
))) {
192 termsToAdd
.add(term
);
194 else if ((term
.getVocabulary() !=null) && (term
.getPartOf() == null) && (term
.getVocabulary().getTitleCache().equals(UsageTermCollection
.useCategoryVocabularyLabel
))) {
195 termsToAdd
.add(term
);
203 * This function sets the Use SubCategory combo term
205 * @param selectedUseCategory
208 private List
<State
> setUseCategoryComboTerms(List
<State
> listOfTerms
,
209 State selectedUseCategory
) {
210 List
<State
> termsToAdd
= new ArrayList
<State
>();
211 if (combo_UseCategory
.getSelection() != null) {
213 for (State term
: listOfTerms
) {
214 if ((term
.getPartOf() != null) && (term
.getPartOf().getTitleCache().equals(selectedUseCategory
.getTitleCache()))) {
215 termsToAdd
.add(term
);
217 else if ((term
.getVocabulary() !=null) && (term
.getVocabulary().getTitleCache().equals(selectedUseCategory
.getTitleCache()))) {
218 termsToAdd
.add(term
);
223 else if (!getEntity().getStateData().isEmpty()) {
224 for (StateData stateData
: getEntity().getStateData()) {
225 if (stateData
.getModifyingText().get(CdmStore
.getDefaultLanguage()) != null) {
226 if ((stateData
.getState() != null) && (stateData
.getModifyingText().get(CdmStore
.getDefaultLanguage()).getText() == UsageTermCollection
.useCategoryVocabularyLabel
)) {
227 for (State term
: listOfTerms
) {
228 if ((term
.getPartOf() != null) && (term
.getPartOf().getTitleCache().equals(stateData
.getState().getTitleCache()))) {
229 termsToAdd
.add(term
);
230 } else if ((term
.getVocabulary() != null) && (term
.getVocabulary().getTitleCache().equals(stateData
.getState().getTitleCache()))) {
231 termsToAdd
.add(term
);
250 * This function sets the EthnicGroup combo term
252 * @param selectedHumangroup
255 private List
<DefinedTerm
> setEthnicGroupComboTerms(List
<DefinedTerm
> listOfTerms
,
256 DefinedTerm selectedHumangroup
) {
257 List
<DefinedTerm
> termsToAdd
= new ArrayList
<DefinedTerm
>();
258 if (combo_HumanGroup
.getSelection() != null) {
259 for (DefinedTerm term
: listOfTerms
) {
261 if ((term
.getPartOf() != null) && (term
.getPartOf().getTitleCache().equals(selectedHumangroup
.getTitleCache()))) {
262 termsToAdd
.add(term
);
264 else if ((term
.getVocabulary() != null) && (term
.getVocabulary().getTitleCache().equals(selectedHumangroup
.getTitleCache()))) {
265 termsToAdd
.add(term
);
269 else if (!getEntity().getModifiers().isEmpty()) {
270 for (DefinedTerm modifier
: getEntity().getModifiers()) {
271 if (modifier
.getMarkers() != null) {
272 for (Marker marker
: modifier
.getMarkers()) {
273 if(marker
.getMarkerType().getTitleCache().equals(UsageTermCollection
.humanGroupLabel
)) {
274 for (DefinedTerm term
: listOfTerms
) {
275 if ((term
.getPartOf() != null) && (term
.getPartOf().getTitleCache().equals(modifier
.getTitleCache()))) {
276 termsToAdd
.add(modifier
);
277 } else if ((term
.getVocabulary() != null) && (term
.getVocabulary().getTitleCache().equals(modifier
.getTitleCache()))) {
278 termsToAdd
.add(modifier
);
296 public void handleEvent(Object eventSource
) {
297 if (eventSource
== combo_UseCategory
) {
298 if (combo_UseCategory
.getSelection() != null) {
299 boolean isChanged
= false;
300 boolean isUseCategoryChanged
= false;
301 if (!getEntity().getStateData().isEmpty()) {
302 for (StateData useCategoryStateDataCheck
: getEntity().getStateData()) {
303 Map
<Language
, LanguageString
> modText
= useCategoryStateDataCheck
.getModifyingText();
304 if(modText
.get(CdmStore
.getDefaultLanguage()) != null && modText
.get(CdmStore
.getDefaultLanguage()).getText().equals(UsageTermCollection
.useCategoryVocabularyLabel
)) {
305 if(!useCategoryStateDataCheck
.getState().getTitleCache().equals(combo_UseCategory
.getSelection().getTitleCache())) {
306 isUseCategoryChanged
= true;
311 ListIterator
<StateData
> itrExistingStates
= getEntity().getStateData().listIterator();
312 while(itrExistingStates
.hasNext()) {
313 StateData existingStateData
= itrExistingStates
.next();
314 Map
<Language
, LanguageString
> modifyingText
= existingStateData
316 if (modifyingText
.get(CdmStore
.getDefaultLanguage()) != null) {
317 if (modifyingText
.get(CdmStore
.getDefaultLanguage()).getText().equals(UsageTermCollection
.useCategoryVocabularyLabel
)) {
319 if(!existingStateData
.getState().getTitleCache().equals(combo_UseCategory
.getSelection().getTitleCache())) {
320 itrExistingStates
.remove();
321 StateData stateData
= StateData
.NewInstance(combo_UseCategory
.getSelection());
322 stateData
.setState(combo_UseCategory
.getSelection());
323 stateData
.putModifyingText(CdmStore
.getDefaultLanguage(),UsageTermCollection
.useCategoryVocabularyLabel
);
324 itrExistingStates
.add(stateData
);
327 } else if (modifyingText
.get(CdmStore
.getDefaultLanguage()).getText().equals(UsageTermCollection
.useSubCategoryVocabularyLabel
) && isUseCategoryChanged
== true) {
328 itrExistingStates
.remove();
335 if (isChanged
== false) {
336 StateData stateData
= StateData
337 .NewInstance(combo_UseCategory
.getSelection());
338 stateData
.setState(combo_UseCategory
.getSelection());
339 stateData
.putModifyingText(CdmStore
.getDefaultLanguage(), UsageTermCollection
.useCategoryVocabularyLabel
);
340 getEntity().addStateData(stateData
);
343 combo_UseSubCategory
.setEnabled(true);
347 if (!getEntity().getStateData().isEmpty()) {
348 Iterator
<StateData
> itr
= getEntity().getStateData().iterator();
349 while(itr
.hasNext()) {
350 StateData stateToRemove
= itr
.next();
353 List
<State
> termsSubCategory
= new ArrayList
<State
>();
354 State emptyState
= State
.NewInstance();
355 termsSubCategory
.add(emptyState
);
356 combo_UseSubCategory
.setTerms(termsSubCategory
);
357 combo_UseSubCategory
.setEnabled(false);
362 if (eventSource
== combo_UseSubCategory
) {
363 if (combo_UseSubCategory
.getSelection() != null) {
364 boolean isChanged
= false;
365 if (!getEntity().getStateData().isEmpty()) {
366 ListIterator
<StateData
> itrExistingStates
= getEntity().getStateData().listIterator();
367 while(itrExistingStates
.hasNext()) {
368 StateData existingStateData
= itrExistingStates
.next();
369 Map
<Language
, LanguageString
> modifyingText
= existingStateData
371 if (modifyingText
.get(CdmStore
.getDefaultLanguage()) != null) {
372 if (modifyingText
.get(CdmStore
.getDefaultLanguage()).getText().equals(UsageTermCollection
.useSubCategoryVocabularyLabel
)) {
374 if(!existingStateData
.getState().getTitleCache().equals(combo_UseSubCategory
.getSelection().getTitleCache())) {
375 itrExistingStates
.remove();
376 StateData stateData
= StateData
.NewInstance(combo_UseSubCategory
.getSelection());
377 stateData
.setState(combo_UseSubCategory
.getSelection());
378 stateData
.putModifyingText(CdmStore
.getDefaultLanguage(),UsageTermCollection
.useSubCategoryVocabularyLabel
);
379 itrExistingStates
.add(stateData
);
386 if (isChanged
== false){
387 StateData stateData
= StateData
388 .NewInstance(combo_UseSubCategory
.getSelection());
389 stateData
.setState(combo_UseSubCategory
.getSelection());
390 stateData
.putModifyingText(CdmStore
.getDefaultLanguage(), UsageTermCollection
.useSubCategoryVocabularyLabel
);
391 getEntity().addStateData(stateData
);
395 if (!getEntity().getStateData().isEmpty()) {
396 Iterator
<StateData
> itrStateData
= getEntity().getStateData().iterator();
397 while(itrStateData
.hasNext()) {
398 StateData existingStateData
= itrStateData
.next();
399 Map
<Language
, LanguageString
> modifyingText
= existingStateData
402 if (modifyingText
.get(CdmStore
.getDefaultLanguage()) != null) {
403 if (modifyingText
.get(CdmStore
.getDefaultLanguage()).getText() == UsageTermCollection
.useSubCategoryVocabularyLabel
) {
404 itrStateData
.remove();
411 if (eventSource
== combo_PlantPart
) {
412 if (combo_PlantPart
.getSelection() != null) {
413 Iterator
<DefinedTerm
> itrExistingModifiers
= getEntity().getModifiers().iterator();
414 while (itrExistingModifiers
.hasNext()) {
415 DefinedTerm modifier
= itrExistingModifiers
.next();
416 if(GetVocabularyType(modifier
, UsageTermCollection
.plantPartLabel
)) {
417 itrExistingModifiers
.remove();
421 DefinedTerm plantPart
= combo_PlantPart
.getSelection();
422 getEntity().addModifier(plantPart
);
424 Set
<DefinedTerm
> modifiers
= getEntity().getModifiers();
425 if(!modifiers
.isEmpty()) {
426 Iterator
<DefinedTerm
> itr
= modifiers
.iterator();
427 while (itr
.hasNext()) {
428 DefinedTerm currentMod
= itr
.next();
429 if(GetVocabularyType(currentMod
, UsageTermCollection
.plantPartLabel
)) {
437 if (eventSource
== combo_Country
) {
438 if (combo_Country
.getSelection() != null) {
439 Iterator
<DefinedTerm
> itrExistingModifiers
= getEntity().getModifiers().iterator();
440 while (itrExistingModifiers
.hasNext()) {
441 DefinedTerm modifier
= itrExistingModifiers
.next();
442 if(GetVocabularyType(modifier
, UsageTermCollection
.countryLabel
)) {
443 itrExistingModifiers
.remove();
447 DefinedTerm country
= combo_Country
.getSelection();
448 getEntity().addModifier(country
);
450 Set
<DefinedTerm
> modifiers
= getEntity().getModifiers();
451 if(!modifiers
.isEmpty()) {
452 Iterator
<DefinedTerm
> itr
= modifiers
.iterator();
453 while (itr
.hasNext()) {
454 DefinedTerm currentMod
= itr
.next();
455 if(GetVocabularyType(currentMod
, UsageTermCollection
.countryLabel
)) {
462 if (eventSource
== combo_HumanGroup
) {
463 if (combo_HumanGroup
.getSelection() != null) {
464 boolean isHumanGroupChanged
= true;
465 for (DefinedTerm modToCheck
: getEntity().getModifiers()) {
466 if(modToCheck
.equals(combo_HumanGroup
.getSelection()) && (GetVocabularyType(modToCheck
, UsageTermCollection
.humanGroupLabel
))) {
467 isHumanGroupChanged
= false;
472 Iterator
<DefinedTerm
> itrExistingModifiers
= getEntity().getModifiers().iterator();
473 while (itrExistingModifiers
.hasNext()) {
474 DefinedTerm modifier
= itrExistingModifiers
.next();
475 if((GetVocabularyType(modifier
, UsageTermCollection
.humanGroupLabel
) || GetVocabularyType(modifier
, UsageTermCollection
.ethnicGroupLabel
)) && isHumanGroupChanged
) {
476 itrExistingModifiers
.remove();
480 if(isHumanGroupChanged
){
481 DefinedTerm humanGroup
= combo_HumanGroup
.getSelection();
482 getEntity().addModifier(humanGroup
);
484 combo_EthnicGroup
.setEnabled(true);
486 Set
<DefinedTerm
> modifiers
= getEntity().getModifiers();
487 if(!modifiers
.isEmpty()) {
488 Iterator
<DefinedTerm
> itr
= modifiers
.iterator();
489 while (itr
.hasNext()) {
490 DefinedTerm currentMod
= itr
.next();
491 if(GetVocabularyType(currentMod
, UsageTermCollection
.humanGroupLabel
) || GetVocabularyType(currentMod
, UsageTermCollection
.ethnicGroupLabel
)) {
496 List
<DefinedTerm
> emptyListToResetComboBox
= new ArrayList
<DefinedTerm
>();
498 // DefinedTerm emptyMod = DefinedTerm.NewInstance();
499 DefinedTerm emptyMod
= null;
502 emptyListToResetComboBox
.add(emptyMod
);
503 combo_EthnicGroup
.setTerms(emptyListToResetComboBox
);
504 combo_EthnicGroup
.setEnabled(false);
508 if (eventSource
== combo_EthnicGroup
) {
509 if (combo_EthnicGroup
.getSelection() != null) {
510 Iterator
<DefinedTerm
> itrExistingModifiers
= getEntity().getModifiers().iterator();
511 while (itrExistingModifiers
.hasNext()) {
512 DefinedTerm modifier
= itrExistingModifiers
.next();
513 if(GetVocabularyType(modifier
, combo_HumanGroup
.getSelection().getTitleCache())) {
514 itrExistingModifiers
.remove();
518 DefinedTerm ethnicGroup
= combo_EthnicGroup
.getSelection();
519 getEntity().addModifier(ethnicGroup
);
521 Set
<DefinedTerm
> modifiers
= getEntity().getModifiers();
522 if(!modifiers
.isEmpty()) {
524 Iterator
<DefinedTerm
> itr
= modifiers
.iterator();
525 while (itr
.hasNext()) {
526 DefinedTerm currentMod
= itr
.next();
527 if(GetVocabularyType(currentMod
, UsageTermCollection
.ethnicGroupLabel
)) {
540 * This function Checks the vocabulary type
542 * @param vocabularyExpected
545 private boolean GetVocabularyType(DefinedTerm term
, String vocabularyExpected
) {
546 if ((term
.getPartOf() != null) && (term
.getPartOf().getTitleCache().equals(vocabularyExpected
))) {
549 else if ((term
.getVocabulary() != null) && (term
.getPartOf()==null) && (term
.getVocabulary().getTitleCache().equals(vocabularyExpected
))) {
552 else if ((vocabularyExpected
.equals(UsageTermCollection
.ethnicGroupLabel
)) && ((term
.getPartOf() != null))) {
562 public void setEntity(CategoricalData entity
) {
563 super.setEntity(entity
);
568 public void widgetSelected(SelectionEvent e
) {
569 Object eventSource
= e
.getSource();
570 for (Object object
: combo_UseCategory
.getControls()) {
571 if (object
== eventSource
) {
572 State selectedUseCategory
= combo_UseCategory
.getSelection();
573 if (selectedUseCategory
!= null) {
574 combo_UseSubCategory
.setTerms(setUseCategoryComboTerms(TermStore
.getTerms(State
.class, null, false),selectedUseCategory
));
576 if (!getEntity().getStateData().isEmpty()) {
577 Iterator
<StateData
> itrExistingState
= getEntity().getStateData().iterator();
578 while(itrExistingState
.hasNext()) {
579 StateData existingStateData
= itrExistingState
.next();
580 Map
<Language
, LanguageString
> modifyingText
= existingStateData
.getModifyingText();
581 if (modifyingText
.get(CdmStore
.getDefaultLanguage()) != null) {
582 if (modifyingText
.get(CdmStore
.getDefaultLanguage())
583 .getText().equals(UsageTermCollection
.useSubCategoryVocabularyLabel
)) {
584 combo_UseSubCategory
.setSelection(stateSelection(UsageTermCollection
.useSubCategoryVocabularyLabel
));
592 for (Object object
: combo_HumanGroup
.getControls()) {
593 if (object
== eventSource
) {
594 DefinedTerm selectedHumanGroup
= combo_HumanGroup
.getSelection();
595 if (selectedHumanGroup
!= null) {
596 combo_EthnicGroup
.setTerms(setEthnicGroupComboTerms(TermStore
.getTerms(DefinedTerm
.class, null, false), selectedHumanGroup
));
597 if (!getEntity().getModifiers().isEmpty()) {
598 Iterator
<DefinedTerm
> iterModifiers
= getEntity().getModifiers().iterator();
599 while (iterModifiers
.hasNext()) {
600 DefinedTerm existingModifier
= iterModifiers
.next();
601 if(GetVocabularyType(existingModifier
, UsageTermCollection
.ethnicGroupLabel
)) {
602 combo_EthnicGroup
.setSelection(modifierSelection(UsageTermCollection
.ethnicGroupLabel
));
614 public void widgetDefaultSelected(SelectionEvent e
) {
615 // TODO Auto-generated method stub