Renamed Java classes whose names contain 'Gridworks'. Refine is still able to start. But don't check out the code just yet.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1289 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-09-22 17:46:39 +00:00
parent edb23eb263
commit e6bc603a11
36 changed files with 159 additions and 172 deletions

View File

@ -1,4 +1,4 @@
name = broker
description = Google App Engine implementation of Gridworks Broker
module-impl = com.google.gridworks.broker.AppEngineGridworksBrokerImpl
description = Google App Engine implementation of Refine Broker
module-impl = com.google.refine.broker.AppEngineRefineBrokerImpl
templating = false

View File

@ -27,9 +27,9 @@ import org.slf4j.LoggerFactory;
import com.google.appengine.api.datastore.Text;
import com.google.refine.appengine.AppEngineClientConnectionManager;
import com.google.refine.broker.GridworksBroker;
import com.google.refine.broker.RefineBroker;
public class AppEngineGridworksBrokerImpl extends GridworksBroker {
public class AppEngineRefineBrokerImpl extends RefineBroker {
protected static final Logger logger = LoggerFactory.getLogger("gridworks.broker.appengine");

View File

@ -7,10 +7,10 @@
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.testng.remote.RemoteTestNG"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="gridworks-broker"/>
<mapAttribute key="org.testng.eclipse.ALL_CLASS_METHODS">
<mapEntry key="com.google.gridworks.broker.tests.GridworksBrokerTests" value=""/>
<mapEntry key="com.google.gridworks.broker.tests.RefineBrokerTests" value=""/>
</mapAttribute>
<listAttribute key="org.testng.eclipse.CLASS_TEST_LIST">
<listEntry value="com.google.gridworks.broker.tests.GridworksBrokerTests"/>
<listEntry value="com.google.gridworks.broker.tests.RefineBrokerTests"/>
</listAttribute>
<stringAttribute key="org.testng.eclipse.COMPLIANCE_LEVEL" value="JDK"/>
<listAttribute key="org.testng.eclipse.GROUP_LIST"/>

View File

@ -1,4 +1,4 @@
name = broker
description = Local Gridworks Broker
module-impl = com.google.gridworks.broker.GridworksBrokerImpl
description = Local Refine Broker
module-impl = com.google.refine.broker.RefineBrokerImpl
templating = false

View File

@ -43,7 +43,7 @@ import edu.mit.simile.butterfly.ButterflyModuleImpl;
* to extend this abstract class and implement the services that are called via HTTP.
*
*/
public abstract class GridworksBroker extends ButterflyModuleImpl {
public abstract class RefineBroker extends ButterflyModuleImpl {
static final public String GET_STATE = "get_state";
static final public String EXPIRE = "expire";

View File

@ -32,7 +32,7 @@ import com.sleepycat.persist.model.Entity;
import com.sleepycat.persist.model.PrimaryKey;
import com.sleepycat.persist.model.SecondaryKey;
public class GridworksBrokerImpl extends GridworksBroker {
public class RefineBrokerImpl extends RefineBroker {
protected static final Logger logger = LoggerFactory.getLogger("gridworks.broker.local");

View File

@ -1,6 +1,6 @@
package com.google.refine.broker.tests;
import static com.google.refine.broker.GridworksBroker.*;
import static com.google.refine.broker.RefineBroker.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@ -29,10 +29,10 @@ import org.testng.annotations.BeforeSuite;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import com.google.refine.broker.GridworksBroker;
import com.google.refine.broker.GridworksBrokerImpl;
import com.google.refine.broker.RefineBroker;
import com.google.refine.broker.RefineBrokerImpl;
public class GridworksBrokerTests {
public class RefineBrokerTests {
Logger logger;
File data;
@ -53,7 +53,7 @@ public class GridworksBrokerTests {
// ------------------------------------------------------------------------------------
ServletConfig config = null;
GridworksBroker broker = null;
RefineBroker broker = null;
@BeforeTest public void test_init() throws Exception {
logger = LoggerFactory.getLogger(this.getClass());
@ -61,7 +61,7 @@ public class GridworksBrokerTests {
when(config.getInitParameter("gridworks.data")).thenReturn(data.getAbsolutePath());
when(config.getInitParameter("gridworks.development")).thenReturn("true");
broker = new GridworksBrokerImpl();
broker = new RefineBrokerImpl();
broker.init(config);
}
@ -406,15 +406,15 @@ public class GridworksBrokerTests {
Assert.assertEquals(o.get(name), value);
}
private JSONObject success(GridworksBroker broker, HttpServletRequest request, HttpServletResponse response, String service, String... params) throws Exception {
private JSONObject success(RefineBroker broker, HttpServletRequest request, HttpServletResponse response, String service, String... params) throws Exception {
return call(true, broker, request, response, service, params);
}
private JSONObject failure(GridworksBroker broker, HttpServletRequest request, HttpServletResponse response, String service, String... params) throws Exception {
private JSONObject failure(RefineBroker broker, HttpServletRequest request, HttpServletResponse response, String service, String... params) throws Exception {
return call(false, broker, request, response, service, params);
}
private JSONObject call(boolean successful, GridworksBroker broker, HttpServletRequest request, HttpServletResponse response, String service, String... params) throws Exception {
private JSONObject call(boolean successful, RefineBroker broker, HttpServletRequest request, HttpServletResponse response, String service, String... params) throws Exception {
if (params != null) {
for (int i = 0; i < params.length; ) {
String name = params[i++];

View File

@ -622,7 +622,7 @@ run() {
CLASSPATH="$GRIDWORKS_CLASSES_DIR${SEP}$GRIDWORKS_LIB_DIR/*"
RUN_CMD="$JAVA -cp $CLASSPATH $OPTS com.google.refine.Gridworks"
RUN_CMD="$JAVA -cp $CLASSPATH $OPTS com.google.refine.Refine"
#echo "$RUN_CMD"
#echo ""
@ -674,7 +674,7 @@ broker_run() {
CLASSPATH="$GRIDWORKS_CLASSES_DIR${SEP}$GRIDWORKS_LIB_DIR/*"
RUN_CMD="$JAVA -cp $CLASSPATH $OPTS com.google.refine.Gridworks"
RUN_CMD="$JAVA -cp $CLASSPATH $OPTS com.google.refine.Refine"
#echo "$RUN_CMD"
#echo ""

View File

@ -159,7 +159,7 @@ if ""%ACTION%"" == ""run"" goto doRun
:doRun
set CLASSPATH="%GRIDWORKS_CLASSES_DIR%;%GRIDWORKS_LIB_DIR%\*"
"%JAVA_HOME%\bin\java.exe" -cp %CLASSPATH% %OPTS% -Djava.library.path=%GRIDWORKS_LIB_DIR%/native/windows com.google.refine.Gridworks
"%JAVA_HOME%\bin\java.exe" -cp %CLASSPATH% %OPTS% -Djava.library.path=%GRIDWORKS_LIB_DIR%/native/windows com.google.refine.Refine
goto end
:doAnt

View File

@ -21,7 +21,7 @@ import com.google.refine.io.FileProjectManager;
import edu.mit.simile.butterfly.Butterfly;
import edu.mit.simile.butterfly.ButterflyModule;
public class GridworksServlet extends Butterfly {
public class RefineServlet extends Butterfly {
static private final String VERSION = "1.5";
@ -29,7 +29,7 @@ public class GridworksServlet extends Butterfly {
private static final String JAVAX_SERVLET_CONTEXT_TEMPDIR = "javax.servlet.context.tempdir";
static private GridworksServlet s_singleton;
static private RefineServlet s_singleton;
static private File s_dataDir;
static final private Map<String, Command> commands = new HashMap<String, Command>();

View File

@ -16,7 +16,7 @@ import org.json.JSONWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.refine.GridworksServlet;
import com.google.refine.RefineServlet;
import com.google.refine.Jsonizable;
import com.google.refine.ProjectManager;
import com.google.refine.ProjectMetadata;
@ -34,9 +34,9 @@ public abstract class Command {
final static protected Logger logger = LoggerFactory.getLogger("command");
protected GridworksServlet servlet;
protected RefineServlet servlet;
public void init(GridworksServlet servlet) {
public void init(RefineServlet servlet) {
this.servlet = servlet;
}

View File

@ -16,7 +16,7 @@ import java.util.Properties;
import org.json.JSONException;
import org.json.JSONWriter;
import com.google.refine.GridworksServlet;
import com.google.refine.RefineServlet;
import com.google.refine.Jsonizable;
import com.google.refine.ProjectManager;
import com.google.refine.model.Project;
@ -68,7 +68,7 @@ public class History implements Jsonizable {
}
static public void writeOneChange(Writer writer, Change change, Properties options) throws IOException {
writer.write(GridworksServlet.getVersion()); writer.write('\n');
writer.write(RefineServlet.getVersion()); writer.write('\n');
writer.write(change.getClass().getName()); writer.write('\n');
change.save(writer, options);
@ -76,7 +76,7 @@ public class History implements Jsonizable {
@SuppressWarnings("unchecked")
static public Class<? extends Change> getChangeClass(String className) throws ClassNotFoundException {
return (Class<? extends Change>) GridworksServlet.getClass(className);
return (Class<? extends Change>) RefineServlet.getClass(className);
}
protected long _projectID;

View File

@ -19,7 +19,7 @@ import org.json.JSONWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.refine.GridworksServlet;
import com.google.refine.RefineServlet;
import com.google.refine.ProjectManager;
import com.google.refine.ProjectMetadata;
import com.google.refine.history.History;
@ -122,7 +122,7 @@ public class Project {
}
protected void saveToWriter(Writer writer, Properties options) throws IOException {
writer.write(GridworksServlet.getVersion()); writer.write('\n');
writer.write(RefineServlet.getVersion()); writer.write('\n');
writer.write("columnModel=\n"); columnModel.save(writer, options);
writer.write("history=\n"); history.save(writer, options);

View File

@ -11,7 +11,7 @@ import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONWriter;
import com.google.refine.GridworksServlet;
import com.google.refine.RefineServlet;
import com.google.refine.Jsonizable;
public class PreferenceStore implements Jsonizable {
@ -75,7 +75,7 @@ public class PreferenceStore implements Jsonizable {
try {
JSONObject obj2 = (JSONObject) o;
String className = obj2.getString("class");
Class<?> klass = GridworksServlet.getClass(className);
Class<?> klass = RefineServlet.getClass(className);
Method method = klass.getMethod("load", JSONObject.class);
return method.invoke(null, obj2);

View File

@ -27,7 +27,7 @@ import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.google.refine.GridworksServlet;
import com.google.refine.RefineServlet;
import com.google.refine.ProjectManager;
import com.google.refine.oauth.Credentials;
import com.google.refine.oauth.OAuthUtilities;
@ -60,7 +60,7 @@ public class FreebaseUtils {
OAuthConsumer consumer = OAuthUtilities.getConsumer(credentials, provider);
HttpGet httpRequest = new HttpGet(getUserInfoURL(provider.getHost()));
httpRequest.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "Gridworks " + GridworksServlet.getVersion());
httpRequest.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "Gridworks " + RefineServlet.getVersion());
// this is required by the Metaweb API to avoid XSS
httpRequest.setHeader("X-Requested-With", "1");
@ -103,7 +103,7 @@ public class FreebaseUtils {
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formparams, "UTF-8");
HttpPost httpRequest = new HttpPost(getMQLReadURL(provider.getHost()));
httpRequest.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "Gridworks " + GridworksServlet.getVersion());
httpRequest.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "Gridworks " + RefineServlet.getVersion());
httpRequest.setEntity(entity);
// this is required by the Metaweb API to avoid XSS
@ -129,7 +129,7 @@ public class FreebaseUtils {
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formparams, "UTF-8");
HttpPost httpRequest = new HttpPost(getMQLWriteURL(provider.getHost()));
httpRequest.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "Gridworks " + GridworksServlet.getVersion());
httpRequest.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "Gridworks " + RefineServlet.getVersion());
httpRequest.setEntity(entity);
// this is required by the Metaweb API to avoid XSS
@ -188,7 +188,7 @@ public class FreebaseUtils {
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formparams, "UTF-8");
HttpPost httpRequest = new HttpPost(getFreeQUrl());
httpRequest.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "Gridworks " + GridworksServlet.getVersion());
httpRequest.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "Gridworks " + RefineServlet.getVersion());
httpRequest.setEntity(entity);
HttpPost surrogateRequest = new HttpPost(getUserInfoURL(FREEBASE_HOST));

View File

@ -15,7 +15,7 @@ import java.util.Map.Entry;
import org.json.JSONException;
import org.json.JSONWriter;
import com.google.refine.GridworksServlet;
import com.google.refine.RefineServlet;
import com.google.refine.Jsonizable;
import com.google.refine.model.Recon;
import com.google.refine.model.ReconCandidate;
@ -62,7 +62,7 @@ public class Pool implements Jsonizable {
}
public void save(Writer writer) throws IOException {
writer.write(GridworksServlet.getVersion()); writer.write('\n');
writer.write(RefineServlet.getVersion()); writer.write('\n');
Properties options = new Properties();
options.setProperty("mode", "save");

View File

@ -23,7 +23,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.never;
public class ProjectManagerTests extends GridworksTest {
public class ProjectManagerTests extends RefineTest {
ProjectManagerStub pm;
ProjectManagerStub SUT;
Project project;

View File

@ -6,14 +6,14 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.google.refine.GridworksServlet;
import com.google.refine.RefineServlet;
import com.google.refine.commands.Command;
/**
* Exposes protected methods of com.google.refine.GridworksServlet as public for unit testing
* Exposes protected methods of com.google.refine.RefineServlet as public for unit testing
*
*/
public class GridworksServletStub extends GridworksServlet {
public class RefineServletStub extends RefineServlet {
//requirement of extending HttpServlet, not required for testing
private static final long serialVersionUID = 1L;

View File

@ -20,7 +20,7 @@ import org.testng.annotations.Test;
import com.google.refine.commands.Command;
public class GridworksServletTests extends GridworksTest {
public class RefineServletTests extends RefineTest {
@BeforeTest
public void init() {
@ -28,7 +28,7 @@ public class GridworksServletTests extends GridworksTest {
}
//System under test
GridworksServletStub SUT = null;
RefineServletStub SUT = null;
//variables
final static private String TEST_COMMAND_NAME = "test-command";
@ -50,7 +50,7 @@ public class GridworksServletTests extends GridworksTest {
response = mock(HttpServletResponse.class);
command = mock(Command.class);
SUT = new GridworksServletStub();
SUT = new RefineServletStub();
SUT.insertCommand(TEST_COMMAND_NAME,command); //inject mock into command container
}
@ -65,11 +65,11 @@ public class GridworksServletTests extends GridworksTest {
}
//-------------------AutoSaveTimerTask tests-----------
//TODO would need to mock Timer and inject it into GridworksServlet. Also need to deal with ProjectManager.singleton
//TODO would need to mock Timer and inject it into RefineServlet. Also need to deal with ProjectManager.singleton
//-------------------init tests------------------------
//TODO need to stub super.init(), mock Timer and inject it into GridworksServlet
//TODO need to stub super.init(), mock Timer and inject it into RefineServlet
//-------------------destroy tests---------------------
//TODO need to mock Timer and inject it into GridworksServlet. Also need to deal with ProjectManager.singleton
//TODO need to mock Timer and inject it into RefineServlet. Also need to deal with ProjectManager.singleton
//--------------------doGet tests----------------------
@Test

View File

@ -9,7 +9,7 @@ import com.google.refine.model.Column;
import com.google.refine.model.Project;
import com.google.refine.model.Row;
public class GridworksTest {
public class RefineTest {
protected Logger logger;

View File

@ -20,9 +20,9 @@ import org.testng.annotations.Test;
import com.google.refine.ProjectManager;
import com.google.refine.browsing.Engine;
import com.google.refine.model.Project;
import com.google.refine.tests.GridworksTest;
import com.google.refine.tests.RefineTest;
public class CommandTests extends GridworksTest {
public class CommandTests extends RefineTest {
@BeforeTest
public void init() {

View File

@ -24,9 +24,9 @@ import com.google.refine.ProjectManager;
import com.google.refine.commands.history.CancelProcessesCommand;
import com.google.refine.model.Project;
import com.google.refine.process.ProcessManager;
import com.google.refine.tests.GridworksTest;
import com.google.refine.tests.RefineTest;
public class CancelProcessesCommandTests extends GridworksTest {
public class CancelProcessesCommandTests extends RefineTest {
@BeforeTest
public void init() {

View File

@ -23,9 +23,9 @@ import com.google.refine.model.Column;
import com.google.refine.model.ModelException;
import com.google.refine.model.Project;
import com.google.refine.model.Row;
import com.google.refine.tests.GridworksTest;
import com.google.refine.tests.RefineTest;
public class CsvExporterTests extends GridworksTest {
public class CsvExporterTests extends RefineTest {
@BeforeTest
public void init() {

View File

@ -23,9 +23,9 @@ import com.google.refine.model.Column;
import com.google.refine.model.ModelException;
import com.google.refine.model.Project;
import com.google.refine.model.Row;
import com.google.refine.tests.GridworksTest;
import com.google.refine.tests.RefineTest;
public class TsvExporterTests extends GridworksTest {
public class TsvExporterTests extends RefineTest {
@BeforeTest
public void init() {

View File

@ -18,10 +18,10 @@ import com.google.refine.ProjectMetadata;
import com.google.refine.history.History;
import com.google.refine.history.HistoryEntry;
import com.google.refine.model.Project;
import com.google.refine.tests.GridworksTest;
import com.google.refine.tests.RefineTest;
public class HistoryTests extends GridworksTest {
public class HistoryTests extends RefineTest {
@BeforeTest
public void init() {
logger = LoggerFactory.getLogger(this.getClass());

View File

@ -18,9 +18,9 @@ import com.google.refine.importers.ImporterUtilities;
import com.google.refine.model.Cell;
import com.google.refine.model.Project;
import com.google.refine.model.Row;
import com.google.refine.tests.GridworksTest;
import com.google.refine.tests.RefineTest;
public class ImporterUtilitiesTests extends GridworksTest {
public class ImporterUtilitiesTests extends RefineTest {
@BeforeTest
public void init() {

View File

@ -12,10 +12,10 @@ import org.testng.annotations.Test;
import com.google.refine.ProjectMetadata;
import com.google.refine.importers.RdfTripleImporter;
import com.google.refine.model.Project;
import com.google.refine.tests.GridworksTest;
import com.google.refine.tests.RefineTest;
public class RdfTripleImporterTests extends GridworksTest {
public class RdfTripleImporterTests extends RefineTest {
@BeforeTest
public void init() {

View File

@ -21,9 +21,9 @@ import org.testng.annotations.Test;
import com.google.refine.ProjectMetadata;
import com.google.refine.importers.TsvCsvImporter;
import com.google.refine.model.Project;
import com.google.refine.tests.GridworksTest;
import com.google.refine.tests.RefineTest;
public class TsvCsvImporterTests extends GridworksTest {
public class TsvCsvImporterTests extends RefineTest {
@BeforeTest
public void init() {

View File

@ -23,10 +23,10 @@ import com.google.refine.importers.XmlImportUtilities.ImportColumnGroup;
import com.google.refine.importers.XmlImportUtilities.ImportRecord;
import com.google.refine.model.Project;
import com.google.refine.model.Row;
import com.google.refine.tests.GridworksTest;
import com.google.refine.tests.RefineTest;
public class XmlImportUtilitiesTests extends GridworksTest {
public class XmlImportUtilitiesTests extends RefineTest {
@BeforeTest
public void init() {

View File

@ -18,10 +18,10 @@ import com.google.refine.ProjectMetadata;
import com.google.refine.importers.XmlImporter;
import com.google.refine.model.Project;
import com.google.refine.model.Row;
import com.google.refine.tests.GridworksTest;
import com.google.refine.tests.RefineTest;
public class XmlImporterTests extends GridworksTest {
public class XmlImporterTests extends RefineTest {
@BeforeTest
public void init() {

View File

@ -7,10 +7,10 @@ import org.testng.Assert;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import com.google.refine.tests.GridworksTest;
import com.google.refine.tests.RefineTest;
import com.google.refine.util.ParsingUtilities;
public class ParsingUtilitiesTests extends GridworksTest {
public class ParsingUtilitiesTests extends RefineTest {
@BeforeTest
public void init() {

View File

@ -20,7 +20,7 @@
<servlet>
<servlet-name>gridworks</servlet-name>
<servlet-class>com.google.refine.GridworksServlet</servlet-class>
<servlet-class>com.google.refine.RefineServlet</servlet-class>
</servlet>
<servlet-mapping>

View File

@ -12,94 +12,94 @@ var templatedFiles = {
};
function registerCommands() {
var GS = Packages.com.google.refine.GridworksServlet;
var RS = Packages.com.google.refine.RefineServlet;
GS.registerCommand(module, "create-project-from-upload", new Packages.com.google.refine.commands.project.CreateProjectCommand());
GS.registerCommand(module, "import-project", new Packages.com.google.refine.commands.project.ImportProjectCommand());
GS.registerCommand(module, "export-project", new Packages.com.google.refine.commands.project.ExportProjectCommand());
GS.registerCommand(module, "export-rows", new Packages.com.google.refine.commands.project.ExportRowsCommand());
RS.registerCommand(module, "create-project-from-upload", new Packages.com.google.refine.commands.project.CreateProjectCommand());
RS.registerCommand(module, "import-project", new Packages.com.google.refine.commands.project.ImportProjectCommand());
RS.registerCommand(module, "export-project", new Packages.com.google.refine.commands.project.ExportProjectCommand());
RS.registerCommand(module, "export-rows", new Packages.com.google.refine.commands.project.ExportRowsCommand());
GS.registerCommand(module, "get-project-metadata", new Packages.com.google.refine.commands.project.GetProjectMetadataCommand());
GS.registerCommand(module, "get-all-project-metadata", new Packages.com.google.refine.commands.workspace.GetAllProjectMetadataCommand());
RS.registerCommand(module, "get-project-metadata", new Packages.com.google.refine.commands.project.GetProjectMetadataCommand());
RS.registerCommand(module, "get-all-project-metadata", new Packages.com.google.refine.commands.workspace.GetAllProjectMetadataCommand());
GS.registerCommand(module, "delete-project", new Packages.com.google.refine.commands.project.DeleteProjectCommand());
GS.registerCommand(module, "rename-project", new Packages.com.google.refine.commands.project.RenameProjectCommand());
RS.registerCommand(module, "delete-project", new Packages.com.google.refine.commands.project.DeleteProjectCommand());
RS.registerCommand(module, "rename-project", new Packages.com.google.refine.commands.project.RenameProjectCommand());
GS.registerCommand(module, "get-models", new Packages.com.google.refine.commands.project.GetModelsCommand());
GS.registerCommand(module, "get-rows", new Packages.com.google.refine.commands.row.GetRowsCommand());
GS.registerCommand(module, "get-processes", new Packages.com.google.refine.commands.history.GetProcessesCommand());
GS.registerCommand(module, "get-history", new Packages.com.google.refine.commands.history.GetHistoryCommand());
GS.registerCommand(module, "get-operations", new Packages.com.google.refine.commands.history.GetOperationsCommand());
GS.registerCommand(module, "get-columns-info", new Packages.com.google.refine.commands.column.GetColumnsInfoCommand());
GS.registerCommand(module, "get-scatterplot", new Packages.com.google.refine.commands.browsing.GetScatterplotCommand());
RS.registerCommand(module, "get-models", new Packages.com.google.refine.commands.project.GetModelsCommand());
RS.registerCommand(module, "get-rows", new Packages.com.google.refine.commands.row.GetRowsCommand());
RS.registerCommand(module, "get-processes", new Packages.com.google.refine.commands.history.GetProcessesCommand());
RS.registerCommand(module, "get-history", new Packages.com.google.refine.commands.history.GetHistoryCommand());
RS.registerCommand(module, "get-operations", new Packages.com.google.refine.commands.history.GetOperationsCommand());
RS.registerCommand(module, "get-columns-info", new Packages.com.google.refine.commands.column.GetColumnsInfoCommand());
RS.registerCommand(module, "get-scatterplot", new Packages.com.google.refine.commands.browsing.GetScatterplotCommand());
GS.registerCommand(module, "undo-redo", new Packages.com.google.refine.commands.history.UndoRedoCommand());
GS.registerCommand(module, "apply-operations", new Packages.com.google.refine.commands.history.ApplyOperationsCommand());
GS.registerCommand(module, "cancel-processes", new Packages.com.google.refine.commands.history.CancelProcessesCommand());
RS.registerCommand(module, "undo-redo", new Packages.com.google.refine.commands.history.UndoRedoCommand());
RS.registerCommand(module, "apply-operations", new Packages.com.google.refine.commands.history.ApplyOperationsCommand());
RS.registerCommand(module, "cancel-processes", new Packages.com.google.refine.commands.history.CancelProcessesCommand());
GS.registerCommand(module, "compute-facets", new Packages.com.google.refine.commands.browsing.ComputeFacetsCommand());
GS.registerCommand(module, "compute-clusters", new Packages.com.google.refine.commands.browsing.ComputeClustersCommand());
RS.registerCommand(module, "compute-facets", new Packages.com.google.refine.commands.browsing.ComputeFacetsCommand());
RS.registerCommand(module, "compute-clusters", new Packages.com.google.refine.commands.browsing.ComputeClustersCommand());
GS.registerCommand(module, "edit-one-cell", new Packages.com.google.refine.commands.cell.EditOneCellCommand());
GS.registerCommand(module, "text-transform", new Packages.com.google.refine.commands.cell.TextTransformCommand());
GS.registerCommand(module, "mass-edit", new Packages.com.google.refine.commands.cell.MassEditCommand());
GS.registerCommand(module, "join-multi-value-cells", new Packages.com.google.refine.commands.cell.JoinMultiValueCellsCommand());
GS.registerCommand(module, "split-multi-value-cells", new Packages.com.google.refine.commands.cell.SplitMultiValueCellsCommand());
GS.registerCommand(module, "fill-down", new Packages.com.google.refine.commands.cell.FillDownCommand());
GS.registerCommand(module, "blank-down", new Packages.com.google.refine.commands.cell.BlankDownCommand());
GS.registerCommand(module, "transpose-columns-into-rows", new Packages.com.google.refine.commands.cell.TransposeColumnsIntoRowsCommand());
GS.registerCommand(module, "transpose-rows-into-columns", new Packages.com.google.refine.commands.cell.TransposeRowsIntoColumnsCommand());
RS.registerCommand(module, "edit-one-cell", new Packages.com.google.refine.commands.cell.EditOneCellCommand());
RS.registerCommand(module, "text-transform", new Packages.com.google.refine.commands.cell.TextTransformCommand());
RS.registerCommand(module, "mass-edit", new Packages.com.google.refine.commands.cell.MassEditCommand());
RS.registerCommand(module, "join-multi-value-cells", new Packages.com.google.refine.commands.cell.JoinMultiValueCellsCommand());
RS.registerCommand(module, "split-multi-value-cells", new Packages.com.google.refine.commands.cell.SplitMultiValueCellsCommand());
RS.registerCommand(module, "fill-down", new Packages.com.google.refine.commands.cell.FillDownCommand());
RS.registerCommand(module, "blank-down", new Packages.com.google.refine.commands.cell.BlankDownCommand());
RS.registerCommand(module, "transpose-columns-into-rows", new Packages.com.google.refine.commands.cell.TransposeColumnsIntoRowsCommand());
RS.registerCommand(module, "transpose-rows-into-columns", new Packages.com.google.refine.commands.cell.TransposeRowsIntoColumnsCommand());
GS.registerCommand(module, "add-column", new Packages.com.google.refine.commands.column.AddColumnCommand());
GS.registerCommand(module, "remove-column", new Packages.com.google.refine.commands.column.RemoveColumnCommand());
GS.registerCommand(module, "rename-column", new Packages.com.google.refine.commands.column.RenameColumnCommand());
GS.registerCommand(module, "move-column", new Packages.com.google.refine.commands.column.MoveColumnCommand());
GS.registerCommand(module, "split-column", new Packages.com.google.refine.commands.column.SplitColumnCommand());
GS.registerCommand(module, "extend-data", new Packages.com.google.refine.commands.column.ExtendDataCommand());
GS.registerCommand(module, "add-column-by-fetching-urls", new Packages.com.google.refine.commands.column.AddColumnByFetchingURLsCommand());
GS.registerCommand(module, "reorder-columns", new Packages.com.google.refine.commands.column.ReorderColumnsCommand());
RS.registerCommand(module, "add-column", new Packages.com.google.refine.commands.column.AddColumnCommand());
RS.registerCommand(module, "remove-column", new Packages.com.google.refine.commands.column.RemoveColumnCommand());
RS.registerCommand(module, "rename-column", new Packages.com.google.refine.commands.column.RenameColumnCommand());
RS.registerCommand(module, "move-column", new Packages.com.google.refine.commands.column.MoveColumnCommand());
RS.registerCommand(module, "split-column", new Packages.com.google.refine.commands.column.SplitColumnCommand());
RS.registerCommand(module, "extend-data", new Packages.com.google.refine.commands.column.ExtendDataCommand());
RS.registerCommand(module, "add-column-by-fetching-urls", new Packages.com.google.refine.commands.column.AddColumnByFetchingURLsCommand());
RS.registerCommand(module, "reorder-columns", new Packages.com.google.refine.commands.column.ReorderColumnsCommand());
GS.registerCommand(module, "denormalize", new Packages.com.google.refine.commands.row.DenormalizeCommand());
RS.registerCommand(module, "denormalize", new Packages.com.google.refine.commands.row.DenormalizeCommand());
GS.registerCommand(module, "reconcile", new Packages.com.google.refine.commands.recon.ReconcileCommand());
GS.registerCommand(module, "recon-match-best-candidates", new Packages.com.google.refine.commands.recon.ReconMatchBestCandidatesCommand());
GS.registerCommand(module, "recon-mark-new-topics", new Packages.com.google.refine.commands.recon.ReconMarkNewTopicsCommand());
GS.registerCommand(module, "recon-discard-judgments", new Packages.com.google.refine.commands.recon.ReconDiscardJudgmentsCommand());
GS.registerCommand(module, "recon-match-specific-topic-to-cells", new Packages.com.google.refine.commands.recon.ReconMatchSpecificTopicCommand());
GS.registerCommand(module, "recon-judge-one-cell", new Packages.com.google.refine.commands.recon.ReconJudgeOneCellCommand());
GS.registerCommand(module, "recon-judge-similar-cells", new Packages.com.google.refine.commands.recon.ReconJudgeSimilarCellsCommand());
RS.registerCommand(module, "reconcile", new Packages.com.google.refine.commands.recon.ReconcileCommand());
RS.registerCommand(module, "recon-match-best-candidates", new Packages.com.google.refine.commands.recon.ReconMatchBestCandidatesCommand());
RS.registerCommand(module, "recon-mark-new-topics", new Packages.com.google.refine.commands.recon.ReconMarkNewTopicsCommand());
RS.registerCommand(module, "recon-discard-judgments", new Packages.com.google.refine.commands.recon.ReconDiscardJudgmentsCommand());
RS.registerCommand(module, "recon-match-specific-topic-to-cells", new Packages.com.google.refine.commands.recon.ReconMatchSpecificTopicCommand());
RS.registerCommand(module, "recon-judge-one-cell", new Packages.com.google.refine.commands.recon.ReconJudgeOneCellCommand());
RS.registerCommand(module, "recon-judge-similar-cells", new Packages.com.google.refine.commands.recon.ReconJudgeSimilarCellsCommand());
GS.registerCommand(module, "annotate-one-row", new Packages.com.google.refine.commands.row.AnnotateOneRowCommand());
GS.registerCommand(module, "annotate-rows", new Packages.com.google.refine.commands.row.AnnotateRowsCommand());
GS.registerCommand(module, "remove-rows", new Packages.com.google.refine.commands.row.RemoveRowsCommand());
GS.registerCommand(module, "reorder-rows", new Packages.com.google.refine.commands.row.ReorderRowsCommand());
RS.registerCommand(module, "annotate-one-row", new Packages.com.google.refine.commands.row.AnnotateOneRowCommand());
RS.registerCommand(module, "annotate-rows", new Packages.com.google.refine.commands.row.AnnotateRowsCommand());
RS.registerCommand(module, "remove-rows", new Packages.com.google.refine.commands.row.RemoveRowsCommand());
RS.registerCommand(module, "reorder-rows", new Packages.com.google.refine.commands.row.ReorderRowsCommand());
GS.registerCommand(module, "save-protograph", new Packages.com.google.refine.commands.freebase.SaveProtographCommand());
RS.registerCommand(module, "save-protograph", new Packages.com.google.refine.commands.freebase.SaveProtographCommand());
GS.registerCommand(module, "get-expression-language-info", new Packages.com.google.refine.commands.expr.GetExpressionLanguageInfoCommand());
GS.registerCommand(module, "get-expression-history", new Packages.com.google.refine.commands.expr.GetExpressionHistoryCommand());
GS.registerCommand(module, "log-expression", new Packages.com.google.refine.commands.expr.LogExpressionCommand());
RS.registerCommand(module, "get-expression-language-info", new Packages.com.google.refine.commands.expr.GetExpressionLanguageInfoCommand());
RS.registerCommand(module, "get-expression-history", new Packages.com.google.refine.commands.expr.GetExpressionHistoryCommand());
RS.registerCommand(module, "log-expression", new Packages.com.google.refine.commands.expr.LogExpressionCommand());
GS.registerCommand(module, "preview-expression", new Packages.com.google.refine.commands.expr.PreviewExpressionCommand());
GS.registerCommand(module, "preview-extend-data", new Packages.com.google.refine.commands.column.PreviewExtendDataCommand());
GS.registerCommand(module, "preview-protograph", new Packages.com.google.refine.commands.freebase.PreviewProtographCommand());
RS.registerCommand(module, "preview-expression", new Packages.com.google.refine.commands.expr.PreviewExpressionCommand());
RS.registerCommand(module, "preview-extend-data", new Packages.com.google.refine.commands.column.PreviewExtendDataCommand());
RS.registerCommand(module, "preview-protograph", new Packages.com.google.refine.commands.freebase.PreviewProtographCommand());
GS.registerCommand(module, "guess-types-of-column", new Packages.com.google.refine.commands.freebase.GuessTypesOfColumnCommand());
RS.registerCommand(module, "guess-types-of-column", new Packages.com.google.refine.commands.freebase.GuessTypesOfColumnCommand());
GS.registerCommand(module, "check-authorization", new Packages.com.google.refine.commands.auth.CheckAuthorizationCommand());
GS.registerCommand(module, "authorize", new Packages.com.google.refine.commands.auth.AuthorizeCommand());
GS.registerCommand(module, "deauthorize", new Packages.com.google.refine.commands.auth.DeAuthorizeCommand());
GS.registerCommand(module, "user-badges", new Packages.com.google.refine.commands.auth.GetUserBadgesCommand());
RS.registerCommand(module, "check-authorization", new Packages.com.google.refine.commands.auth.CheckAuthorizationCommand());
RS.registerCommand(module, "authorize", new Packages.com.google.refine.commands.auth.AuthorizeCommand());
RS.registerCommand(module, "deauthorize", new Packages.com.google.refine.commands.auth.DeAuthorizeCommand());
RS.registerCommand(module, "user-badges", new Packages.com.google.refine.commands.auth.GetUserBadgesCommand());
GS.registerCommand(module, "upload-data", new Packages.com.google.refine.commands.freebase.UploadDataCommand());
GS.registerCommand(module, "import-qa-data", new Packages.com.google.refine.commands.freebase.ImportQADataCommand());
GS.registerCommand(module, "mqlread", new Packages.com.google.refine.commands.freebase.MQLReadCommand());
GS.registerCommand(module, "mqlwrite", new Packages.com.google.refine.commands.freebase.MQLWriteCommand());
RS.registerCommand(module, "upload-data", new Packages.com.google.refine.commands.freebase.UploadDataCommand());
RS.registerCommand(module, "import-qa-data", new Packages.com.google.refine.commands.freebase.ImportQADataCommand());
RS.registerCommand(module, "mqlread", new Packages.com.google.refine.commands.freebase.MQLReadCommand());
RS.registerCommand(module, "mqlwrite", new Packages.com.google.refine.commands.freebase.MQLWriteCommand());
GS.registerCommand(module, "get-preference", new Packages.com.google.refine.commands.GetPreferenceCommand());
GS.registerCommand(module, "get-all-preferences", new Packages.com.google.refine.commands.GetAllPreferencesCommand());
GS.registerCommand(module, "set-preference", new Packages.com.google.refine.commands.SetPreferenceCommand());
GS.registerCommand(module, "open-workspace-dir", new Packages.com.google.refine.commands.OpenWorkspaceDirCommand());
RS.registerCommand(module, "get-preference", new Packages.com.google.refine.commands.GetPreferenceCommand());
RS.registerCommand(module, "get-all-preferences", new Packages.com.google.refine.commands.GetAllPreferencesCommand());
RS.registerCommand(module, "set-preference", new Packages.com.google.refine.commands.SetPreferenceCommand());
RS.registerCommand(module, "open-workspace-dir", new Packages.com.google.refine.commands.OpenWorkspaceDirCommand());
}
function registerOperations() {

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/grefine-server/src/com/google/refine/Gridworks.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.refine.Gridworks"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="grefine-server"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dgridworks.autoreloading=true"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:gridworks}"/>
</launchConfiguration>

View File

@ -72,7 +72,7 @@ javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=com.google.gridworks.Gridworks
main.class=com.google.refine.Refine
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
platform.active=default_platform

View File

@ -35,10 +35,10 @@ import com.codeberry.jdatapath.JDataPathSystem;
import com.google.util.threads.ThreadPoolExecutorAdapter;
/**
* Main class for Gridworks server application. Starts an instance of the
* Jetty HTTP server / servlet container (inner class Gridworks Server).
* Main class for Refine server application. Starts an instance of the
* Jetty HTTP server / servlet container (inner class Refine Server).
*/
public class Gridworks {
public class Refine {
static private final String DEFAULT_HOST = "127.0.0.1";
static private final int DEFAULT_PORT = 3333;
@ -72,23 +72,23 @@ public class Gridworks {
port = Configurations.getInteger("gridworks.port",DEFAULT_PORT);
host = Configurations.get("gridworks.host",DEFAULT_HOST);
Gridworks gridworks = new Gridworks();
Refine gridworks = new Refine();
gridworks.init(args);
}
public void init(String[] args) throws Exception {
GridworksServer server = new GridworksServer();
RefineServer server = new RefineServer();
server.init(host,port);
boolean headless = Configurations.getBoolean("gridworks.headless",false);
if (!headless) {
try {
GridworksClient client = new GridworksClient();
RefineClient client = new RefineClient();
client.init(host,port);
} catch (Exception e) {
logger.warn("Sorry, some error prevented us from launching the browser for you.\n\n Point your browser to http://" + host + ":" + port + "/ to start using Gridworks.");
logger.warn("Sorry, some error prevented us from launching the browser for you.\n\n Point your browser to http://" + host + ":" + port + "/ to start using Refine.");
}
}
@ -101,9 +101,9 @@ public class Gridworks {
}
}
/* -------------- Gridworks Server ----------------- */
/* -------------- Refine Server ----------------- */
class GridworksServer extends Server {
class RefineServer extends Server {
final static Logger logger = LoggerFactory.getLogger("gridworks_server");
@ -352,9 +352,9 @@ class GridworksServer extends Server {
}
/* -------------- Gridworks Client ----------------- */
/* -------------- Refine Client ----------------- */
class GridworksClient extends JFrame implements ActionListener {
class RefineClient extends JFrame implements ActionListener {
private static final long serialVersionUID = 7886547342175227132L;
@ -374,7 +374,7 @@ class GridworksClient extends JFrame implements ActionListener {
JMenuBar mb = new JMenuBar();
JMenu m = new JMenu("Open");
JMenuItem mi = new JMenuItem("Open New Gridworks Window...");
JMenuItem mi = new JMenuItem("Open New Refine Window...");
mi.addActionListener(this);
m.add(mi);
mb.add(m);
@ -387,7 +387,7 @@ class GridworksClient extends JFrame implements ActionListener {
// FIXME(SM): this part below doesn't seem to work, I get a NPE but I have *no* idea why, suggestions?
// PopupMenu dockMenu = new PopupMenu("dock");
// MenuItem mmi = new MenuItem("Open new Gridworks Window...");
// MenuItem mmi = new MenuItem("Open new Refine Window...");
// mmi.addActionListener(this);
// dockMenu.add(mmi);
// this.add(dockMenu);