Revision 42621
Added by Sandro La Bruzzo almost 8 years ago
RepoUIUtils.java | ||
---|---|---|
5 | 5 |
import java.util.List; |
6 | 6 |
import java.util.Map; |
7 | 7 |
|
8 |
import javax.annotation.Resource; |
|
9 |
|
|
10 | 8 |
import com.google.common.collect.Lists; |
11 |
|
|
12 | 9 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
13 | 10 |
import eu.dnetlib.functionality.modular.ui.repositories.objects.VocabularyEntry; |
14 | 11 |
import eu.dnetlib.rmi.data.CollectorService; |
... | ... | |
16 | 13 |
import eu.dnetlib.rmi.data.ProtocolParameter; |
17 | 14 |
import eu.dnetlib.rmi.enabling.ISLookUpException; |
18 | 15 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
16 |
import org.springframework.beans.factory.annotation.Autowired; |
|
19 | 17 |
|
20 | 18 |
public class RepoUIUtils { |
21 | 19 |
|
22 |
@Resource |
|
20 |
private final Map<String, List<ProtocolParameter>> parametersMap = new HashMap<>(); |
|
21 |
@Autowired |
|
23 | 22 |
private UniqueServiceLocator serviceLocator; |
24 | 23 |
|
25 |
private final Map<String, List<ProtocolParameter>> parametersMap = new HashMap<>(); |
|
26 |
|
|
27 | 24 |
public List<VocabularyEntry> fetchVocabularyTerms(final String voc) throws ISLookUpException { |
28 | 25 |
final String xquery = "for $x in collection('/db/DRIVER/VocabularyDSResources/VocabularyDSResourceType')[.//VOCABULARY_NAME/@code = '" |
29 | 26 |
+ voc.trim() + "']//TERM return concat($x/@code, ' @@@ ', $x/@english_name)"; |
Also available in: Unified diff
Chnaged Resource to Autowired