diff --git a/extensions/rdf-exporter/module/MOD-INF/controller.js b/extensions/rdf-exporter/module/MOD-INF/controller.js
index 5f76e4287..f81b3a7d7 100755
--- a/extensions/rdf-exporter/module/MOD-INF/controller.js
+++ b/extensions/rdf-exporter/module/MOD-INF/controller.js
@@ -40,13 +40,13 @@ function init() {
* Commands
*/
var GridworksServlet = Packages.com.google.gridworks.GridworksServlet;
- GridworksServlet.registerCommand("save-rdf-schema", new SaveRdfSchemaCommand());
- GridworksServlet.registerCommand("preview-rdf",new PreviewRdfCommand());
- GridworksServlet.registerCommand("save-baseURI",new SaveBaseURI());
- GridworksServlet.registerCommand("suggest-term",new SuggestTermCommand());
- GridworksServlet.registerCommand("import-vocabulary",new ImportVocabularyCommand());
- GridworksServlet.registerCommand("list-vocabularies",new ListVocabulariesCommand());
- GridworksServlet.registerCommand("delete-vocabulary",new DeleteVocabularyCommand());
+ GridworksServlet.registerCommand(module, "save-rdf-schema", new SaveRdfSchemaCommand());
+ GridworksServlet.registerCommand(module, "preview-rdf", new PreviewRdfCommand());
+ GridworksServlet.registerCommand(module, "save-baseURI", new SaveBaseURI());
+ GridworksServlet.registerCommand(module, "suggest-term", new SuggestTermCommand());
+ GridworksServlet.registerCommand(module, "import-vocabulary", new ImportVocabularyCommand());
+ GridworksServlet.registerCommand(module, "list-vocabularies", new ListVocabulariesCommand());
+ GridworksServlet.registerCommand(module, "delete-vocabulary", new DeleteVocabularyCommand());
/*
* Client-side Resources
diff --git a/extensions/rdf-exporter/module/scripts/menu-bar-extensions.js b/extensions/rdf-exporter/module/scripts/menu-bar-extensions.js
index b487965a1..92d5a9f35 100644
--- a/extensions/rdf-exporter/module/scripts/menu-bar-extensions.js
+++ b/extensions/rdf-exporter/module/scripts/menu-bar-extensions.js
@@ -46,7 +46,7 @@ RdfExporterMenuBar.rdfExportRows = function(format, ext) {
$(form)
.css("display", "none")
.attr("method", "post")
- .attr("action", "/command/export-rows/" + name + "." + ext)
+ .attr("action", "/command/core/export-rows/" + name + "." + ext)
.attr("target", "gridworks-export");
$('')
diff --git a/extensions/rdf-exporter/module/scripts/rdf-schema-alignment-ui-node.js b/extensions/rdf-exporter/module/scripts/rdf-schema-alignment-ui-node.js
index dc3cc7260..76e08ade9 100755
--- a/extensions/rdf-exporter/module/scripts/rdf-schema-alignment-ui-node.js
+++ b/extensions/rdf-exporter/module/scripts/rdf-schema-alignment-ui-node.js
@@ -808,7 +808,7 @@ RdfSchemaAlignmentDialog.RdfResourceDialog = function(elmt,lookFor,onDone,defaul
});*/
//Autocomplete
/*elmts.newResourceUri.autoComplete({
- script:'/command/search-vocabularies?type=' + lookFor + '&',
+ script:'/command/rdf-exporter-extension/search-vocabularies?type=' + lookFor + '&',
varname:'input',
json:true,
shownoresults:true,
diff --git a/extensions/rdf-exporter/module/scripts/rdf-schema-alignment.js b/extensions/rdf-exporter/module/scripts/rdf-schema-alignment.js
index d3317f4e9..b029c5709 100755
--- a/extensions/rdf-exporter/module/scripts/rdf-schema-alignment.js
+++ b/extensions/rdf-exporter/module/scripts/rdf-schema-alignment.js
@@ -41,6 +41,7 @@ RdfSchemaAlignmentDialog.prototype._constructFooter = function(footer) {
$('').html(" OK ").click(function() {
var schema = self.getJSON();
Gridworks.postProcess(
+ "rdf-exporter-extension",
"save-rdf-schema",
{},
{ schema: JSON.stringify(schema) },
@@ -100,7 +101,7 @@ RdfSchemaAlignmentDialog.prototype._previewRdf = function(){
var schema = this.getJSON();
self._previewPane.empty().html('');
$.post(
- "/command/preview-rdf?" + $.param({ project: theProject.id }),
+ "/command/rdf-exporter-extension/preview-rdf?" + $.param({ project: theProject.id }),
{ schema: JSON.stringify(schema), engine: JSON.stringify(ui.browsingEngine.getJSON()) },
function(data) {
self._previewPane.empty();
@@ -160,7 +161,7 @@ RdfSchemaAlignmentDialog.prototype._listVocabularies = function(){
self._renderVocabularyFooter();
- $.get("/command/list-vocabularies",{},function(o){
+ $.get("/command/rdf-exporter-extension/list-vocabularies",{},function(o){
var vocab_table = $('
').width('100%').addClass('data-table')[0];
var tr = vocab_table.insertRow(vocab_table.rows.length);
$(tr).addClass('');
@@ -212,7 +213,7 @@ RdfSchemaAlignmentDialog.prototype._renderVocabularyFooter = function(){
return ;
}
var dismissBusy = DialogSystem.showBusy('Importing vocabulary from: ' + url);
- $.get("/command/import-vocabulary",{prefix:prefix,namespace:namespace,url:url},function(data){
+ $.get("/command/rdf-exporter-extension/import-vocabulary",{prefix:prefix,namespace:namespace,url:url},function(data){
dismissBusy();
if (data.code === "error"){
alert('Error:' + data.message)
@@ -228,7 +229,7 @@ RdfSchemaAlignmentDialog.prototype._renderVocabularyFooter = function(){
RdfSchemaAlignmentDialog.prototype._deleteVocabulary = function(uri){
var self = this;
var dismissBusy = DialogSystem.showBusy('Deleteing vocabulary: ' + uri);
- $.post("/command/delete-vocabulary",{uri:uri},function(data){
+ $.post("/command/rdf-exporter-extension/delete-vocabulary",{uri:uri},function(data){
dismissBusy();
if (data.code === "error"){
alert('Error:' + data.message)
@@ -289,7 +290,7 @@ RdfSchemaAlignmentDialog.prototype._editBaseUri = function(src){
RdfSchemaAlignmentDialog.prototype._replaceBaseUri = function(newBaseUri){
var self = this;
RdfSchemaAlignment._defaultNamespace = newBaseUri;
- $.post("/command/save-baseURI?" + $.param({project: theProject.id }),{baseURI:newBaseUri},function(data){
+ $.post("/command/rdf-exporter-extension/save-baseURI?" + $.param({project: theProject.id }),{baseURI:newBaseUri},function(data){
if (data.code === "error"){
alert('Error:' + data.message)
}else{
diff --git a/extensions/rdf-exporter/module/scripts/suggestterm.suggest.js b/extensions/rdf-exporter/module/scripts/suggestterm.suggest.js
index 16a71a6d8..59430a019 100755
--- a/extensions/rdf-exporter/module/scripts/suggestterm.suggest.js
+++ b/extensions/rdf-exporter/module/scripts/suggestterm.suggest.js
@@ -74,7 +74,7 @@
$.extend($.suggest.suggestterm, {
defaults: $.extend(true, {}, $.suggest.suggest.defaults, {
service_url: "",
- service_path: "/command/suggest-term",
+ service_path: "/command/rdf-exporter-extension/suggest-term",
type_strict:"classes",
suggest_new:"Add it"
})
diff --git a/gridworks b/gridworks
index d9e5cfa1f..373f40f99 100755
--- a/gridworks
+++ b/gridworks
@@ -218,7 +218,7 @@ tool_download() {
load_data() {
FILE=$1
NAME=$2
- URL="http://${GRIDWORKS_HOST}:${GRIDWORKS_PORT}/command/create-project-from-upload"
+ URL="http://${GRIDWORKS_HOST}:${GRIDWORKS_PORT}/command/core/create-project-from-upload"
CURL="`which curl 2> /dev/null`"
if [ -z "$CURL" ]; then
diff --git a/main/src/com/google/gridworks/GridworksServlet.java b/main/src/com/google/gridworks/GridworksServlet.java
index 864dba6e4..865d69aa0 100644
--- a/main/src/com/google/gridworks/GridworksServlet.java
+++ b/main/src/com/google/gridworks/GridworksServlet.java
@@ -19,6 +19,7 @@ import com.google.gridworks.commands.Command;
import com.google.gridworks.io.FileProjectManager;
import edu.mit.simile.butterfly.Butterfly;
+import edu.mit.simile.butterfly.ButterflyModule;
public class GridworksServlet extends Butterfly {
@@ -38,93 +39,6 @@ public class GridworksServlet extends Butterfly {
final static Logger logger = LoggerFactory.getLogger("gridworks");
- // TODO: This belongs in an external config file somewhere
- private static final String[][] commandNames = {
- {"create-project-from-upload", "com.google.gridworks.commands.project.CreateProjectCommand"},
- {"import-project", "com.google.gridworks.commands.project.ImportProjectCommand"},
- {"export-project", "com.google.gridworks.commands.project.ExportProjectCommand"},
- {"export-rows", "com.google.gridworks.commands.project.ExportRowsCommand"},
-
- {"get-project-metadata", "com.google.gridworks.commands.project.GetProjectMetadataCommand"},
- {"get-all-project-metadata", "com.google.gridworks.commands.workspace.GetAllProjectMetadataCommand"},
-
- {"delete-project", "com.google.gridworks.commands.project.DeleteProjectCommand"},
- {"rename-project", "com.google.gridworks.commands.project.RenameProjectCommand"},
-
- {"get-models", "com.google.gridworks.commands.project.GetModelsCommand"},
- {"get-rows", "com.google.gridworks.commands.row.GetRowsCommand"},
- {"get-processes", "com.google.gridworks.commands.history.GetProcessesCommand"},
- {"get-history", "com.google.gridworks.commands.history.GetHistoryCommand"},
- {"get-operations", "com.google.gridworks.commands.history.GetOperationsCommand"},
- {"get-columns-info", "com.google.gridworks.commands.column.GetColumnsInfoCommand"},
- {"get-scatterplot", "com.google.gridworks.commands.browsing.GetScatterplotCommand"},
-
- {"undo-redo", "com.google.gridworks.commands.history.UndoRedoCommand"},
- {"apply-operations", "com.google.gridworks.commands.history.ApplyOperationsCommand"},
- {"cancel-processes", "com.google.gridworks.commands.history.CancelProcessesCommand"},
-
- {"compute-facets", "com.google.gridworks.commands.browsing.ComputeFacetsCommand"},
- {"compute-clusters", "com.google.gridworks.commands.browsing.ComputeClustersCommand"},
-
- {"edit-one-cell", "com.google.gridworks.commands.cell.EditOneCellCommand"},
- {"text-transform", "com.google.gridworks.commands.cell.TextTransformCommand"},
- {"mass-edit", "com.google.gridworks.commands.cell.MassEditCommand"},
- {"join-multi-value-cells", "com.google.gridworks.commands.cell.JoinMultiValueCellsCommand"},
- {"split-multi-value-cells", "com.google.gridworks.commands.cell.SplitMultiValueCellsCommand"},
- {"fill-down", "com.google.gridworks.commands.cell.FillDownCommand"},
- {"blank-down", "com.google.gridworks.commands.cell.BlankDownCommand"},
- {"transpose-columns-into-rows", "com.google.gridworks.commands.cell.TransposeColumnsIntoRowsCommand"},
- {"transpose-rows-into-columns", "com.google.gridworks.commands.cell.TransposeRowsIntoColumnsCommand"},
-
- {"add-column", "com.google.gridworks.commands.column.AddColumnCommand"},
- {"remove-column", "com.google.gridworks.commands.column.RemoveColumnCommand"},
- {"rename-column", "com.google.gridworks.commands.column.RenameColumnCommand"},
- {"move-column", "com.google.gridworks.commands.column.MoveColumnCommand"},
- {"split-column", "com.google.gridworks.commands.column.SplitColumnCommand"},
- {"extend-data", "com.google.gridworks.commands.column.ExtendDataCommand"},
-
- {"denormalize", "com.google.gridworks.commands.row.DenormalizeCommand"},
-
- {"reconcile", "com.google.gridworks.commands.recon.ReconcileCommand"},
- {"recon-match-best-candidates", "com.google.gridworks.commands.recon.ReconMatchBestCandidatesCommand"},
- {"recon-mark-new-topics", "com.google.gridworks.commands.recon.ReconMarkNewTopicsCommand"},
- {"recon-discard-judgments", "com.google.gridworks.commands.recon.ReconDiscardJudgmentsCommand"},
- {"recon-match-specific-topic-to-cells", "com.google.gridworks.commands.recon.ReconMatchSpecificTopicCommand"},
- {"recon-judge-one-cell", "com.google.gridworks.commands.recon.ReconJudgeOneCellCommand"},
- {"recon-judge-similar-cells", "com.google.gridworks.commands.recon.ReconJudgeSimilarCellsCommand"},
-
- {"annotate-one-row", "com.google.gridworks.commands.row.AnnotateOneRowCommand"},
- {"annotate-rows", "com.google.gridworks.commands.row.AnnotateRowsCommand"},
- {"remove-rows", "com.google.gridworks.commands.row.RemoveRowsCommand"},
- {"reorder-rows", "com.google.gridworks.commands.row.ReorderRowsCommand"},
-
- {"save-protograph", "com.google.gridworks.commands.freebase.SaveProtographCommand"},
-
- {"get-expression-language-info", "com.google.gridworks.commands.expr.GetExpressionLanguageInfoCommand"},
- {"get-expression-history", "com.google.gridworks.commands.expr.GetExpressionHistoryCommand"},
- {"log-expression", "com.google.gridworks.commands.expr.LogExpressionCommand"},
-
- {"preview-expression", "com.google.gridworks.commands.expr.PreviewExpressionCommand"},
- {"preview-extend-data", "com.google.gridworks.commands.column.PreviewExtendDataCommand"},
- {"preview-protograph", "com.google.gridworks.commands.freebase.PreviewProtographCommand"},
-
- {"guess-types-of-column", "com.google.gridworks.commands.freebase.GuessTypesOfColumnCommand"},
-
- {"check-authorization", "com.google.gridworks.commands.auth.CheckAuthorizationCommand"},
- {"authorize", "com.google.gridworks.commands.auth.AuthorizeCommand"},
- {"deauthorize", "com.google.gridworks.commands.auth.DeAuthorizeCommand"},
- {"user-badges", "com.google.gridworks.commands.auth.GetUserBadgesCommand"},
-
- {"upload-data", "com.google.gridworks.commands.freebase.UploadDataCommand"},
- {"import-qa-data", "com.google.gridworks.commands.freebase.ImportQADataCommand"},
- {"mqlread", "com.google.gridworks.commands.freebase.MQLReadCommand"},
- {"mqlwrite", "com.google.gridworks.commands.freebase.MQLWriteCommand"},
-
- {"get-preference", "com.google.gridworks.commands.GetPreferenceCommand"},
- {"get-all-preferences", "com.google.gridworks.commands.GetAllPreferencesCommand"},
- {"set-preference", "com.google.gridworks.commands.SetPreferenceCommand"},
- };
-
public static String getVersion() {
return VERSION;
}
@@ -159,8 +73,6 @@ public class GridworksServlet extends Butterfly {
throw new ServletException("can't find servlet init config 'gridworks.data', I have to give up initializing");
}
- registerCommands(commandNames);
-
s_dataDir = new File(data);
FileProjectManager.initialize(s_dataDir);
@@ -195,18 +107,18 @@ public class GridworksServlet extends Butterfly {
@Override
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- if (request.getPathInfo().startsWith("/command")) {
- String commandName = getCommandName(request);
- Command command = commands.get(commandName);
+ if (request.getPathInfo().startsWith("/command/")) {
+ String commandKey = getCommandKey(request);
+ Command command = commands.get(commandKey);
if (command != null) {
if (request.getMethod().equals("GET")) {
- logger.trace("> GET {}", commandName);
+ logger.trace("> GET {}", commandKey);
command.doGet(request, response);
- logger.trace("< GET {}", commandName);
+ logger.trace("< GET {}", commandKey);
} else if (request.getMethod().equals("POST")) {
- logger.trace("> POST {}", commandName);
+ logger.trace("> POST {}", commandKey);
command.doPost(request, response);
- logger.trace("< POST {}", commandName);
+ logger.trace("< POST {}", commandKey);
} else {
response.sendError(405);
}
@@ -218,13 +130,20 @@ public class GridworksServlet extends Butterfly {
}
}
- protected String getCommandName(HttpServletRequest request) {
- // Remove extraneous path segments that might be there for other purposes,
- // e.g., for /export-rows/filename.ext, export-rows is the command while
- // filename.ext is only for the browser to prompt a convenient filename.
- String commandName = request.getPathInfo().substring("/command/".length());
- int slash = commandName.indexOf('/');
- return slash > 0 ? commandName.substring(0, slash) : commandName;
+ protected String getCommandKey(HttpServletRequest request) {
+ // A command path has this format: /command/module-name/command-name/...
+
+ String path = request.getPathInfo().substring("/command/".length());
+
+ int slash1 = path.indexOf('/');
+ if (slash1 >= 0) {
+ int slash2 = path.indexOf('/', slash1 + 1);
+ if (slash2 > 0) {
+ path = path.substring(0, slash2);
+ }
+ }
+
+ return path;
}
private File tempDir = null;
@@ -253,71 +172,33 @@ public class GridworksServlet extends Butterfly {
public String getConfiguration(String name, String def) {
return null;
}
-
- /**
- * Register an array of commands
- *
- * @param commands
- * An array of arrays containing pairs of strings with the
- * command name in the first element of the tuple and the fully
- * qualified class name of the class implementing the command in
- * the second.
- * @return false if any commands failed to load
- */
- private boolean registerCommands(String[][] commands) {
- boolean status = true;
- for (String[] command : commandNames) {
- String commandName = command[0];
- String className = command[1];
- status |= registerOneCommand(commandName, className);
- }
- return status;
- }
/**
- * Register a single command given its class name.
+ * Register a single command.
*
- * @param name
- * command verb for command
- * @param className
- * class name of command class
+ * @param module the module the command belongs to
+ * @param name command verb for command
+ * @param commandObject object implementing the command
* @return true if command was loaded and registered successfully
*/
- protected boolean registerOneCommand(String commandName, String className) {
- logger.debug("Loading command " + commandName + " class: " + className);
- Command cmd;
- try {
- cmd = (Command) this.getClass().getClassLoader().loadClass(className).newInstance();
-
- return registerOneCommand(commandName, cmd);
- } catch (InstantiationException e) {
- logger.error("Failed to load command class " + className, e);
- return false;
- } catch (IllegalAccessException e) {
- logger.error("Failed to load command class " + className, e);
- return false;
- } catch (ClassNotFoundException e) {
- logger.error("Failed to load command class " + className, e);
- return false;
- }
+ protected boolean registerOneCommand(ButterflyModule module, String name, Command commandObject) {
+ return registerOneCommand(module.getName() + "/" + name, commandObject);
}
/**
* Register a single command.
*
- * @param name
- * command verb for command
- * @param commandObject
- * object implementing the command
+ * @param path path for command
+ * @param commandObject object implementing the command
* @return true if command was loaded and registered successfully
*/
- protected boolean registerOneCommand(String name, Command commandObject) {
- if (commands.containsKey(name)) {
+ protected boolean registerOneCommand(String path, Command commandObject) {
+ if (commands.containsKey(path)) {
return false;
}
commandObject.init(this);
- commands.put(name, commandObject);
+ commands.put(path, commandObject);
return true;
}
@@ -330,15 +211,14 @@ public class GridworksServlet extends Butterfly {
/**
* Register a single command. Used by extensions.
*
- * @param name
- * command verb for command
- * @param commandObject
- * object implementing the command
+ * @param module the module the command belongs to
+ * @param name command verb for command
+ * @param commandObject object implementing the command
*
* @return true if command was loaded and registered successfully
*/
- static public boolean registerCommand(String commandName, Command commandObject) {
- return s_singleton.registerOneCommand(commandName, commandObject);
+ static public boolean registerCommand(ButterflyModule module, String commandName, Command commandObject) {
+ return s_singleton.registerOneCommand(module, commandName, commandObject);
}
static public Class> getClass(String className) throws ClassNotFoundException {
@@ -347,5 +227,4 @@ public class GridworksServlet extends Butterfly {
}
return Class.forName(className);
}
-}
-
+}
\ No newline at end of file
diff --git a/main/src/com/google/gridworks/commands/auth/AuthorizeCommand.java b/main/src/com/google/gridworks/commands/auth/AuthorizeCommand.java
index 8be8d62e2..7a23a4207 100644
--- a/main/src/com/google/gridworks/commands/auth/AuthorizeCommand.java
+++ b/main/src/com/google/gridworks/commands/auth/AuthorizeCommand.java
@@ -129,6 +129,6 @@ public class AuthorizeCommand extends Command {
throw new RuntimeException("neither the 'host' nor 'referer' headers were present in the HTTP response, I can't determine what URL gridworks is listening to.");
}
}
- return "http://" + host + "/command/authorize/" + provider.getHost();
+ return "http://" + host + "/command/core/authorize/" + provider.getHost();
}
}
diff --git a/main/tests/server/src/com/google/gridworks/tests/GridworksServletStub.java b/main/tests/server/src/com/google/gridworks/tests/GridworksServletStub.java
index 3595440a8..345dd761e 100644
--- a/main/tests/server/src/com/google/gridworks/tests/GridworksServletStub.java
+++ b/main/tests/server/src/com/google/gridworks/tests/GridworksServletStub.java
@@ -23,7 +23,7 @@ public class GridworksServletStub extends GridworksServlet {
}
public String wrapGetCommandName(HttpServletRequest request){
- return super.getCommandName(request);
+ return super.getCommandKey(request);
}
//-------------------helper methods--------------
@@ -32,8 +32,8 @@ public class GridworksServletStub extends GridworksServlet {
* @param commandName
* @param command
*/
- public void insertCommand( String commandName, Command command ){
- registerCommand(commandName, command);
+ public void insertCommand(String commandName, Command command ){
+ registerOneCommand("core/" + commandName, command);
}
/**
diff --git a/main/tests/server/src/com/google/gridworks/tests/GridworksServletTests.java b/main/tests/server/src/com/google/gridworks/tests/GridworksServletTests.java
index 9a246061a..7f56e10f9 100644
--- a/main/tests/server/src/com/google/gridworks/tests/GridworksServletTests.java
+++ b/main/tests/server/src/com/google/gridworks/tests/GridworksServletTests.java
@@ -32,7 +32,7 @@ public class GridworksServletTests extends GridworksTest {
//variables
final static private String TEST_COMMAND_NAME = "test-command";
- final static private String TEST_COMMAND_PATH = "/command/test-command/foobar";
+ final static private String TEST_COMMAND_PATH = "/command/core/test-command/foobar";
final static private String BAD_COMMAND_PATH = "/command-does-not-exist";
final static private String POST = "POST";
diff --git a/main/webapp/modules/core/MOD-INF/controller.js b/main/webapp/modules/core/MOD-INF/controller.js
index 9a0e1c0d2..033ac1789 100644
--- a/main/webapp/modules/core/MOD-INF/controller.js
+++ b/main/webapp/modules/core/MOD-INF/controller.js
@@ -10,12 +10,102 @@ var templatedFiles = {
"preferences" : true
};
+function registerCommands() {
+ var GS = Packages.com.google.gridworks.GridworksServlet;
+
+ GS.registerCommand(module, "create-project-from-upload", new Packages.com.google.gridworks.commands.project.CreateProjectCommand());
+ GS.registerCommand(module, "import-project", new Packages.com.google.gridworks.commands.project.ImportProjectCommand());
+ GS.registerCommand(module, "export-project", new Packages.com.google.gridworks.commands.project.ExportProjectCommand());
+ GS.registerCommand(module, "export-rows", new Packages.com.google.gridworks.commands.project.ExportRowsCommand());
+
+ GS.registerCommand(module, "get-project-metadata", new Packages.com.google.gridworks.commands.project.GetProjectMetadataCommand());
+ GS.registerCommand(module, "get-all-project-metadata", new Packages.com.google.gridworks.commands.workspace.GetAllProjectMetadataCommand());
+
+ GS.registerCommand(module, "delete-project", new Packages.com.google.gridworks.commands.project.DeleteProjectCommand());
+ GS.registerCommand(module, "rename-project", new Packages.com.google.gridworks.commands.project.RenameProjectCommand());
+
+ GS.registerCommand(module, "get-models", new Packages.com.google.gridworks.commands.project.GetModelsCommand());
+ GS.registerCommand(module, "get-rows", new Packages.com.google.gridworks.commands.row.GetRowsCommand());
+ GS.registerCommand(module, "get-processes", new Packages.com.google.gridworks.commands.history.GetProcessesCommand());
+ GS.registerCommand(module, "get-history", new Packages.com.google.gridworks.commands.history.GetHistoryCommand());
+ GS.registerCommand(module, "get-operations", new Packages.com.google.gridworks.commands.history.GetOperationsCommand());
+ GS.registerCommand(module, "get-columns-info", new Packages.com.google.gridworks.commands.column.GetColumnsInfoCommand());
+ GS.registerCommand(module, "get-scatterplot", new Packages.com.google.gridworks.commands.browsing.GetScatterplotCommand());
+
+ GS.registerCommand(module, "undo-redo", new Packages.com.google.gridworks.commands.history.UndoRedoCommand());
+ GS.registerCommand(module, "apply-operations", new Packages.com.google.gridworks.commands.history.ApplyOperationsCommand());
+ GS.registerCommand(module, "cancel-processes", new Packages.com.google.gridworks.commands.history.CancelProcessesCommand());
+
+ GS.registerCommand(module, "compute-facets", new Packages.com.google.gridworks.commands.browsing.ComputeFacetsCommand());
+ GS.registerCommand(module, "compute-clusters", new Packages.com.google.gridworks.commands.browsing.ComputeClustersCommand());
+
+ GS.registerCommand(module, "edit-one-cell", new Packages.com.google.gridworks.commands.cell.EditOneCellCommand());
+ GS.registerCommand(module, "text-transform", new Packages.com.google.gridworks.commands.cell.TextTransformCommand());
+ GS.registerCommand(module, "mass-edit", new Packages.com.google.gridworks.commands.cell.MassEditCommand());
+ GS.registerCommand(module, "join-multi-value-cells", new Packages.com.google.gridworks.commands.cell.JoinMultiValueCellsCommand());
+ GS.registerCommand(module, "split-multi-value-cells", new Packages.com.google.gridworks.commands.cell.SplitMultiValueCellsCommand());
+ GS.registerCommand(module, "fill-down", new Packages.com.google.gridworks.commands.cell.FillDownCommand());
+ GS.registerCommand(module, "blank-down", new Packages.com.google.gridworks.commands.cell.BlankDownCommand());
+ GS.registerCommand(module, "transpose-columns-into-rows", new Packages.com.google.gridworks.commands.cell.TransposeColumnsIntoRowsCommand());
+ GS.registerCommand(module, "transpose-rows-into-columns", new Packages.com.google.gridworks.commands.cell.TransposeRowsIntoColumnsCommand());
+
+ GS.registerCommand(module, "add-column", new Packages.com.google.gridworks.commands.column.AddColumnCommand());
+ GS.registerCommand(module, "remove-column", new Packages.com.google.gridworks.commands.column.RemoveColumnCommand());
+ GS.registerCommand(module, "rename-column", new Packages.com.google.gridworks.commands.column.RenameColumnCommand());
+ GS.registerCommand(module, "move-column", new Packages.com.google.gridworks.commands.column.MoveColumnCommand());
+ GS.registerCommand(module, "split-column", new Packages.com.google.gridworks.commands.column.SplitColumnCommand());
+ GS.registerCommand(module, "extend-data", new Packages.com.google.gridworks.commands.column.ExtendDataCommand());
+
+ GS.registerCommand(module, "denormalize", new Packages.com.google.gridworks.commands.row.DenormalizeCommand());
+
+ GS.registerCommand(module, "reconcile", new Packages.com.google.gridworks.commands.recon.ReconcileCommand());
+ GS.registerCommand(module, "recon-match-best-candidates", new Packages.com.google.gridworks.commands.recon.ReconMatchBestCandidatesCommand());
+ GS.registerCommand(module, "recon-mark-new-topics", new Packages.com.google.gridworks.commands.recon.ReconMarkNewTopicsCommand());
+ GS.registerCommand(module, "recon-discard-judgments", new Packages.com.google.gridworks.commands.recon.ReconDiscardJudgmentsCommand());
+ GS.registerCommand(module, "recon-match-specific-topic-to-cells", new Packages.com.google.gridworks.commands.recon.ReconMatchSpecificTopicCommand());
+ GS.registerCommand(module, "recon-judge-one-cell", new Packages.com.google.gridworks.commands.recon.ReconJudgeOneCellCommand());
+ GS.registerCommand(module, "recon-judge-similar-cells", new Packages.com.google.gridworks.commands.recon.ReconJudgeSimilarCellsCommand());
+
+ GS.registerCommand(module, "annotate-one-row", new Packages.com.google.gridworks.commands.row.AnnotateOneRowCommand());
+ GS.registerCommand(module, "annotate-rows", new Packages.com.google.gridworks.commands.row.AnnotateRowsCommand());
+ GS.registerCommand(module, "remove-rows", new Packages.com.google.gridworks.commands.row.RemoveRowsCommand());
+ GS.registerCommand(module, "reorder-rows", new Packages.com.google.gridworks.commands.row.ReorderRowsCommand());
+
+ GS.registerCommand(module, "save-protograph", new Packages.com.google.gridworks.commands.freebase.SaveProtographCommand());
+
+ GS.registerCommand(module, "get-expression-language-info", new Packages.com.google.gridworks.commands.expr.GetExpressionLanguageInfoCommand());
+ GS.registerCommand(module, "get-expression-history", new Packages.com.google.gridworks.commands.expr.GetExpressionHistoryCommand());
+ GS.registerCommand(module, "log-expression", new Packages.com.google.gridworks.commands.expr.LogExpressionCommand());
+
+ GS.registerCommand(module, "preview-expression", new Packages.com.google.gridworks.commands.expr.PreviewExpressionCommand());
+ GS.registerCommand(module, "preview-extend-data", new Packages.com.google.gridworks.commands.column.PreviewExtendDataCommand());
+ GS.registerCommand(module, "preview-protograph", new Packages.com.google.gridworks.commands.freebase.PreviewProtographCommand());
+
+ GS.registerCommand(module, "guess-types-of-column", new Packages.com.google.gridworks.commands.freebase.GuessTypesOfColumnCommand());
+
+ GS.registerCommand(module, "check-authorization", new Packages.com.google.gridworks.commands.auth.CheckAuthorizationCommand());
+ GS.registerCommand(module, "authorize", new Packages.com.google.gridworks.commands.auth.AuthorizeCommand());
+ GS.registerCommand(module, "deauthorize", new Packages.com.google.gridworks.commands.auth.DeAuthorizeCommand());
+ GS.registerCommand(module, "user-badges", new Packages.com.google.gridworks.commands.auth.GetUserBadgesCommand());
+
+ GS.registerCommand(module, "upload-data", new Packages.com.google.gridworks.commands.freebase.UploadDataCommand());
+ GS.registerCommand(module, "import-qa-data", new Packages.com.google.gridworks.commands.freebase.ImportQADataCommand());
+ GS.registerCommand(module, "mqlread", new Packages.com.google.gridworks.commands.freebase.MQLReadCommand());
+ GS.registerCommand(module, "mqlwrite", new Packages.com.google.gridworks.commands.freebase.MQLWriteCommand());
+
+ GS.registerCommand(module, "get-preference", new Packages.com.google.gridworks.commands.GetPreferenceCommand());
+ GS.registerCommand(module, "get-all-preferences", new Packages.com.google.gridworks.commands.GetAllPreferencesCommand());
+ GS.registerCommand(module, "set-preference", new Packages.com.google.gridworks.commands.SetPreferenceCommand());
+}
+
/*
* This optional function is invoked from the module's init() Java function.
*/
function init() {
// Packages.java.lang.System.err.println("Initializing by script " + module);
+ registerCommands();
+
ClientSideResourceManager.addPaths(
"project/scripts",
module,
diff --git a/main/webapp/modules/core/index.html b/main/webapp/modules/core/index.html
index 413d99847..ed1962fd5 100644
--- a/main/webapp/modules/core/index.html
+++ b/main/webapp/modules/core/index.html
@@ -55,7 +55,7 @@
|