简体   繁体   中英

List all Freebase Domains with MQL query or API call

I would like to develop a Freebase java application that lets you browse Freebase. I thought a good starting point would be to mimic the Freebase Schema Explorer and allow the user of my app to "drill down" through Domains, Types in a Domain, then Instances in a Type. Can someone please assist in how you retrieve a List of domains? Then a list in that domain? etc... The user can then select a domain and i would like to preset a list of types within that domain and so on until they have found the entry or entries they are investigating.

MQL for domains:

[{
    "id":   null,
    "name": null,
    "type": "/type/domain",
    "!/freebase/domain_category/domains": {
        "id": "/category/commons"
    }
}]​

The "!/freebase/domain_category/domains" clause in there is to restrict things to just the Commons (official) domains - otherwise you get the domain which is automatically created for every user and probably isn't what you're after.

Types in a domain:

[{
    "id":     null,
    "name":   null,
    "type":   "/type/type",
    "domain": "/cvg"
}]​

Replace "/cvg" as appropriate.

Instances of a type:

[{
    "id":   null,
    "name": null,
    "type": "/cvg/computer_videogame"
}]​

Replace "/cvg/computer_videogame" as appropriate.

This should at least get you started.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM