You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/12/27 12:01:49 UTC

[jira] [Commented] (JENA-632) Generate JSON from SPARQL directly.

    [ https://issues.apache.org/jira/browse/JENA-632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15072118#comment-15072118 ] 

ASF GitHub Bot commented on JENA-632:
-------------------------------------

GitHub user kinow opened a pull request:

    https://github.com/apache/jena/pull/114

    JENA-632: Generate JSON from SPARQL directly

    This pull request contains code for [JENA-632](https://issues.apache.org/jira/browse/JENA-632). The original work is still in a branch in [my fork of Jena](https://github.com/apache/jena/compare/master...kinow:JENA-632). It has been updated after the work on Jena 3 (mainly package renaming). And the web layer has been implemented in fuseki 2, but not backported to fuseki 1.
    
    Besides reviewing the code, the follow steps can be used to quickly test the code.
    
    * Start Fuseki (debug in Eclipse after checking out this branch, for example)
    * Load the books.ttl from fuseki1/Data directory
    * Query with something as
    
    ```
    PREFIX purl: <http://purl.org/dc/elements/1.1/>
    PREFIX w3: <http://www.w3.org/2001/vcard-rdf/3.0#> 
    PREFIX : <http://example.org/book/> 
    
    JSON {
    "author": ?author, 
    "title": ?title 
    }
    WHERE 
    {
    ?book purl:creator ?author .
    ?book purl:title ?title . 
    FILTER (?author = 'J.K. Rowling')
    }
    ```
    
    Which follows the syntax proposed in the issue in JIRA.
    
    I am still reviewing the code after porting to the new code base, but an extra pair of eyes reviewing it is always welcome! :grin: 
    
    ps: the SPARQL editor may need some tweaking to support the new syntax
    
    ps2: tried to change the key name in the JSON query but it didn't work. Will try to update the PR if that's really a bug in the code in the next days

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kinow/jena JENA-632-2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/jena/pull/114.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #114
    
----
commit 0049f2abcb757c9a190e0017d9369583f4eebf93
Author: Bruno P. Kinoshita <br...@yahoo.com.br>
Date:   2015-12-27T10:51:24Z

    JENA-632: Generate JSON from SPARQL directly

----


> Generate JSON from SPARQL directly.
> -----------------------------------
>
>                 Key: JENA-632
>                 URL: https://issues.apache.org/jira/browse/JENA-632
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: ARQ, Fuseki
>            Reporter: Andy Seaborne
>            Assignee: Bruno P. Kinoshita
>            Priority: Minor
>              Labels: java, javacc
>
> The capability to generate JSON directly from a SPARQL (or extended SPARQL) query would enable the creation of JSON data API over published linked data.
> This project would cover:
> # Design and publication of a design.
> # Refinement of design based on community feed
> # Implementation, including testing.
> # Refinement of implementation based on community feed
> Skills required: Java, some parser work, design and discussion with the user community, basic understanding of HTTP and content negotiation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)