From 2acd4624cf5b814dc1bf011f5c0591feeef85bd9 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Fri, 16 Mar 2012 16:23:29 +0000 Subject: [PATCH] Issue 551 - add "connect":"insert" clause for literal Freebase topics in protograph git-svn-id: http://google-refine.googlecode.com/svn/trunk@2475 7d457c2a-affb-35e4-300a-418c747d4874 --- .../transpose/MqlwriteLikeTransposedNodeFactory.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/freebase/src/com/google/refine/freebase/protograph/transpose/MqlwriteLikeTransposedNodeFactory.java b/extensions/freebase/src/com/google/refine/freebase/protograph/transpose/MqlwriteLikeTransposedNodeFactory.java index 16787a021..83b3c22ed 100644 --- a/extensions/freebase/src/com/google/refine/freebase/protograph/transpose/MqlwriteLikeTransposedNodeFactory.java +++ b/extensions/freebase/src/com/google/refine/freebase/protograph/transpose/MqlwriteLikeTransposedNodeFactory.java @@ -248,6 +248,10 @@ public class MqlwriteLikeTransposedNodeFactory implements TransposedNodeFactory obj = new JSONObject(); try { obj.put(ID, node.topic.id); + // TODO: This won't work at the root of the query, so that needs + // to be special cased, but for now one must use a different shaped graph + // (ie move the Freebase topic to someplace other than the root + obj.put(CONNECT, "insert"); } catch (JSONException e) { e.printStackTrace(); }