Revision 52922
Added by Miriam Baglioni over 5 years ago
CommunityConfiguration.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import com.google.common.collect.Lists; |
4 | 4 |
import com.google.gson.Gson; |
5 |
import com.sun.tools.javac.util.Pair; |
|
6 | 5 |
import org.apache.commons.logging.Log; |
7 | 6 |
import org.apache.commons.logging.LogFactory; |
8 | 7 |
|
... | ... | |
82 | 81 |
|
83 | 82 |
public List<String> getCommunityForSubjectValue(String value) { |
84 | 83 |
try { |
85 |
return subjectMap.get(value.toLowerCase()).stream().map(p -> p.fst).collect(Collectors.toList());
|
|
84 |
return subjectMap.get(value.toLowerCase()).stream().map(p -> p.getFst()).collect(Collectors.toList());
|
|
86 | 85 |
}catch(Exception e){ |
87 | 86 |
return new ArrayList<>(); |
88 | 87 |
} |
... | ... | |
90 | 89 |
|
91 | 90 |
public List<String> getCommunityForDatasourceValue(String value) { |
92 | 91 |
try { |
93 |
return datasourceMap.get(value.toLowerCase()).stream().map(p -> p.fst).collect(Collectors.toList());
|
|
92 |
return datasourceMap.get(value.toLowerCase()).stream().map(p -> p.getFst()).collect(Collectors.toList());
|
|
94 | 93 |
}catch(Exception e){ |
95 | 94 |
return new ArrayList<>(); |
96 | 95 |
} |
... | ... | |
98 | 97 |
|
99 | 98 |
public List<String> getCommunityForZenodoCommunityValue(String value){ |
100 | 99 |
try { |
101 |
return zenodocommunityMap.get(value.toLowerCase()).stream().map(p -> p.fst).collect(Collectors.toList());
|
|
100 |
return zenodocommunityMap.get(value.toLowerCase()).stream().map(p -> p.getFst()).collect(Collectors.toList());
|
|
102 | 101 |
}catch(Exception e){ |
103 | 102 |
return new ArrayList<>(); |
104 | 103 |
|
Also available in: Unified diff
code refactoring and addition of new class Pair