Adapt TaxEditor to use vocabulary term type instead of class: #3843.
authorAndreas Müller <a.mueller@bgbm.org>
Mon, 12 Oct 2015 13:07:20 +0000 (15:07 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Mon, 12 Oct 2015 13:07:20 +0000 (15:07 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java

index 4444f18f585cfc20875dc89a724e0755f229a6c9..c7f7d4a76186bae01c99189431258f728c03a9be 100644 (file)
@@ -28,6 +28,7 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IVocabularyService;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.model.common.TermVocabulary;
 import eu.etaxonomy.cdm.model.location.Country;
 import eu.etaxonomy.cdm.model.location.NamedArea;
@@ -65,7 +66,7 @@ public class NamedAreaSelectionDialog extends
                }
        }
 
-       private Collection<TermVocabulary<NamedArea>> selectedVocabularies;
+       private Collection<TermVocabulary> selectedVocabularies;
     private ArrayList<TermVocabulary> preselectedVocabularies;
 
 
@@ -134,9 +135,8 @@ public class NamedAreaSelectionDialog extends
                selectedVocabularies = getAvailableVocabularies();
        }
 
-       private List<TermVocabulary<NamedArea>> getAvailableVocabularies(){
-               List<TermVocabulary<NamedArea>> vocabularies = CdmStore.getService(IVocabularyService.class).listByTermClass(NamedArea.class, null, null, null, null);
-               vocabularies.add(CdmStore.getService(IVocabularyService.class).find(Country.uuidCountryVocabulary));
+       private List<TermVocabulary> getAvailableVocabularies(){
+               List<TermVocabulary> vocabularies = CdmStore.getService(IVocabularyService.class).listByTermType(TermType.NamedArea, true, null, null, null, null);
                return vocabularies;
        }