import eu.etaxonomy.cdm.model.common.Language;\r
import eu.etaxonomy.cdm.model.common.LanguageString;\r
import eu.etaxonomy.cdm.model.common.Marker;\r
+import eu.etaxonomy.cdm.model.common.TermType;\r
import eu.etaxonomy.cdm.model.description.CategoricalData;\r
import eu.etaxonomy.cdm.model.description.State;\r
import eu.etaxonomy.cdm.model.description.StateData;\r
-import eu.etaxonomy.taxeditor.editor.UsageTermCollection;\r
import eu.etaxonomy.taxeditor.store.CdmStore;\r
import eu.etaxonomy.taxeditor.store.TermStore;\r
-import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.store.UsageTermCollection;\r
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;\r
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;\r
\r
\r
protected void createControls(ICdmFormElement formElement,\r
CategoricalData entity, int style) {\r
\r
- combo_UseCategory = formFactory.createTermComboElement(State.class, this, UsageTermCollection.useCategoryVocabularyLabel, null, style);\r
+ combo_UseCategory = formFactory.createDefinedTermComboElement(TermType.State, this, UsageTermCollection.useCategoryVocabularyLabel, null, style);\r
combo_UseCategory.addSelectionListener(this);\r
- combo_UseSubCategory = formFactory.createTermComboElement(State.class, this, UsageTermCollection.useSubCategoryVocabularyLabel, null, style);\r
- combo_PlantPart = formFactory.createTermComboElement(DefinedTerm.class, this, UsageTermCollection.plantPartLabel, null, style);\r
- combo_HumanGroup = formFactory.createTermComboElement(DefinedTerm.class, this, UsageTermCollection.humanGroupLabel, null, style);\r
+ combo_UseSubCategory = formFactory.createDefinedTermComboElement(TermType.State, this, UsageTermCollection.useSubCategoryVocabularyLabel, null, style);\r
+ combo_PlantPart = formFactory.createDefinedTermComboElement(TermType.Modifier, this, UsageTermCollection.plantPartLabel, null, style);\r
+ combo_HumanGroup = formFactory.createDefinedTermComboElement(TermType.Modifier, this, UsageTermCollection.humanGroupLabel, null, style);\r
combo_HumanGroup.addSelectionListener(this);\r
- combo_EthnicGroup = formFactory.createTermComboElement(DefinedTerm.class, this, UsageTermCollection.ethnicGroupLabel, null, style);\r
- combo_Country = formFactory.createTermComboElement(DefinedTerm.class, this, UsageTermCollection.countryLabel, null, style);\r
+ combo_EthnicGroup = formFactory.createDefinedTermComboElement(TermType.Modifier, this, UsageTermCollection.ethnicGroupLabel, null, style);\r
+ combo_Country = formFactory.createDefinedTermComboElement(TermType.Modifier, this, UsageTermCollection.countryLabel, null, style);\r
\r
\r
List<State> termsUseCategory = setUseCategoryComboTerms(TermStore.getTerms(State.class, null, false));\r
List<State> termsToAdd = new ArrayList<State>();\r
for (State term : listOfTerms) {\r
\r
- if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(UsageTermCollection.useCategoryVocabularyLabel))) {\r
+ if ((term.getPartOf() != null) && (term.getPartOf().getUuid().equals( UsageTermCollection.uuidUseCategoryVocabulary))) {\r
termsToAdd.add(term);\r
}\r
- else if ((term.getVocabulary() !=null) && (term.getPartOf() == null) && (term.getVocabulary().getTitleCache().equals(UsageTermCollection.useCategoryVocabularyLabel))) {\r
+ else if ((term.getVocabulary() !=null) && (term.getPartOf() == null) && (term.getVocabulary().getUuid().equals(UsageTermCollection.uuidUseCategoryVocabulary))) {\r
termsToAdd.add(term);\r
}\r
}\r
}\r
}\r
List<DefinedTerm> emptyListToResetComboBox = new ArrayList<DefinedTerm>();\r
- \r
+\r
// DefinedTerm emptyMod = DefinedTerm.NewInstance();\r
DefinedTerm emptyMod = null;\r
\r