List of usage examples for org.apache.commons.collections4 MultiValuedMap putAll
boolean putAll(K key, Iterable<? extends V> values);
From source file:org.phenotips.vocabulary.internal.hpoannotations.AbstractPhenotypeForDiseaseAnnotationsExtension.java
@Override protected void processCSVRecordRow(@Nonnull final CSVRecord row, @Nonnull final Vocabulary vocabulary) { // The annotation source file contains data for several disorder databases. Only want to look at data that is // relevant for the current vocabulary. final String dbName = getRowItem(row, VOCABULARY_ID_COLUMN); if (StringUtils.isNotBlank(dbName)) { String diseaseId = getRowItem(row, TERM_ID_COLUMN); final String symptomId = getRowItem(row, PHENOTYPE_COLUMN); if (StringUtils.isNotBlank(diseaseId) && StringUtils.isNotBlank(symptomId)) { diseaseId = vocabularyIdToTermPrefix(dbName) + diseaseId; MultiValuedMap<String, String> termData = this.data.get(diseaseId); if (termData == null) { termData = new HashSetValuedHashMap<>(); this.data.put(diseaseId, termData); }/*from w w w .ja v a 2 s. c om*/ termData.put(getDirectPhenotypesLabel(), symptomId); termData.putAll(getAllAncestorPhenotypesLabel(), getSelfAndAncestorTermIds(symptomId)); } } }