@redpencil/ember-rdfstore

0.1.0 • Public • Published

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.

Package Sidebar

Install

npm i @redpencil/ember-rdfstore

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • windvis
  • nielsv
  • madnificent
  • cecemel
  • erikap
  • clairelovisa
  • highfive