bergie / VIE

Semantic Interaction Framework for JavaScript
http://viejs.org/
MIT License
303 stars 56 forks source link

Add Queryable Deferred API and implement StanbolService.query method #64

Open szabyg opened 12 years ago

szabyg commented 12 years ago

http://dev.iks-project.eu:8081/entityhub/query describes the field query API of stanbol which would be useful for frontend developers and qould be implemented in a more or less backend-independent manner. One could write:

var v = new VIE();
v.use(
    new v.StanbolService({
        url: "http://dev.iks-project.eu/stanbolfull",
        proxyDisabled: true
    })
);
v.query({
    select: [
        "rdfs:label", 
        "population"
    ],
    fieldQuery: {
        "rdfs:label": "mongolia*",
        "@type": "schema:Country"
    }
}).using('stanbol').execute().done(function(entities) {
    ...
});
neogermi commented 12 years ago

The question here is whether we want this as a VIE core functionality. I would say: Definitely! Here is the link to the API documentation