Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed section on RDF + added JSON-LD info #44

Merged
merged 3 commits into from
Dec 6, 2013

Conversation

elf-pavlik
Copy link
Member

i didn't see reference to JSON-LD so thought about adding it here...

  1. i would also like to add information how to use multiple extensions with the same database! (once i figure it out myself)
  2. add invitation to develop RDFa and Microdata extensions... conservative folks could also work on RDF/XML 😆 (of course Microdata wouldn't go under RDF)

@elf-pavlik
Copy link
Member Author

looks like i can use multiple extensions like that:

var levelgraph = require('levelgraph');
var lgN3 = require('levelgraph-n3');
var lgJSONLD = require('levelgraph-jsonld');

var db = lgJSONLD(lgN3(levelgraph('test')));

for more than two at the same time it may look weird, i quite like API used in express with .use()

var db = levelgraph('test');
db.use(lgN3());
db.use(lgJSONLD());

@mcollina
Copy link
Collaborator

mcollina commented Dec 1, 2013

Please, add the various suggestions inside the TODO section :).

As for the extension method, it's based on JS properties and it's the way
of levelup. I'm not really planning to change it, but the express use()
method is a nice API.
Moreover, I'd love to be more levelup-friendly and namespace levelgraph
inside a graph property of levelup (this would allow to have multilevel
support).

@elf-pavlik
Copy link
Member Author

does order of nesting extensions matter in any way?

var db = lgJSONLD(lgN3(lg('test')));
// gives same result as
var db = lgN3(lgJSONLD(lg('test')));

if so i'll just add this additional information to README for now...

@mcollina
Copy link
Collaborator

mcollina commented Dec 1, 2013

The order matter if an extension depend on another one: lgn3 and lgjsonld
are independent.

The extensions are nested in a prototype chain.

@elf-pavlik
Copy link
Member Author

@mcollina i don't have anything more to add here at this moment!

mcollina added a commit that referenced this pull request Dec 6, 2013
changed section on RDF + added JSON-LD info
@mcollina mcollina merged commit 8725478 into levelgraph:master Dec 6, 2013
@mcollina
Copy link
Collaborator

mcollina commented Dec 6, 2013

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants