Project

General

Profile

Revision 9b0a1cb8

ID9b0a1cb82066c8887b97fa504768fe1c9077fa4c
Parent 7cc57f1d
Child e8e9ccfa

Added by Patrick Plitzner over 1 year 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

Add picture from clipboard (Maximum size: 40 MB)