/*******************************************************************************
 *
 *    Copyright (C) 2015-2018 the BBoxDB project
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 *
 *******************************************************************************/
package org.bboxdb.network.client;

import org.bboxdb.misc.BBoxDBException;
import org.bboxdb.network.client.future.EmptyResultFuture;
import org.bboxdb.network.client.future.TupleListFuture;

public class BBoxDBClientHelper {

	/**
	 * Cancel a complete query
	 * @param future
	 * @throws InterruptedException
	 */
	public static void cancelQuery(final TupleListFuture future)
			throws BBoxDBException, InterruptedException {

		for(int i = 0; i < future.getNumberOfResultObjets(); i++) {
			final short queryId = future.getRequestId(i);
			System.out.println("Canceling query: " + queryId);

			final BBoxDBConnection connection = future.getConnection(i);
			final BBoxDBClient client = connection.getBboxDBClient();

			final EmptyResultFuture cancelResult = client.cancelRequest(queryId);

			cancelResult.waitForCompletion();

			if(cancelResult.isFailed()) {
				throw new BBoxDBException("Cancel query has failed: " + cancelResult.getAllMessages());
			}
		}
	}

}

@@ -990,42 +990,214 @@
 re;%0A
-%0Apublic class BBoxDBClientHelper %7B
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Apublic class BBoxDBClientHelper %7B%0A%0A%09/**%0A%09 * The Logger%0A%09 */%0A%09private final static Logger logger = LoggerFactory.getLogger(BBoxDBClientHelper.class);
 %0A%0A%09/
@@ -1514,26 +1514,19 @@
 %0A%09%09%09
-System.out.println
+logger.info
 (%22Ca
@@ -1540,19 +1540,20 @@
  query: 
-%22 +
+%7B%7D%22,
  queryId

Converteed to logger