From f8d30e9e8e3f2d314c6f95bb7623f9688d9bb5c3 Mon Sep 17 00:00:00 2001 From: David Huynh Date: Tue, 23 Mar 2010 01:17:45 +0000 Subject: [PATCH] Don't send back recon candidate types for rendering cells. git-svn-id: http://google-refine.googlecode.com/svn/trunk@340 7d457c2a-affb-35e4-300a-418c747d4874 --- .../com/metaweb/gridworks/model/ReconCandidate.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/metaweb/gridworks/model/ReconCandidate.java b/src/main/java/com/metaweb/gridworks/model/ReconCandidate.java index e59eeff1d..bdf8a3126 100644 --- a/src/main/java/com/metaweb/gridworks/model/ReconCandidate.java +++ b/src/main/java/com/metaweb/gridworks/model/ReconCandidate.java @@ -48,11 +48,14 @@ public class ReconCandidate implements HasFields, Jsonizable { writer.key("guid"); writer.value(topicGUID); writer.key("name"); writer.value(topicName); writer.key("score"); writer.value(score); - writer.key("types"); writer.array(); - for (String typeID : typeIDs) { - writer.value(typeID); + + if (!options.containsKey("reconCandidateOmitTypes")) { + writer.key("types"); writer.array(); + for (String typeID : typeIDs) { + writer.value(typeID); + } + writer.endArray(); } - writer.endArray(); writer.endObject(); }