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

Query languages based on framing #2

Open
mcollina opened this issue Jul 18, 2013 · 3 comments
Open

Query languages based on framing #2

mcollina opened this issue Jul 18, 2013 · 3 comments

Comments

@mcollina
Copy link
Collaborator

It might be very possible to build a query language on top of JSON-LD framing, as suggested by @lanthaler:

Have a look at my playground: http://www.markus-lanthaler.com/jsonld/playground/

And click on the "Library" example at the top. Then make sure that the
"Framed" tab is selected. If you look at the input document on the left side
you'll see that the data isn't nested at all, the result however is. This is
done according the specified frame on the right hand side.

In my implementation you can also filter by @id, e.g., so if you would have
multiple libraries, you could select the one you are interested in.

There's no documentation for this right now but maybe looking at my
implementation helps!? The interesting parts are in the nodeMatchesFrame
method: https://github.com/lanthaler/JsonLD/blob/master/Processor.php#L2278

It still needs a bit of love and doesn't handle certain things yet (lists,
reverse properties) but you should get the idea. Probably it's much easier
to implement in LevelGraph since you can query more easily over triples.
Dunno. Unfortunately I don't have the time right now to get my hands dirty
but I can at least answer questions you may have :-P

The other resource you might wanna look at are the framing tests: https://github.com/json-ld/json-ld.org/tree/master/test-suite/tests

I do not pass all the tests since I modified some behavior, most of my
modifications are described here

@elf-pavlik
Copy link
Member

little more information on framing with another example from Markus Lanthaler
http://lists.w3.org/Archives/Public/public-rdfjs/2013Dec/0033.html

@elf-pavlik
Copy link
Member

Looks like I really need it now! Will try to tackle it in next days 😄

I need to get nested/embeded objects like
https://github.com/elf-pavlik/webprofiled/blob/master/test/fixtures/perpetual-tripper/index.json

To render them in views like
https://github.com/elf-pavlik/webprofiled/blob/master/views/profile.hbs

Or later some smarter RDFa rendering, possibly similar to https://github.com/bergie/VIE/blob/master/src/service/RdfaService.js

@elf-pavlik elf-pavlik self-assigned this Jan 9, 2015
@mcollina
Copy link
Collaborator Author

mcollina commented Jan 9, 2015

whoaaa!! Super, I am eager to see how it plays out!

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

No branches or pull requests

2 participants