Ask Freebase Suggest to fetch expected type - fixes #646
- get Suggest to fetch the expected type of property and save it so that constraints and other operations work correctly
This commit is contained in:
parent
d4cef3e2c5
commit
b33c6cc0fd
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
Copyright 2010, Google Inc.
|
Copyright 2010,2012 Google Inc. and other contributors
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
@ -139,7 +139,9 @@ ExtendDataPreviewDialog.prototype._show = function(properties) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var suggestConfig = {
|
var suggestConfig = {
|
||||||
filter: '(all type:/type/property)'
|
filter: '(all type:/type/property)',
|
||||||
|
// Default returns id, lang, mid, name, notable {id,name}, score
|
||||||
|
mql_output : JSON.stringify({'name':null,'id':null,'mid':null, '/type/property/expected_type':{'name':null,'id':null}}),
|
||||||
};
|
};
|
||||||
if ((this._column.reconConfig) && (this._column.reconConfig.type)) {
|
if ((this._column.reconConfig) && (this._column.reconConfig.type)) {
|
||||||
suggestConfig.filter = '(all type:/type/property (any namespace:/type/object namespace:' + this._column.reconConfig.type.id + '))';
|
suggestConfig.filter = '(all type:/type/property (any namespace:/type/object namespace:' + this._column.reconConfig.type.id + '))';
|
||||||
@ -149,10 +151,7 @@ ExtendDataPreviewDialog.prototype._show = function(properties) {
|
|||||||
self._addProperty({
|
self._addProperty({
|
||||||
id : data.id,
|
id : data.id,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
expected: {
|
expected: data["/type/property/expected_type"]
|
||||||
id: "/type/object",
|
|
||||||
name: "Object"
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user