We have previously changed the standard-reconcile acre app to return mids, but we still need to make sure its metadata says that its identifier space is mid, not id. And we need Refine to test for the mid identifier space as well.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1479 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-10-13 18:33:27 +00:00
parent 6e71e1ba76
commit dc49047092
4 changed files with 17 additions and 9 deletions

View File

@ -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)) {

View File

@ -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) {

View File

@ -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"

View File

@ -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;
}