* @param Query the Query to execute.
* @return An HttpQuery configured as per the context.
*/
private static HttpQuery configureQuery(String uri, Context parentContext, Query query) {
HttpQuery httpQuery = new HttpQuery(uri);
Context context = new Context(parentContext);
// add the context settings from the service context
@SuppressWarnings("unchecked")
Map<String, Context> serviceContextMap = (Map<String, Context>) context.get(serviceContext);
if (serviceContextMap != null)
{
Context serviceContext = serviceContextMap.get(uri);
if (serviceContext != null) context.putAll(serviceContext);
}
// configure the query object.
httpQuery.merge(QueryEngineHTTP.getServiceParams(uri, context));