From 80b85dd6df9c6efaf5dd1c9f7f298fc1d6f1d02a Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Sun, 21 Dec 2014 13:15:26 -0500 Subject: [PATCH] Remove unused code --- .../gdata/FusionTableSerializer.java | 38 +------------------ 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/extensions/gdata/src/com/google/refine/extension/gdata/FusionTableSerializer.java b/extensions/gdata/src/com/google/refine/extension/gdata/FusionTableSerializer.java index ef7dcd326..0a404c697 100644 --- a/extensions/gdata/src/com/google/refine/extension/gdata/FusionTableSerializer.java +++ b/extensions/gdata/src/com/google/refine/extension/gdata/FusionTableSerializer.java @@ -71,7 +71,7 @@ final class FusionTableSerializer implements TabularSerializer { private boolean sendBatch(boolean isLastChunk) { try { // FIXME: text/csv doesn't work even though that's what the content is - AbstractInputStreamContent content = ByteArrayContent.fromString("application/octet-stream", sbBatch.toString()); + AbstractInputStreamContent content = ByteArrayContent.fromString("application/octet-stream", sbBatch.toString()); // AbstractInputStreamContent content = new InputStreamContent("application/octet-stream", // // TODO: we really want to do GZIP compression here @@ -114,42 +114,6 @@ final class FusionTableSerializer implements TabularSerializer { sb.append("\n"); } - // Old-style SQL INSERT can be removed once we're sure importRows will work - private void formulateInsert(List cells, StringBuffer sb) { - StringBuffer sbColumnNames = new StringBuffer(); - StringBuffer sbValues = new StringBuffer(); - boolean first = true; - for (int i = 0; i < cells.size() && i < columnNames.size(); i++) { - CellData cellData = cells.get(i); - if (first) { - first = false; - } else { - sbColumnNames.append(','); - sbValues.append(','); - } - sbColumnNames.append("'"); - sbColumnNames.append(columnNames.get(i)); - sbColumnNames.append("'"); - - sbValues.append("'"); - if (cellData != null && cellData.text != null) { - sbValues.append(cellData.text.replaceAll("'", "\\\\'")); - } - sbValues.append("'"); - } - - if (sb.length() > 0) { - sb.append(';'); - } - sb.append("INSERT INTO "); - sb.append(tableId); - sb.append("("); - sb.append(sbColumnNames.toString()); - sb.append(") values ("); - sb.append(sbValues.toString()); - sb.append(")"); - } - public String getUrl() { return tableId == null || exceptions.size() > 0 ? null : "https://www.google.com/fusiontables/DataSource?docid=" + tableId;