Revision 34787
Added by Michele Artini over 9 years ago
IsAjaxController.java | ||
---|---|---|
26 | 26 |
import com.google.common.collect.Iterables; |
27 | 27 |
import com.google.common.collect.Maps; |
28 | 28 |
|
29 |
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpDocumentNotFoundException; |
|
30 |
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; |
|
31 |
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; |
|
32 | 29 |
import eu.dnetlib.enabling.is.rmi.InformationService; |
33 | 30 |
import eu.dnetlib.enabling.is.rmi.objects.BlackboardMessage; |
34 | 31 |
import eu.dnetlib.enabling.is.rmi.objects.DnetDataStructure; |
... | ... | |
146 | 143 |
return serviceLocator.getService(InformationService.class).listBlackboardMessages(); |
147 | 144 |
} |
148 | 145 |
|
149 |
@RequestMapping("getMetaWfIdForFamily.do") |
|
150 |
public @ResponseBody |
|
151 |
Map<String, String> getMetaWfId(@RequestParam(value = "family", required = true) final String family) throws ISLookUpException { |
|
152 |
final String xq = "for $x in collection('/db/DRIVER/MetaWorkflowDSResources/MetaWorkflowDSResourceType') " + |
|
153 |
"where $x//METAWORKFLOW_NAME/@family='" + family + "' " + |
|
154 |
"return concat($x//RESOURCE_IDENTIFIER/@value, ' @@@ ', $x//METAWORKFLOW_SECTION)"; |
|
155 |
|
|
156 |
final Map<String, String> map = Maps.newHashMap(); |
|
157 |
try { |
|
158 |
final String[] arr = serviceLocator.getService(ISLookUpService.class).getResourceProfileByQuery(xq).split("@@@"); |
|
159 |
map.put("id", arr[0].trim()); |
|
160 |
map.put("section", arr[1].trim()); |
|
161 |
} catch (ISLookUpDocumentNotFoundException e) { |
|
162 |
map.put("id", ""); |
|
163 |
map.put("section", ""); |
|
164 |
} |
|
165 |
map.put("family", family); |
|
166 |
|
|
167 |
return map; |
|
168 |
} |
|
169 |
|
|
170 | 146 |
@RequestMapping("listServices.do") |
171 | 147 |
public @ResponseBody |
172 | 148 |
Collection<ServiceGrouper> listServices() throws Exception { |
Also available in: Unified diff
removed backup wf