diff --git a/extensions/freebase/module/scripts/dialogs/schema-alignment/dialog.js b/extensions/freebase/module/scripts/dialogs/schema-alignment/dialog.js index d8b871a97..ebb585bfb 100644 --- a/extensions/freebase/module/scripts/dialogs/schema-alignment/dialog.js +++ b/extensions/freebase/module/scripts/dialogs/schema-alignment/dialog.js @@ -11,7 +11,7 @@ SchemaAlignment.autoAlign = function() { for (var c = 0; c < columns.length; c++) { var column = columns[c]; var typed = (column.reconConfig) && - ReconciliationManager.isFreebaseId(column.reconConfig.identifierSpace) && + ReconciliationManager.isFreebaseIdOrMid(column.reconConfig.identifierSpace) && ReconciliationManager.isFreebaseId(column.reconConfig.schemaSpace); var candidate = { @@ -105,7 +105,7 @@ SchemaAlignment.createNewRootNode = function() { createForNoReconMatch: true }; if ((column.reconConfig) && - ReconciliationManager.isFreebaseId(column.reconConfig.identifierSpace) && + ReconciliationManager.isFreebaseIdOrMid(column.reconConfig.identifierSpace) && ReconciliationManager.isFreebaseId(column.reconConfig.schemaSpace) && (column.reconConfig.type)) { diff --git a/main/src/com/google/refine/model/Recon.java b/main/src/com/google/refine/model/Recon.java index 831fbeffd..c6f70fcbf 100644 --- a/main/src/com/google/refine/model/Recon.java +++ b/main/src/com/google/refine/model/Recon.java @@ -79,8 +79,8 @@ public class Recon implements HasFields, Jsonizable { static public Recon makeFreebaseRecon(long judgmentHistoryEntry) { return new Recon( judgmentHistoryEntry, - "http://rdf.freebase.com/ns/type.object.id", - "http://rdf.freebase.com/ns/type.object.id"); + "http://rdf.freebase.com/ns/type.object.mid", + "http://rdf.freebase.com/ns/type.object.mid"); } public Recon(long judgmentHistoryEntry, String identifierSpace, String schemaSpace) { diff --git a/main/webapp/modules/core/scripts/reconciliation/recon-manager.js b/main/webapp/modules/core/scripts/reconciliation/recon-manager.js index 4a5ebde1b..d21ac7e9b 100644 --- a/main/webapp/modules/core/scripts/reconciliation/recon-manager.js +++ b/main/webapp/modules/core/scripts/reconciliation/recon-manager.js @@ -8,6 +8,14 @@ ReconciliationManager.isFreebaseId = function(s) { return s == "http://rdf.freebase.com/ns/type.object.id"; }; +ReconciliationManager.isFreebaseMid = function(s) { + return s == "http://rdf.freebase.com/ns/type.object.mid"; +}; + +ReconciliationManager.isFreebaseIdOrMid = function(s) { + return ReconciliationManager.isFreebaseMid(s) || ReconciliationManager.isFreebaseId(s); +}; + ReconciliationManager._rebuildMap = function() { var map = {}; $.each(ReconciliationManager.getAllServices(), function(i, service) { @@ -109,7 +117,7 @@ ReconciliationManager.save = function(f) { ReconciliationManager._rebuildMap(); } else { ReconciliationManager.registerStandardService( - "http://2.standard-reconcile.dfhuynh.user.dev.freebaseapps.com/reconcile"); + "http://3.standard-reconcile.dfhuynh.user.dev.freebaseapps.com/reconcile"); } }, dataType: "json" diff --git a/main/webapp/modules/core/scripts/views/data-table/cell-ui.js b/main/webapp/modules/core/scripts/views/data-table/cell-ui.js index cca17ddf8..ea059a6da 100644 --- a/main/webapp/modules/core/scripts/views/data-table/cell-ui.js +++ b/main/webapp/modules/core/scripts/views/data-table/cell-ui.js @@ -72,7 +72,7 @@ DataTableCellUI.prototype._render = function() { if (service && (service.view) && (service.view.url)) { a.attr("href", service.view.url.replace("{{id}}", match.id)); - } else if (ReconciliationManager.isFreebaseId(r.identifierSpace)) { + } else if (ReconciliationManager.isFreebaseIdOrMid(r.identifierSpace)) { a.attr("href", "http://www.freebase.com/view" + match.id); } @@ -116,14 +116,14 @@ DataTableCellUI.prototype._render = function() { if ((service) && (service.view) && (service.view.url)) { a.attr("href", service.view.url.replace("{{id}}", candidate.id)); - } else if (ReconciliationManager.isFreebaseId(r.identifierSpace)) { + } else if (ReconciliationManager.isFreebaseIdOrMid(r.identifierSpace)) { a.attr("href", "http://www.freebase.com/view" + candidate.id); } var preview = null; if ((service) && (service.preview)) { preview = service.preview; - } else if (ReconciliationManager.isFreebaseId(r.identifierSpace)) { + } else if (ReconciliationManager.isFreebaseIdOrMid(r.identifierSpace)) { preview = DataTableCellUI.topicBlockPreview; } if (preview) { @@ -172,7 +172,7 @@ DataTableCellUI.prototype._render = function() { if ((service) && (service.suggest) && (service.suggest.entity)) { suggestOptions = service.suggest.entity; addSuggest = true; - } else if (ReconciliationManager.isFreebaseId(r.identifierSpace)) { + } else if (ReconciliationManager.isFreebaseIdOrMid(r.identifierSpace)) { addSuggest = true; }