@redpencil/ember-rdfstore
v0.1.0
Published
Ember addon wrapping the rdfstore-js library.
Downloads
2
Readme
ember-rdfstore
rdfstore as an injectable Ember Service.
Installation
ember install ember-rdfstore
Usage
Inject the rdfstore
service and use it as you would use the rdfstore library. Except for the callback arguments which are implemented as Ember Promises.
export default Ember.Component.extend({
rdfstore: Ember.inject.service(),
actions: {
load(ttl) {
this.get('rdfstore').load('text/turtle', ttl, 'http://mu.semte.ch/application').then( (results) => {
...
});
}
}
The following methods are available on the rdfstore
service and will be proxied to the native store:
- clear(): Promise
- delete(): Promise
- execute(): Promise
- executeWithEnvironment(): Promise
- graph(): Promise
- insert(): Promise
- load(): Promise
- node(): Promise
Have a look at the in-code documentation of the rdfstore library that specifies the parameters of each method. The final callback
argument of each method is implemented as an Ember Promise by the rdfstore
service.
The native store from the rdfstore
library is directly accessible through rdfstore.content
.