<commit_before>/*
* Copyright (C) 2012 onwards University of Deusto
* All rights reserved.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution.
*
* This software consists of contributions made by many individuals, 
* listed below:
*
* Author: FILLME
*
*/

package es.deusto.weblab.client.lab.experiments;

import es.deusto.weblab.client.dto.experiments.Command;
import es.deusto.weblab.client.lab.comm.UploadStructure;
import es.deusto.weblab.client.lab.comm.callbacks.IResponseCommandCallback;

public class JSBoardBaseController implements IBoardBaseController {

	@Override
	public boolean isFacebook() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void sendCommand(Command command) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendCommand(Command command, IResponseCommandCallback callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendCommand(String command) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendCommand(String command, IResponseCommandCallback callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendAsyncCommand(Command command) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendAsyncCommand(Command command,
			IResponseCommandCallback callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendAsyncCommand(String command) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendAsyncCommand(String command,
			IResponseCommandCallback callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendFile(UploadStructure uploadStructure,
			IResponseCommandCallback callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendAsyncFile(UploadStructure uploadStructure,
			IResponseCommandCallback callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void clean() {
		// TODO Auto-generated method stub

	}

	@Override
	public void finish() {
		// TODO Auto-generated method stub

	}

	@Override
	public void stopPolling() {
		// TODO Auto-generated method stub

	}

	@Override
	public void disableFinishOnClose() {
		// TODO Auto-generated method stub

	}
}<commit_msg>Implement first JS method (not yet tested)<commit_after>/*
* Copyright (C) 2012 onwards University of Deusto
* All rights reserved.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution.
*
* This software consists of contributions made by many individuals, 
* listed below:
*
* Author: FILLME
*
*/

package es.deusto.weblab.client.lab.experiments;

import es.deusto.weblab.client.comm.exceptions.CommException;
import es.deusto.weblab.client.dto.experiments.Command;
import es.deusto.weblab.client.dto.experiments.ResponseCommand;
import es.deusto.weblab.client.lab.comm.UploadStructure;
import es.deusto.weblab.client.lab.comm.callbacks.IResponseCommandCallback;

public class JSBoardBaseController implements IBoardBaseController {
	
	private final static ISimpleResponseCallback NULL_RESPONSE_CALLBACK = new ISimpleResponseCallback() {
		@Override
		public void onFailure(String e) {
		}
		
		@Override
		public void onSuccess(String responseCommand) {
		}
	};
	
	@Override
	public void sendCommand(Command command) {
		sendCommandImpl(command.getCommandString(), NULL_RESPONSE_CALLBACK);
	}
	
	@Override
	public void sendCommand(Command command, IResponseCommandCallback callback) {
		sendCommandImpl(command.getCommandString(), new CallbackWrapper(callback));
	}
	
	@Override
	public void sendCommand(String command) {
		sendCommandImpl(command, NULL_RESPONSE_CALLBACK);
	}

	@Override
	public void sendCommand(String command, IResponseCommandCallback callback) {
		sendCommandImpl(command, new CallbackWrapper(callback));
	}

	public static native void sendCommandImpl(String commandString, ISimpleResponseCallback callback) /*-{
		WeblabExp.sendCommand(commandString)
			.done(function(success) {
				callback.@<EMAIL>.weblab.client.lab.experiments.ISimpleResponseCallback::onSuccess(Ljava/lang/String;)(success);
			})
			.fail(function(error) {
				callback.<EMAIL>.weblab.client.lab.experiments.ISimpleResponseCallback::onFailure(Ljava/lang/String;)(error);
			});
	}-*/;

	@Override
	public boolean isFacebook() {
		// TODO Auto-generated method stub
		return false;
	}


	@Override
	public void sendAsyncCommand(Command command) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendAsyncCommand(Command command,
			IResponseCommandCallback callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendAsyncCommand(String command) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendAsyncCommand(String command,
			IResponseCommandCallback callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendFile(UploadStructure uploadStructure,
			IResponseCommandCallback callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendAsyncFile(UploadStructure uploadStructure,
			IResponseCommandCallback callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void clean() {
		// TODO Auto-generated method stub

	}

	@Override
	public void finish() {
		// TODO Auto-generated method stub

	}

	@Override
	public void stopPolling() {
		// TODO Auto-generated method stub

	}

	@Override
	public void disableFinishOnClose() {
		// TODO Auto-generated method stub

	}

	public final static class CallbackWrapper implements ISimpleResponseCallback {
		
		private final IResponseCommandCallback callback;
		
		public CallbackWrapper(IResponseCommandCallback callback) {
			this.callback = callback;
		}
		
		@Override
		public void onFailure(String e) {
			this.callback.onFailure(new CommException(e));
		}
		
		@Override
		public void onSuccess(String responseCommand) {
			this.callback.onSuccess(new ResponseCommand(responseCommand));
		}
	}
}
{'fraction_non_alphanumeric': 0.08470937912813739, 'fraction_numerical': 0.001321003963011889, 'mean_word_length': 4.471544715447155, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2657153', 'n_tokens_mistral': 1892, 'n_tokens_neox': 1707, 'n_words': 466}