Re: svn commit: r1696184 - /jena/site/trunk/content/documentation/query/construct-quad.mdtext

2015-08-17 Thread Ying Jiang
Hi Qihong,

You can improve the doc:
1)  The grammar table collapses. I can see a "|" in the first row,
which needs to be escaped. Also, a table header is required.
2) All of the special symbols (e.g. code, string, expression ) should
be marked. You can refer to other docs in Jena website, e.g
property_paths.html
3) Add possible links in the doc, e.g. Fuseki (doc),
ExampleConstructQuads.javad(code)
4) some indent problems in the code fragment
5) Add ARQ documentation index at the end of the page, just like the
other ARQ docs.

Last but not least, make sure make changes based on the latest source
doc in svn (Andy modified it):
http://svn.apache.org/repos/asf/jena/site/trunk/content/documentation/query/construct-quad.mdtext

Best regards,
Ying Jiang


On Mon, Aug 17, 2015 at 4:52 PM, Andy Seaborne  wrote:
> On 17/08/15 00:36, jpz6311...@apache.org wrote:
>>
>> Author: jpz6311whu
>> Date: Sun Aug 16 23:36:58 2015
>> New Revision: 1696184
>>
>> URL: http://svn.apache.org/r1696184
>> Log:
>> compose doc for construct-quad.mdtext
>>
>> Modified:
>>  jena/site/trunk/content/documentation/query/construct-quad.mdtext
>
>
> Please check when making changes.
>
> The generated page was blank.
>
> I have fixed this (it seems that converting the content to UTF-8 did the
> trick) as well as some formatting issues I noticed.  I do not promise all
> formatting issues are fixed.
>
> Andy
>


Re: Fwd: Final Deliveries of GSoC Project (JENA-491)

2015-08-17 Thread Andy Seaborne

On 17/08/15 16:10, Andy Seaborne wrote:

I've pushed PR91 to the JENA-491-construct-quads branch.  Let's consider
the is working baseline for code.

  ^^
  this as the



 Andy




Re: Fwd: Final Deliveries of GSoC Project (JENA-491)

2015-08-17 Thread Andy Seaborne
I've pushed PR91 to the JENA-491-construct-quads branch.  Let's consider 
the is working baseline for code.


Andy


[jira] [Commented] (JENA-491) Extend CONSTRUCT to build quads

2015-08-17 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on JENA-491:
--

Commit bdb1101e53883634e9660eb214d3442cc0c74c28 in jena's branch 
refs/heads/JENA-491-construct-quads from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=bdb1101 ]

Merge commit 'refs/pull/89/head' of github.com:apache/jena into 
JENA-491-construct-quads


> Extend CONSTRUCT to build quads
> ---
>
> Key: JENA-491
> URL: https://issues.apache.org/jira/browse/JENA-491
> Project: Apache Jena
>  Issue Type: Improvement
>  Components: ARQ, Fuseki
>Reporter: Andy Seaborne
>  Labels: gsoc, gsoc2015, java, linked_data, rdf, sparql
>
> This would be an extension to SPARQL.
> 1/ Add use of GRAPH inside a CONSTRUCT template see SPARQL Update.
> 2/ Add conneg for quads to Fuseki.
> 3/ New QueryExecution operations execConstructQuads() and 
> execConstructDataset()
> If asked for triples, and the CONSTRUCT generates quads, the named graph 
> items are dropped - that is, only the default graph is returned.  This is for 
> commonality with RIOT.



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


[jira] [Commented] (JENA-959) riot: gzip output option

2015-08-17 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on JENA-959:
--

Commit 43efe529cb99aeaca6e94e91ac819e5ce4c20c2c in jena's branch 
refs/heads/JENA-491-construct-quads from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=43efe52 ]

JENA-959 : Add --compress.

> riot: gzip output option
> 
>
> Key: JENA-959
> URL: https://issues.apache.org/jira/browse/JENA-959
> Project: Apache Jena
>  Issue Type: New Feature
>  Components: RIOT
>Reporter: Stian Soiland-Reyes
>Assignee: Andy Seaborne
>Priority: Trivial
> Fix For: Jena 3.0.1
>
> Attachments: Jena-959-example.patch
>
>
> The riot command line tool supports incoming file formats like *.ttl.gz, but 
> there is no (obvious) way to also output in compressed formats.
> This can of course also be achieved with piping and gzip, but that is easily 
> platform-specific. Writing *.format.gz with the command line is probably as 
> much within remit of someone using riot on the command line as for reading 
> those.
> So my suggestion is to support extension .gz in the various --output options 
> to enabled outputting via a GzipOutputStream -- 
> http://docs.oracle.com/javase/7/docs/api/java/util/zip/GZIPOutputStream.html
> For example:
> {code}
> stain@biggie-utopic:~/Downloads$ riot --output=nquads.gz 
> chembl_20.0_target_targetcmpt_ls.ttl.gz 
> Not recognized as an RDF language : 'nquads.gz'
> {code}



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


[jira] [Commented] (JENA-491) Extend CONSTRUCT to build quads

2015-08-17 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on JENA-491:
--

Commit d828c378a8d75595b05607bb1688b106c56930e3 in jena's branch 
refs/heads/JENA-491-construct-quads from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=d828c37 ]

Merge commit 'refs/pull/91/head' of github.com:apache/jena into 
JENA-491-construct-quads


> Extend CONSTRUCT to build quads
> ---
>
> Key: JENA-491
> URL: https://issues.apache.org/jira/browse/JENA-491
> Project: Apache Jena
>  Issue Type: Improvement
>  Components: ARQ, Fuseki
>Reporter: Andy Seaborne
>  Labels: gsoc, gsoc2015, java, linked_data, rdf, sparql
>
> This would be an extension to SPARQL.
> 1/ Add use of GRAPH inside a CONSTRUCT template see SPARQL Update.
> 2/ Add conneg for quads to Fuseki.
> 3/ New QueryExecution operations execConstructQuads() and 
> execConstructDataset()
> If asked for triples, and the CONSTRUCT generates quads, the named graph 
> items are dropped - that is, only the default graph is returned.  This is for 
> commonality with RIOT.



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


[jira] [Commented] (JENA-491) Extend CONSTRUCT to build quads

2015-08-17 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on JENA-491:
--

Commit 5aa889c7113493c5b8ef6449d8b3d1ce57f5f1f4 in jena's branch 
refs/heads/JENA-491-construct-quads from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=5aa889c ]

Merge branch 'master' into JENA-491-construct-quads


> Extend CONSTRUCT to build quads
> ---
>
> Key: JENA-491
> URL: https://issues.apache.org/jira/browse/JENA-491
> Project: Apache Jena
>  Issue Type: Improvement
>  Components: ARQ, Fuseki
>Reporter: Andy Seaborne
>  Labels: gsoc, gsoc2015, java, linked_data, rdf, sparql
>
> This would be an extension to SPARQL.
> 1/ Add use of GRAPH inside a CONSTRUCT template see SPARQL Update.
> 2/ Add conneg for quads to Fuseki.
> 3/ New QueryExecution operations execConstructQuads() and 
> execConstructDataset()
> If asked for triples, and the CONSTRUCT generates quads, the named graph 
> items are dropped - that is, only the default graph is returned.  This is for 
> commonality with RIOT.



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


Re: Fwd: Final Deliveries of GSoC Project (JENA-491)

2015-08-17 Thread Andy Seaborne
Thanks for the clarification.  I had made a combined version to start 
testing and hopefully it's a close approximation of the intended 
deliverables.


[ Ying - how's your testing going? ]

A few things about the pull requests so far:

0/ More tests in TestQuery in Fuseki:

For example, this should show up:

1/ QueryEngineHttp.execConstructDataset is not implemented.


2/ SPARQL_Query:

This line

   if ( ! rdfMediaType.getType().equals("*") ) {

means that only "Accept: *" will trigger dataset results.

then in ResponseDataset

MediaType i = ConNeg.chooseContentType(request, DEF.quadsOffer, 
DEF.acceptNQuads) ;


will always choose TriG because the accept is "*" ("output=" works but 
that is overriding content negotiation).


There is no way to ask for a specific syntax (n-quads, trig, JSON-LD) 
using "Accept:"


e.g. "Accept: application/n-quads"


3/ ResponseDataset is copy of ResponseModel yet the only differences 
(after reformatting) are different data values and


 < RDFDataMgr.write(out, dataset, lang) ;
 ---
 > RDFDataMgr.write(out, model, lang) ;

It is not good to have copied code because it makes maintenance harder.



(2) and (3) can be addressed by

A/ SPARQL_Query:

For CONSTRUCT, always work in datasets; execConstructDataset().
No need for mention of Models.  if it's a triples CONSTRUCT, treating as 
a dataset will simply put the results in to the default graph.


QueryExecutionBase::execConstructQuads

Following on from that, treating datasets as a natural extension of 
models.  There is no need to test for extended syntax.  If it's strict 
SPARQL 1.1, a dataset will just have only a default graph.



B/ Content negotiate for a combined DEF.rdfOffer+DEF.quadsOffer (I don't 
underatand DEF.pureRdfOffer -- N-triples is a standard).


C/ If it's a triple format (test the Lang),

   RDFDataMgr.write(out, dataset.getDefaultModel(), lang) ;
otherwise:
   RDFDataMgr.write(out, dataset, lang) ;


Andy


Re: Fwd: Final Deliveries of GSoC Project (JENA-491)

2015-08-17 Thread Qihong Lin
Hi Andy,

Let me clarify PR 89 and PR 91:

PR 89: confidencesun/jena/master -> apache/jena/master
confidencesun/jena/master contains the commits of the 1st half part of
the project. It only involves jena/arq.

PR 91: confidencesun/jena/JENA-491 -> apache/jena/JENA-491-construct-quad
confidencesun/jena/JENA-491 contains the commits of 1st and 2nd parts
of the project, i.e. that's everything.
Because the 2nd part of Fuseki support depends on the 1st part, so I
merged confidencesun/jena/master into confidencesun/jena/JENA-491 in
the first place, and then added the Fuseki support.
** If confidencesun/jena/JENA-491 contains only the commits of the 2nd
part, the java maven projects won't compile. **

If you want to check only the 2nd part, just compare
confidencesun/jena/master with confidencesun/jena/JENA-491, like this:
https://github.com/confidencesun/jena/compare/master...confidencesun:JENA-491
You can see that, there're 5 changed files, touching both arq and fuseki:
In jena-arq (client side of the Fuseki support): QueryEngineHTTP.java
( implement execQuads() and execConstructDataset())
In jena-fuseki-core (sever side): DEF.java, ResponseDataset.java,
SPARQL_Query.java, TestQuery.java
The implementation of the 2nd part is not complex. I don't see much
code that is necessary to be tested. I'll see what I can do with the
tests of "different MIME types for the content negotiation". Thanks!

Finally, PR 91 contains everything to be merged into
apache/jena/master, and PR 89 can be ignored. Or, you can merge PR 89,
and then go with PR 91.

Hope it's clear.

regards,
Qihong

On Sun, Aug 16, 2015 at 9:14 PM, Andy Seaborne  wrote:
> Hi - there are some problems with PR 91.
>
> PR 91 contains changes to jena-arq as well as jena-fuseki-core. Does PR 91
> replace PR 89 or does PR 91 contain some out-of-date update now in PR 89? Or
> something else?
>
> (
> Line 1 of PR 91 as a diff is:
> diff --git a/jena-arq/Grammar/arq.jj b/jena-arq/Grammar/arq.jj
> )
>
> Please produce a PR which is only the changes to fuseki, and should eb
> applied after the ARQ changes.
>
> Also: I can only see one new test in TestQuery.java - I was expecting more
> such as using different MIME types for the content negotiation.
>
> Andy
>
>
> On 15/08/15 10:21, Qihong Lin wrote:
>>
>> Hi,
>>
>> Please check my updates of the 3 tasks blow:
>>
>> 1) jena/arq: in master branch (to be merged first)
>> In PR 89, I added some more tests in TestAPI and TS_Script. The bug of
>> construct quad projection on exeConstructTriples() has been fixed,
>> with the tests of 4 cases (commit 03a321f).
>>
>> 2) jena/fuseki: in JENA-491 branch
>> In PR 91, see commit 0eb28d8. You can try out
>>
>> org.apache.jena.fuseki.TestQuery.query_construct_01()/query_construct_quad_01()
>>
>> 3) doc: in jena web page (wiki)
>> I can see the staging page [1]. But when I try the "Improve this Page"
>> with [1], it redirects me to [2]. I can not find construct_quad.mdtext
>> under [2]. I also try to open [3], with "Not Found" error. Could you
>> help me please?
>>
>> regards,
>> Qihong
>>
>> [1] http://jena.staging.apache.org/documentation/query/construct-quad.html
>> [2] https://cms.apache.org/jena/wc/edit/anonymous-LWMAVL/trunk/
>> [3] http://jena.apache.org/documentation/query/construct-quad.html
>
>
>


Re: svn commit: r1696184 - /jena/site/trunk/content/documentation/query/construct-quad.mdtext

2015-08-17 Thread Andy Seaborne

On 17/08/15 00:36, jpz6311...@apache.org wrote:

Author: jpz6311whu
Date: Sun Aug 16 23:36:58 2015
New Revision: 1696184

URL: http://svn.apache.org/r1696184
Log:
compose doc for construct-quad.mdtext

Modified:
 jena/site/trunk/content/documentation/query/construct-quad.mdtext


Please check when making changes.

The generated page was blank.

I have fixed this (it seems that converting the content to UTF-8 did the 
trick) as well as some formatting issues I noticed.  I do not promise 
all formatting issues are fixed.


Andy