From 4373e7276f2c781723cb2c2362df0693d14e78c5 Mon Sep 17 00:00:00 2001 From: David Huynh Date: Thu, 15 Jul 2010 21:45:17 +0000 Subject: [PATCH] Pass target Freebase type IDs in recon objects to freeq. git-svn-id: http://google-refine.googlecode.com/svn/trunk@1099 7d457c2a-affb-35e4-300a-418c747d4874 --- .../transpose/TripleLoaderTransposedNodeFactory.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main/src/com/metaweb/gridworks/protograph/transpose/TripleLoaderTransposedNodeFactory.java b/main/src/com/metaweb/gridworks/protograph/transpose/TripleLoaderTransposedNodeFactory.java index a7f5c89b6..093968820 100644 --- a/main/src/com/metaweb/gridworks/protograph/transpose/TripleLoaderTransposedNodeFactory.java +++ b/main/src/com/metaweb/gridworks/protograph/transpose/TripleLoaderTransposedNodeFactory.java @@ -18,6 +18,8 @@ import com.metaweb.gridworks.model.Column; import com.metaweb.gridworks.model.Project; import com.metaweb.gridworks.model.Recon; import com.metaweb.gridworks.model.Recon.Judgment; +import com.metaweb.gridworks.model.recon.ReconConfig; +import com.metaweb.gridworks.model.recon.StandardReconConfig; import com.metaweb.gridworks.protograph.AnonymousNode; import com.metaweb.gridworks.protograph.CellKeyNode; import com.metaweb.gridworks.protograph.CellNode; @@ -124,6 +126,12 @@ public class TripleLoaderTransposedNodeFactory implements TransposedNodeFactory sb2.append(", \"id\" : "); sb2.append(JSONObject.quote(recon.match.id)); } + ReconConfig reconConfig = column.getReconConfig(); + if (reconConfig != null && reconConfig instanceof StandardReconConfig) { + StandardReconConfig standardReconConfig = (StandardReconConfig) reconConfig; + sb2.append(", \"type\" : "); sb2.append(JSONObject.quote(standardReconConfig.typeID)); + } + sb2.append(" } }"); writeLine(sb2.toString());