Revision 37230
Added by Claudio Atzori about 9 years ago
DedupServiceEntryPointController.java | ||
---|---|---|
6 | 6 |
import org.springframework.beans.factory.annotation.Autowired; |
7 | 7 |
import org.springframework.ui.ModelMap; |
8 | 8 |
|
9 |
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; |
|
10 | 9 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
11 | 10 |
import eu.dnetlib.functionality.modular.ui.ModuleEntryPoint; |
12 | 11 |
|
... | ... | |
16 | 15 |
private UniqueServiceLocator serviceLocator; |
17 | 16 |
|
18 | 17 |
@Override |
19 |
protected void initialize(final ModelMap map, final HttpServletRequest request, final HttpServletResponse response) throws Exception { |
|
18 |
protected void initialize(final ModelMap map, final HttpServletRequest request, final HttpServletResponse response) throws Exception {}
|
|
20 | 19 |
|
21 |
final ISLookUpService lookUpService = serviceLocator.getService(ISLookUpService.class); |
|
22 |
final String listEntityTypesXQuery = |
|
23 |
"distinct-values(for $x in //RESOURCE_PROFILE[.//RESOURCE_TYPE/@value = 'DedupOrchestrationDSResourceType'] return $x//ENTITY/@name/string())"; |
|
24 |
|
|
25 |
for (final String entityType : lookUpService.quickSearchProfile(listEntityTypesXQuery)) { |
|
26 |
final String xquery = |
|
27 |
String.format( |
|
28 |
"for $x in //RESOURCE_PROFILE[" + |
|
29 |
".//RESOURCE_TYPE/@value = 'DedupOrchestrationDSResourceType' and .//ENTITY/@name='%s' ] " + |
|
30 |
"return $x//ACTION_SET/@id/string()", entityType); |
|
31 |
map.put(entityType, lookUpService.quickSearchProfile(xquery)); |
|
32 |
} |
|
33 |
|
|
34 |
} |
|
35 |
|
|
36 | 20 |
} |
Also available in: Unified diff
dedup inspector discovers the configurations and builds the ui accordingly