<commit_before>//
// Created       : 2006 Jun 14 (Wed) 18:29:38 by <NAME>.
// Last Modified : 2006 Aug 12 (Sat) 19:24:47 by <NAME>.
//

package com.differentity.client;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

import com.differentity.client.Main;
import com.differentity.client.SVOPanel;
import com.differentity.client.Service;
import com.differentity.client.ServiceAsync;

public class ServerCalls
{
    private ServiceAsync serviceAsync;

    public ServerCalls()
    {
	serviceAsync = (ServiceAsync) GWT.create(Service.class);
	ServiceDefTarget serviceDefTarget = (ServiceDefTarget) serviceAsync;
	serviceDefTarget.setServiceEntryPoint("/Service");
    }

    public void initialize()
    {
	serviceAsync.initialize(
            "FOO",
	    new AsyncCallback() {
		public void onSuccess(Object result) {
		    MainPanel.getStatusHTML().setHTML(result.toString());
		}
		public void onFailure(Throwable caught) {
		    MainPanel.getStatusHTML().setHTML(caught.toString());
		}
	    });
    }

    public void doQuery(final MainPanel mainPanel,
			final QueryRequest queryRequest)
    {
	serviceAsync.doQuery(
            queryRequest,
	    new AsyncCallback() {
		public void onSuccess(Object x) {
		    mainPanel.handleQueryResponse((QueryResponse) x);
		}

		public void onFailure(Throwable caught) {
		    Window.alert(".getInitialContents: " + caught);
		}
	    });
    }
}

// End of file.
<commit_msg>["Added temporary callback to avoid race (and fix name type).\n", ""]<commit_after>//
// Created       : 2006 Jun 14 (Wed) 18:29:38 by <NAME>.
// Last Modified : 2006 Aug 12 (Sat) 20:17:10 by <NAME>.
//

package com.differentity.client;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

import com.differentity.client.Main;
import com.differentity.client.SVOPanel;
import com.differentity.client.Service;
import com.differentity.client.ServiceAsync;

public class ServerCalls
{
    private ServiceAsync serviceAsync;

    public ServerCalls()
    {
	serviceAsync = (ServiceAsync) GWT.create(Service.class);
	ServiceDefTarget serviceDefTarget = (ServiceDefTarget) serviceAsync;
	serviceDefTarget.setServiceEntryPoint("/Service");
    }

    public void initialize()
    {
	serviceAsync.initialize(
            "FOO",
	    new AsyncCallback() {
		public void onSuccess(Object result) {
		    Main.makeMainPanel();
		    MainPanel.getStatusHTML().setHTML(result.toString());
		}
		public void onFailure(Throwable caught) {
		    MainPanel.getStatusHTML().setHTML(caught.toString());
		}
	    });
    }

    public void doQuery(final MainPanel mainPanel,
			final QueryRequest queryRequest)
    {
	serviceAsync.doQuery(
            queryRequest,
	    new AsyncCallback() {
		public void onSuccess(Object x) {
		    mainPanel.handleQueryResponse((QueryResponse) x);
		}

		public void onFailure(Throwable caught) {
		    Window.alert(".doQuery: " + caught);
		}
	    });
    }
}

// End of file.

{'fraction_non_alphanumeric': 0.11787526111608475, 'fraction_numerical': 0.01432408236347359, 'mean_word_length': 3.649098474341193, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '534296', 'n_tokens_mistral': 1125, 'n_tokens_neox': 1014, 'n_words': 215}