[Developers] List Of Properties
Warren Harris
warren at metaweb.com
Wed Jul 9 17:37:27 UTC 2008
On Jul 8, 2008, at 5:40 PM, Jason Douglas wrote:
> So if you do your query for '/guid/9202a8c04000641f80000000002eb15e',
> which is the movie 'Hard Eight', there's no evidence of the Character
> property of Film Performance in the MQL response because while there
> are several CVT instances with the Actor property filled-in, none have
> the Character property set.
>
> Interestingly enough, though, in the course of looking for an example
> I found that freebase.com seems to have the same issue (no Character
> column):
> http://www.freebase.com/view/guid/9202a8c04000641f80000000002eb15e
It occurred to me that you can get the schema information for cvt
properties with this all-in-one query at the same time you get
everything else (whether or not the object in question has values for
those properties) by requesting more from the expected_type clauses.
Unfortunately, this means your application has to look in 2 places in
the result to know what/how to display -- first in the property's
expected_type's properties (for cvt schema), and then in the
property's links' target's any_master/any_value for whether or not
there are values of these cvt properties (yeah... don't try this at
home):
{
"id":"/guid/9202a8c04000641f80000000002eb15e",
"type":[{
"id|=":["/film/film"],
"name":null,
"guid":null,
"properties":[{
"optional":true,
"id":null, "name":null,
"index" : null, "sort":"index",
"expected_type":{
"id": null, "name":null, "guid":null,
"properties":[{
"id":null, "name":null,
"index" : null, "sort":"index",
"optional":true,
"/freebase/property_hints/disambiguator":true
}]
},
"o:links":[{
"source": {"id": "/guid/
9202a8c04000641f80000000002eb15e","limit":0},
"target_value":null,
"target":{
"id":null, "guid":null, "name":null,
"/type/reflect/any_master":[{
"name":null, "id":null, "guid":null,
"link":{"master_property":{
"/freebase/property_hints/
disambiguator":true,
"/type/property/expected_type":null,
"id":null, "name":null},
"target": {"id": "/guid/
9202a8c04000641f80000000002eb15e","optional":"forbidden"}},
"optional":true
}],
"/type/reflect/any_value":[{
"value":null, "type":null,
"link":{"master_property":{
"/freebase/property_hints/
disambiguator":true,
"/type/property/expected_type":null,
"id":null, "name":null},
"target": {"id": "/guid/
9202a8c04000641f80000000002eb15e","optional":"forbidden"}},
"optional":true
}],
"optional":true
},
"limit":10,
"optional":true
}],
"master_property":{
"id":null, "name":null,
"expected_type":{
"id": null, "name":null, "guid":null,
"properties":[{
"id":null, "name":null,
"index" : null, "sort":"index",
"optional":true,
"/freebase/property_hints/disambiguator":true
}]
},
"i:links":[{
"target": {"id": "/guid/
9202a8c04000641f80000000002eb15e","limit":0},
"target_value":null,
"source":{
"name":null, "id":null, "guid":null,
"/type/reflect/any_master":[{
"name":null, "id":null, "guid":null,
"link":{"master_property":{
"/freebase/property_hints/
disambiguator":true,
"/type/property/expected_type":null,
"id":null, "name":null},
"target": {"id": "/guid/
9202a8c04000641f80000000002eb15e","optional":"forbidden"}},
"optional":true
}],
"/type/reflect/any_value":[{
"value":null, "type":null,
"link":{"master_property":{
"/freebase/property_hints/
disambiguator":true,
"/type/property/expected_type":null,
"id":null, "name":null}},
"optional":true
}],
"optional":true
},
"limit":10,
"optional":true
}]
}
}]
}]
}
(not sure, but maybe I need additional "master_properties" clauses in
there too?)
Warren
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3739 bytes
Desc: not available
Url : http://lists.freebase.com/pipermail/developers/attachments/20080709/6f10def7/attachment.bin
More information about the Developers
mailing list