Project

General

Profile

« Previous | Next » 

Revision 9b0a1cb8

Added by Patrick Plitzner almost 5 years ago

ref #8242 Load all supported states with one service call

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrix.java
297 297

  
298 298
    private void fetchSupportedStates(Character character) {
299 299
        if(character.isSupportsCategoricalData()){
300
            List<TermDto> supportedStates = new ArrayList<>();
301 300
            Set<TermVocabulary<State>> supportedCategoricalEnumerations = character.getSupportedCategoricalEnumerations();
301
            List<UUID> vocUuids = new ArrayList<>();
302 302
            for (TermVocabulary<State> termVocabulary : supportedCategoricalEnumerations) {
303
                supportedStates.addAll(CdmStore.getService(IVocabularyService.class).getTerms(termVocabulary.getUuid()));
303
                vocUuids.add(termVocabulary.getUuid());
304 304
            }
305
//            Collections.sort(supportedStates, (state1, state2)->state1.getLabel().compareTo(state2.getLabel()));
305
            List<TermDto> supportedStates = new ArrayList<>(CdmStore.getService(IVocabularyService.class).getTerms(vocUuids));
306 306
            categoricalFeatureToStateMap.put(character, supportedStates);
307 307
        }
308 308
    }

Also available in: Unified diff