diff --git a/src/main/java/com/metaweb/gridworks/commands/edit/UploadDataCommand.java b/src/main/java/com/metaweb/gridworks/commands/edit/UploadDataCommand.java index adc1435d2..a25ffcd5c 100644 --- a/src/main/java/com/metaweb/gridworks/commands/edit/UploadDataCommand.java +++ b/src/main/java/com/metaweb/gridworks/commands/edit/UploadDataCommand.java @@ -27,7 +27,7 @@ public class UploadDataCommand extends Command { Project project = getProject(request); Engine engine = getEngine(request, project); TripleloaderExporter exporter = new TripleloaderExporter(); - StringWriter triples = new StringWriter(1024 * 10); + StringWriter triples = new StringWriter(10 * 1024 * 1024); exporter.export(project, new Properties(), engine, triples); String source_name = request.getParameter("source_name"); diff --git a/src/main/java/com/metaweb/gridworks/exporters/TripleloaderExporter.java b/src/main/java/com/metaweb/gridworks/exporters/TripleloaderExporter.java index ebfb64feb..57f556047 100644 --- a/src/main/java/com/metaweb/gridworks/exporters/TripleloaderExporter.java +++ b/src/main/java/com/metaweb/gridworks/exporters/TripleloaderExporter.java @@ -33,7 +33,7 @@ public class TripleloaderExporter implements Exporter { TripleLoaderTransposedNodeFactory nodeFactory = new TripleLoaderTransposedNodeFactory(writer); - Transposer.transpose(project, protograph, protograph.getRootNode(0), nodeFactory); + Transposer.transpose(project, protograph, protograph.getRootNode(0), nodeFactory, -1); nodeFactory.flush(); } } diff --git a/src/main/java/com/metaweb/gridworks/protograph/transpose/Transposer.java b/src/main/java/com/metaweb/gridworks/protograph/transpose/Transposer.java index 838eef7f9..c9afac828 100644 --- a/src/main/java/com/metaweb/gridworks/protograph/transpose/Transposer.java +++ b/src/main/java/com/metaweb/gridworks/protograph/transpose/Transposer.java @@ -23,11 +23,21 @@ import com.metaweb.gridworks.protograph.ValueNode; public class Transposer { static public void transpose( Project project, - Protograph protograph, - Node rootNode, - TransposedNodeFactory nodeFactory + Protograph protograph, + Node rootNode, + TransposedNodeFactory nodeFactory ) { - Context rootContext = new Context(rootNode, null, null, 20); + transpose(project, protograph, rootNode, nodeFactory, 20); + } + + static public void transpose( + Project project, + Protograph protograph, + Node rootNode, + TransposedNodeFactory nodeFactory, + int limit + ) { + Context rootContext = new Context(rootNode, null, null, limit); for (Row row : project.rows) { descend(project, protograph, nodeFactory, row, rootNode, rootContext); diff --git a/src/main/webapp/scripts/dialogs/freebase-loading-dialog.js b/src/main/webapp/scripts/dialogs/freebase-loading-dialog.js index c6614c56b..790df54bc 100644 --- a/src/main/webapp/scripts/dialogs/freebase-loading-dialog.js +++ b/src/main/webapp/scripts/dialogs/freebase-loading-dialog.js @@ -116,22 +116,11 @@ FreebaseLoadingDialog.prototype._createDialog = function() { }; var show_triples = function(cont) { - $.post("/command/export-rows", - { - project: theProject.id, - format : "tripleloader" - }, + $.post( + "/command/preview-protograph?" + $.param({ project: theProject.id }), + { protograph: JSON.stringify(theProject.protograph) }, function(data) { - if (data == null || data == "") { - body.html( - '
' - ); - self._elmts = DOM.bind(frame); - self._end(); - } else { + if ("tripleloader" in data) { body.html( 'Name this data load ¬ required ' +
@@ -139,7 +128,7 @@ FreebaseLoadingDialog.prototype._createDialog = function() {
' | Source ID ¬ optional ' +
' | ' +
'