From e7e9dbc74d81342a838cd1ccf3ffa2d882327e32 Mon Sep 17 00:00:00 2001 From: David Huynh Date: Mon, 3 Oct 2011 16:38:07 +0000 Subject: [PATCH] Minor fixes to pass some exporter tests. git-svn-id: http://google-refine.googlecode.com/svn/trunk@2269 7d457c2a-affb-35e4-300a-418c747d4874 --- .../exporters/CustomizableTabularExporterUtilities.java | 8 ++++++-- .../com/google/refine/exporters/HtmlTableExporter.java | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/main/src/com/google/refine/exporters/CustomizableTabularExporterUtilities.java b/main/src/com/google/refine/exporters/CustomizableTabularExporterUtilities.java index 9c71bc5c3..2ed540233 100644 --- a/main/src/com/google/refine/exporters/CustomizableTabularExporterUtilities.java +++ b/main/src/com/google/refine/exporters/CustomizableTabularExporterUtilities.java @@ -213,6 +213,8 @@ abstract public class CustomizableTabularExporterUtilities { CUSTOM } + final static private String fullIso8601 = "yyyy-MM-dd'T'HH:mm:ss'Z'"; + static private class CellFormatter { ReconOutputMode recon_outputMode = ReconOutputMode.ENTITY_NAME; boolean recon_blankUnmatchedCells = false; @@ -227,7 +229,9 @@ abstract public class CustomizableTabularExporterUtilities { Map identifierSpaceToUrl = null; - CellFormatter() {} + CellFormatter() { + dateFormatter = new SimpleDateFormat(fullIso8601); + } CellFormatter(JSONObject options) { JSONObject reconSettings = JSONUtilities.getObject(options, "reconSettings"); @@ -299,7 +303,7 @@ abstract public class CustomizableTabularExporterUtilities { default: dateFormatter = date_omitTime ? new SimpleDateFormat("yyyy-MM-dd") : - new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); + new SimpleDateFormat(fullIso8601); } if (!date_useLocalTimeZone) { diff --git a/main/src/com/google/refine/exporters/HtmlTableExporter.java b/main/src/com/google/refine/exporters/HtmlTableExporter.java index 460b6b71f..2f14ba12c 100644 --- a/main/src/com/google/refine/exporters/HtmlTableExporter.java +++ b/main/src/com/google/refine/exporters/HtmlTableExporter.java @@ -110,7 +110,7 @@ public class HtmlTableExporter implements WriterExporter { writer.write(""); } } - writer.write(""); + writer.write("\n"); } catch (IOException e) { // Ignore }