You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Ying Jiang <jp...@gmail.com> on 2015/08/02 03:14:12 UTC
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Hi Qihong,
I re-checked the code you commited. Most of the hashCode issues for
arq.qparse that Andy pointed out are due to the incorrect
serialization of the Template. The code can only deal with the quads
with the same graph node, for which it may not always be the case in
practcial terms. Please make sure each example syntax file can pass
the checking process of arq.qparse.
It's August now. You'd better hurry up and make the project completed
on time in the remaining weeks.
Best regards,
Ying Jiang
On Thu, Jul 30, 2015 at 6:03 AM, Andy Seaborne <an...@apache.org> wrote:
> Output of
> * each examnple syntax file (the queries are nonsense in practcial terms!)
> * running arq.qparse on the file
> * notes on what seems to be going on
>
> Andy
>
> ======== File: syntax-quad-construct-01.arq
> PREFIX : <http://example/>
>
> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {}
> ==== Output of qparse --file syntax-quad-construct-01.arq
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH <http://example/g> {:s :p :o .}
> }
> WHERE
> { }
> ---- Issue:
> Minor: formatting of <http://example/g> should be :g
>
> ======== File: syntax-quad-construct-02.arq
> PREFIX : <http://example/>
>
> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o }
> ==== Output of qparse --file syntax-quad-construct-02.arq
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH ?g {?s ?p ?o .}
> }
> WHERE
> { ?s ?p ?o }
> ----
> OK
>
> ======== File: syntax-quad-construct-03.arq
> PREFIX : <http://example/>
>
> CONSTRUCT { :s :p :o } WHERE {}
> ==== Output of qparse --file syntax-quad-construct-03.arq
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .}
> }
> WHERE
> { }
> ---- Issue:
> Major: The output is contains "GRAPH <urn:x-arq:DefaultGraphNode>"
>
> Note: <urn:x-arq:DefaultGraphNode> is for internal use only.
>
> For syntax, that is a named graph just like <http://example/g>
>
> ======== File: syntax-quad-construct-04.arq
> PREFIX : <http://example/>
>
> CONSTRUCT {
> GRAPH ?g { :s :p :o }
> ?s ?p ?o
> }
> WHERE
> { GRAPH ?g { ?s ?p ?o } }
>
> ==== Output of qparse --file syntax-quad-construct-04.arq
>
> **** Check failure: reparsed query hashCode does not equal parsed input
> query
> Query (hashCode: 1768688961)=
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH ?g {:s :p :o .
> ?s ?p ?o .}
> }
> WHERE
> { GRAPH ?g
> { ?s ?p ?o }
> }
>
>
> Query2 (hashCode: 1896249441)=
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH ?g {:s :p :o .
> ?s ?p ?o .}
> }
> WHERE
> { GRAPH ?g
> { ?s ?p ?o }
> }
>
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH ?g {:s :p :o .
> ?s ?p ?o .}
> }
> WHERE
> { GRAPH ?g
> { ?s ?p ?o }
> }
> ---- Issue:
> The output puts the following triple into the GRAPH.
> See also syntax-quad-construct-08.arq
>
> ======== File: syntax-quad-construct-05.arq
> PREFIX : <http://example/>
>
> CONSTRUCT {
> ?s ?p ?o
> GRAPH ?g { :s :p :o }
> }
> WHERE
> { GRAPH ?g { ?s ?p ?o } }
>
> ==== Output of qparse --file syntax-quad-construct-05.arq
>
> **** Check failure: reparsed query hashCode does not equal parsed input
> query
> Query (hashCode: -262437683)=
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o .
> :s :p :o .}
> }
> WHERE
> { GRAPH ?g
> { ?s ?p ?o }
> }
>
>
> Query2 (hashCode: -399379987)=
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o .
> :s :p :o .}
> }
> WHERE
> { GRAPH ?g
> { ?s ?p ?o }
> }
>
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o .
> :s :p :o .}
> }
> WHERE
> { GRAPH ?g
> { ?s ?p ?o }
> }
> ---- Issue:
> Plain ?s ?p ?o has been put into a named graph
> Adjacent blocks have merged.
>
> ======== File: syntax-quad-construct-06.arq
> PREFIX : <http://example/>
>
> CONSTRUCT {
> GRAPH ?g { :s :p :o }
> ?s ?p ?o .
> ?s ?p ?o .
> GRAPH ?g { ?s ?p ?o }
> ?s ?p ?o .
> ?s ?p ?o
> GRAPH ?g { ?s ?p ?o }
> }
> WHERE
> { GRAPH ?g { ?s ?p ?o } }
>
> ==== Output of qparse --file syntax-quad-construct-06.arq
>
> **** Check failure: reparsed query hashCode does not equal parsed input
> query
> Query (hashCode: -1800516808)=
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH ?g {:s :p :o .
> ?s ?p ?o .
> ?s ?p ?o .
> ?s ?p ?o .
> ?s ?p ?o .
> ?s ?p ?o .
> ?s ?p ?o .}
> }
> WHERE
> { GRAPH ?g
> { ?s ?p ?o }
> }
>
>
> Query2 (hashCode: -129418312)=
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH ?g {:s :p :o .
> ?s ?p ?o .
> ?s ?p ?o .
> ?s ?p ?o .
> ?s ?p ?o .
> ?s ?p ?o .
> ?s ?p ?o .}
> }
> WHERE
> { GRAPH ?g
> { ?s ?p ?o }
> }
>
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH ?g {:s :p :o .
> ?s ?p ?o .
> ?s ?p ?o .
> ?s ?p ?o .
> ?s ?p ?o .
> ?s ?p ?o .
> ?s ?p ?o .}
> }
> WHERE
> { GRAPH ?g
> { ?s ?p ?o }
> }
> ---- Issue:
> Same as previous.
>
> ======== File: syntax-quad-construct-07.arq
> PREFIX : <http://example/>
>
> CONSTRUCT {
> GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .}
> }
> WHERE {}
>
> ==== Output of qparse --file syntax-quad-construct-07.arq
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .}
> }
> WHERE
> { }
> ---- Issue:
> Should be different. A named graph of GRAPH <urn:x-arq:DefaultGraphNode>
> is not the default graph.
>
> ======== File: syntax-quad-construct-08.arq
> PREFIX : <http://example/>
>
> CONSTRUCT {
> GRAPH ?g { :s :p :o }
> GRAPH ?g1 { :s :p :o }
> }
> WHERE
> { }
>
> ==== Output of qparse --file syntax-quad-construct-08.arq
>
> **** Check failure: reparsed query hashCode does not equal parsed input
> query
> Query (hashCode: 636900208)=
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH ?g {:s :p :o .
> :s :p :o .}
> }
> WHERE
> { }
>
>
> Query2 (hashCode: 636999583)=
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH ?g {:s :p :o .
> :s :p :o .}
> }
> WHERE
> { }
>
> PREFIX : <http://example/>
>
> CONSTRUCT
> { GRAPH ?g {:s :p :o .
> :s :p :o .}
> }
> WHERE
> { }
> ---- Issue:
> Adjacent GRAPH blocks have merged.
>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Andy Seaborne <an...@apache.org>.
On 13/08/15 06:28, Ying Jiang wrote:
> I just created an empty page of construct quad for Qihong:
> http://svn.apache.org/repos/asf/jena/site/trunk/content/documentation/query/construct-quad.mdtext
Now at:
http://jena.staging.apache.org/documentation/query/construct-quad.html
(note the mdtext -> html)
You can track progress by looking at the commits@jena list and looking
for the "buildbot". It polls svn and executes on change. I don't know
the polling frequency but, empirically, it also depends on how busy the
web site builder is overall.
When editting the site via the CMS web UI, don't forget to update
resources - otherwise you are working on the site as of when you lasted
logged into the CMS web UI.
Andy
>
> But it does not show neither in staging nor in releasing website. wait
> for a while to see what's going on.
>
> On Wed, Aug 12, 2015 at 6:14 PM, Qihong Lin <co...@gmail.com> wrote:
>> Hi,
>>
>> I modified the doc here, using the anonymous username:
>>
>> Index: trunk/content/documentation/query/index.mdtext
>> ===================================================================
>> --- trunk/content/documentation/query/index.mdtext (revision 1655891)
>> +++ trunk/content/documentation/query/index.mdtext (working copy)
>> @@ -46,6 +46,7 @@
>> - [Sub-SELECT](sub-select.html)
>> - [Negation](negation.html)
>> - [Conditions in FILTERs](function_forms.html)
>> +- [Construct quad](construct-quad.html)
>>
>>
>> I'd like to compose the construct quad documentation in the above new
>> "construct-quad.html". Could you tell me how to create a new wiki page
>> in jena website?
>>
>> regards,
>> Qihong
>>
>> On Tue, Aug 11, 2015 at 10:35 AM, Ying Jiang <jp...@gmail.com> wrote:
>>> Hi Qihong,
>>>
>>> You may have received the reminder email from Google that the final
>>> evaluation of the GSoC project is approaching. The "soft" deadline is
>>> 17 August, with the "hard" one on 21 August. It means there're only 2
>>> weeks left for your remaining work. The tests of arq need improving,
>>> as Andy points out. You can also deliver the Fuseki part in the other
>>> branch for review in the mean time. Meanwhile, the documentation can
>>> be composed in jena web page (wiki). In order to save time, I suggest
>>> the 3 parts of the work go on simultaneously:
>>> 1) jena/arq: in master branch (to be merged first)
>>> 2) jena/fuseki: in JENA-491 branch
>>> 3) doc: in jena web page (wiki)
>>>
>>> Best regards,
>>> Ying Jiang
>>>
>>>
>>> On Mon, Aug 10, 2015 at 9:58 PM, Andy Seaborne <an...@apache.org> wrote:
>>>> I've managed to integrate the latest updates.
>>>>
>>>> The scripted ones look, at first glance OK, but the data isn't very rich.
>>>>
>>>> Also, please can we have some API tests in "TestAPI". These are JUnit tests
>>>> in java. These should be have comprehensive coverage.
>>>>
>>>> I also tried out execConstructTriples(), I noticed that the result is from
>>>> all graphs. When just triples are asked for, only those in the default
>>>> graph should be returned. Template.getTriples calls Quad.asTriple. But it
>>>> needs to deal with just the default graph, and c can't rely on
>>>> Quad.asTriple.
>>>>
>>>> Andy
>>>>
>>>>
>>>> On 10/08/15 12:44, Qihong Lin wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I've enriched the syntax tests with "short form" and "default graph"
>>>>> cases.
>>>>>
>>>>> For execution tests, I add the test support in QueryTest for construct
>>>>> quad with the scripts files and data files in TRIG (see
>>>>> jena-arq/testing/ARQ/Construct/*.trig). I think construct quad should
>>>>> be part of the construct of ARQ. So I add the execution tests in
>>>>> jena-arq/testing/ARQ/Construct/manifest.ttl.
>>>>>
>>>>> The fuseki part of construct quad has been implemented (not committed
>>>>> yet). I'll submit the code as soon as the PR 89 [1] being merged.
>>>>> Anything to be improved for PR 89 from your reviews?
>>>>>
>>>>> regards,
>>>>> Qihong
>>>>>
>>>>> [1] https://github.com/apache/jena/pull/89
>>>>>
>>>>>
>>>>> On Thu, Aug 6, 2015 at 8:55 PM, Andy Seaborne <an...@apache.org> wrote:
>>>>>>
>>>>>> Hi - looking better - I see the syntax tests I provided.
>>>>>>
>>>>>> Does that set of tests cover all cases of the new syntax?
>>>>>>
>>>>>> Next, we need execution tests for ARQ.
>>>>>>
>>>>>>> There will need to be execute tests in jena-arq as well. These can be
>>>>>>> Junit tests in java and do not need to be external script files.
>>>>>>> This is separate from testing in Fuseki.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Do you have any other constraints on your time over the next 2 weeks?
>>>>>>
>>>>>> Andy
>>>>>>
>>>>>>
>>>>>> On 06/08/15 04:18, Qihong Lin wrote:
>>>>>>>
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I've fixed the bugs related to syntax checks. Please see my latest
>>>>>>> commits. Here're the output of the syntax files through qparse (you
>>>>>>> can also run "ExampleConstructQuads.java" to get the results). Are
>>>>>>> these with the expected behaviors, especially for
>>>>>>> "syntax-quad-construct-07.arq"?
>>>>>>>
>>>>>>> run-construct-quad-test: ======== File: syntax-quad-construct-01.arq
>>>>>>> PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of qparse
>>>>>>> --file syntax-quad-construct-01.arq PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH :g { :s :p :o .} } WHERE { } ======== File:
>>>>>>> syntax-quad-construct-02.arq PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ==== Output of
>>>>>>> qparse --file syntax-quad-construct-02.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o .} } WHERE { ?s ?p ?o } ========
>>>>>>> File: syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>>>>> syntax-quad-construct-04.arq PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g { ?s ?p
>>>>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>>>> PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . } WHERE { GRAPH ?g { ?s
>>>>>>> ?p ?o } } ======== File: syntax-quad-construct-05.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g { ?s ?p
>>>>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>>>> PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { ?s ?p ?o . GRAPH ?g { :s :p :o .} } WHERE { GRAPH ?g { ?s
>>>>>>> ?p ?o } } ======== File: syntax-quad-construct-06.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s
>>>>>>> ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE { GRAPH ?g
>>>>>>> { ?s ?p ?o } } ==== Output of qparse --file
>>>>>>> syntax-quad-construct-06.arq PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g {
>>>>>>> ?s ?p ?o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s ?p ?o .} } WHERE {
>>>>>>> GRAPH ?g { ?s ?p ?o } } ======== File:
>>>>>>> syntax-quad-construct-07.arq PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} } WHERE
>>>>>>> {} ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>>>>> : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>>>>> syntax-quad-construct-08.arq PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE { }
>>>>>>> ==== Output of qparse --file syntax-quad-construct-08.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} GRAPH ?g1 { :s :p :o .} } WHERE {
>>>>>>> }
>>>>>>>
>>>>>>> On Sun, Aug 2, 2015 at 9:14 AM, Ying Jiang <jp...@gmail.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Hi Qihong,
>>>>>>>>
>>>>>>>> I re-checked the code you commited. Most of the hashCode issues
>>>>>>>> for arq.qparse that Andy pointed out are due to the incorrect
>>>>>>>> serialization of the Template. The code can only deal with the
>>>>>>>> quads with the same graph node, for which it may not always be the
>>>>>>>> case in practcial terms. Please make sure each example syntax file
>>>>>>>> can pass the checking process of arq.qparse.
>>>>>>>>
>>>>>>>> It's August now. You'd better hurry up and make the project
>>>>>>>> completed on time in the remaining weeks.
>>>>>>>>
>>>>>>>> Best regards, Ying Jiang
>>>>>>>>
>>>>>>>> On Thu, Jul 30, 2015 at 6:03 AM, Andy Seaborne <an...@apache.org>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Output of * each examnple syntax file (the queries are nonsense
>>>>>>>>> in practcial terms!) * running arq.qparse on the file * notes on
>>>>>>>>> what seems to be going on
>>>>>>>>>
>>>>>>>>> Andy
>>>>>>>>>
>>>>>>>>> ======== File: syntax-quad-construct-01.arq PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of
>>>>>>>>> qparse --file syntax-quad-construct-01.arq PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH <http://example/g> {:s :p :o .} } WHERE { }
>>>>>>>>> ---- Issue: Minor: formatting of <http://example/g> should be :g
>>>>>>>>>
>>>>>>>>> ======== File: syntax-quad-construct-02.arq PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ====
>>>>>>>>> Output of qparse --file syntax-quad-construct-02.arq PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g {?s ?p ?o .} } WHERE { ?s ?p ?o } ---- OK
>>>>>>>>>
>>>>>>>>> ======== File: syntax-quad-construct-03.arq PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>>>>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>>>> WHERE { } ---- Issue: Major: The output is contains "GRAPH
>>>>>>>>> <urn:x-arq:DefaultGraphNode>"
>>>>>>>>>
>>>>>>>>> Note: <urn:x-arq:DefaultGraphNode> is for internal use only.
>>>>>>>>>
>>>>>>>>> For syntax, that is a named graph just like <http://example/g>
>>>>>>>>>
>>>>>>>>> ======== File: syntax-quad-construct-04.arq PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g {
>>>>>>>>> ?s ?p ?o } }
>>>>>>>>>
>>>>>>>>> ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>>>>>>
>>>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>>>> input query Query (hashCode: 1768688961)= PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>>>> ?s ?p ?o } }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Query2 (hashCode: 1896249441)= PREFIX : <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>>>> ?s ?p ?o } }
>>>>>>>>>
>>>>>>>>> PREFIX : <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>>>> ?s ?p ?o } } ---- Issue: The output puts the following triple
>>>>>>>>> into the GRAPH. See also syntax-quad-construct-08.arq
>>>>>>>>>
>>>>>>>>> ======== File: syntax-quad-construct-05.arq PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g {
>>>>>>>>> ?s ?p ?o } }
>>>>>>>>>
>>>>>>>>> ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>>>>>>
>>>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>>>> input query Query (hashCode: -262437683)= PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Query2 (hashCode: -399379987)= PREFIX : <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>>>>
>>>>>>>>> PREFIX : <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } } ---- Issue: Plain ?s ?p
>>>>>>>>> ?o has been put into a named graph Adjacent blocks have merged.
>>>>>>>>>
>>>>>>>>> ======== File: syntax-quad-construct-06.arq PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g
>>>>>>>>> { ?s ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE {
>>>>>>>>> GRAPH ?g { ?s ?p ?o } }
>>>>>>>>>
>>>>>>>>> ==== Output of qparse --file syntax-quad-construct-06.arq
>>>>>>>>>
>>>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>>>> input query Query (hashCode: -1800516808)= PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>>>> ?o } }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Query2 (hashCode: -129418312)= PREFIX : <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>>>> ?o } }
>>>>>>>>>
>>>>>>>>> PREFIX : <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>>>> ?o } } ---- Issue: Same as previous.
>>>>>>>>>
>>>>>>>>> ======== File: syntax-quad-construct-07.arq PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>>>> WHERE {}
>>>>>>>>>
>>>>>>>>> ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>>>>>>> : <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>>>> WHERE { } ---- Issue: Should be different. A named graph of
>>>>>>>>> GRAPH <urn:x-arq:DefaultGraphNode> is not the default graph.
>>>>>>>>>
>>>>>>>>> ======== File: syntax-quad-construct-08.arq PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE
>>>>>>>>> { }
>>>>>>>>>
>>>>>>>>> ==== Output of qparse --file syntax-quad-construct-08.arq
>>>>>>>>>
>>>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>>>> input query Query (hashCode: 636900208)= PREFIX :
>>>>>>>>> <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Query2 (hashCode: 636999583)= PREFIX : <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>>>>
>>>>>>>>> PREFIX : <http://example/>
>>>>>>>>>
>>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { } ----
>>>>>>>>> Issue: Adjacent GRAPH blocks have merged.
>>>>>>>>>
>>>>>>
>>>>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Ying Jiang <jp...@gmail.com>.
I just created an empty page of construct quad for Qihong:
http://svn.apache.org/repos/asf/jena/site/trunk/content/documentation/query/construct-quad.mdtext
But it does not show neither in staging nor in releasing website. wait
for a while to see what's going on.
On Wed, Aug 12, 2015 at 6:14 PM, Qihong Lin <co...@gmail.com> wrote:
> Hi,
>
> I modified the doc here, using the anonymous username:
>
> Index: trunk/content/documentation/query/index.mdtext
> ===================================================================
> --- trunk/content/documentation/query/index.mdtext (revision 1655891)
> +++ trunk/content/documentation/query/index.mdtext (working copy)
> @@ -46,6 +46,7 @@
> - [Sub-SELECT](sub-select.html)
> - [Negation](negation.html)
> - [Conditions in FILTERs](function_forms.html)
> +- [Construct quad](construct-quad.html)
>
>
> I'd like to compose the construct quad documentation in the above new
> "construct-quad.html". Could you tell me how to create a new wiki page
> in jena website?
>
> regards,
> Qihong
>
> On Tue, Aug 11, 2015 at 10:35 AM, Ying Jiang <jp...@gmail.com> wrote:
>> Hi Qihong,
>>
>> You may have received the reminder email from Google that the final
>> evaluation of the GSoC project is approaching. The "soft" deadline is
>> 17 August, with the "hard" one on 21 August. It means there're only 2
>> weeks left for your remaining work. The tests of arq need improving,
>> as Andy points out. You can also deliver the Fuseki part in the other
>> branch for review in the mean time. Meanwhile, the documentation can
>> be composed in jena web page (wiki). In order to save time, I suggest
>> the 3 parts of the work go on simultaneously:
>> 1) jena/arq: in master branch (to be merged first)
>> 2) jena/fuseki: in JENA-491 branch
>> 3) doc: in jena web page (wiki)
>>
>> Best regards,
>> Ying Jiang
>>
>>
>> On Mon, Aug 10, 2015 at 9:58 PM, Andy Seaborne <an...@apache.org> wrote:
>>> I've managed to integrate the latest updates.
>>>
>>> The scripted ones look, at first glance OK, but the data isn't very rich.
>>>
>>> Also, please can we have some API tests in "TestAPI". These are JUnit tests
>>> in java. These should be have comprehensive coverage.
>>>
>>> I also tried out execConstructTriples(), I noticed that the result is from
>>> all graphs. When just triples are asked for, only those in the default
>>> graph should be returned. Template.getTriples calls Quad.asTriple. But it
>>> needs to deal with just the default graph, and c can't rely on
>>> Quad.asTriple.
>>>
>>> Andy
>>>
>>>
>>> On 10/08/15 12:44, Qihong Lin wrote:
>>>>
>>>> Hi,
>>>>
>>>> I've enriched the syntax tests with "short form" and "default graph"
>>>> cases.
>>>>
>>>> For execution tests, I add the test support in QueryTest for construct
>>>> quad with the scripts files and data files in TRIG (see
>>>> jena-arq/testing/ARQ/Construct/*.trig). I think construct quad should
>>>> be part of the construct of ARQ. So I add the execution tests in
>>>> jena-arq/testing/ARQ/Construct/manifest.ttl.
>>>>
>>>> The fuseki part of construct quad has been implemented (not committed
>>>> yet). I'll submit the code as soon as the PR 89 [1] being merged.
>>>> Anything to be improved for PR 89 from your reviews?
>>>>
>>>> regards,
>>>> Qihong
>>>>
>>>> [1] https://github.com/apache/jena/pull/89
>>>>
>>>>
>>>> On Thu, Aug 6, 2015 at 8:55 PM, Andy Seaborne <an...@apache.org> wrote:
>>>>>
>>>>> Hi - looking better - I see the syntax tests I provided.
>>>>>
>>>>> Does that set of tests cover all cases of the new syntax?
>>>>>
>>>>> Next, we need execution tests for ARQ.
>>>>>
>>>>>> There will need to be execute tests in jena-arq as well. These can be
>>>>>> Junit tests in java and do not need to be external script files.
>>>>>> This is separate from testing in Fuseki.
>>>>>
>>>>>
>>>>>
>>>>> Do you have any other constraints on your time over the next 2 weeks?
>>>>>
>>>>> Andy
>>>>>
>>>>>
>>>>> On 06/08/15 04:18, Qihong Lin wrote:
>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I've fixed the bugs related to syntax checks. Please see my latest
>>>>>> commits. Here're the output of the syntax files through qparse (you
>>>>>> can also run "ExampleConstructQuads.java" to get the results). Are
>>>>>> these with the expected behaviors, especially for
>>>>>> "syntax-quad-construct-07.arq"?
>>>>>>
>>>>>> run-construct-quad-test: ======== File: syntax-quad-construct-01.arq
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of qparse
>>>>>> --file syntax-quad-construct-01.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH :g { :s :p :o .} } WHERE { } ======== File:
>>>>>> syntax-quad-construct-02.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ==== Output of
>>>>>> qparse --file syntax-quad-construct-02.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o .} } WHERE { ?s ?p ?o } ========
>>>>>> File: syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>>>> syntax-quad-construct-04.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g { ?s ?p
>>>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . } WHERE { GRAPH ?g { ?s
>>>>>> ?p ?o } } ======== File: syntax-quad-construct-05.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g { ?s ?p
>>>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { ?s ?p ?o . GRAPH ?g { :s :p :o .} } WHERE { GRAPH ?g { ?s
>>>>>> ?p ?o } } ======== File: syntax-quad-construct-06.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s
>>>>>> ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE { GRAPH ?g
>>>>>> { ?s ?p ?o } } ==== Output of qparse --file
>>>>>> syntax-quad-construct-06.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g {
>>>>>> ?s ?p ?o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s ?p ?o .} } WHERE {
>>>>>> GRAPH ?g { ?s ?p ?o } } ======== File:
>>>>>> syntax-quad-construct-07.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} } WHERE
>>>>>> {} ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>>>> : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>>>> syntax-quad-construct-08.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE { }
>>>>>> ==== Output of qparse --file syntax-quad-construct-08.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} GRAPH ?g1 { :s :p :o .} } WHERE {
>>>>>> }
>>>>>>
>>>>>> On Sun, Aug 2, 2015 at 9:14 AM, Ying Jiang <jp...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Hi Qihong,
>>>>>>>
>>>>>>> I re-checked the code you commited. Most of the hashCode issues
>>>>>>> for arq.qparse that Andy pointed out are due to the incorrect
>>>>>>> serialization of the Template. The code can only deal with the
>>>>>>> quads with the same graph node, for which it may not always be the
>>>>>>> case in practcial terms. Please make sure each example syntax file
>>>>>>> can pass the checking process of arq.qparse.
>>>>>>>
>>>>>>> It's August now. You'd better hurry up and make the project
>>>>>>> completed on time in the remaining weeks.
>>>>>>>
>>>>>>> Best regards, Ying Jiang
>>>>>>>
>>>>>>> On Thu, Jul 30, 2015 at 6:03 AM, Andy Seaborne <an...@apache.org>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Output of * each examnple syntax file (the queries are nonsense
>>>>>>>> in practcial terms!) * running arq.qparse on the file * notes on
>>>>>>>> what seems to be going on
>>>>>>>>
>>>>>>>> Andy
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-01.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of
>>>>>>>> qparse --file syntax-quad-construct-01.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <http://example/g> {:s :p :o .} } WHERE { }
>>>>>>>> ---- Issue: Minor: formatting of <http://example/g> should be :g
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-02.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ====
>>>>>>>> Output of qparse --file syntax-quad-construct-02.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {?s ?p ?o .} } WHERE { ?s ?p ?o } ---- OK
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-03.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>>>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>>> WHERE { } ---- Issue: Major: The output is contains "GRAPH
>>>>>>>> <urn:x-arq:DefaultGraphNode>"
>>>>>>>>
>>>>>>>> Note: <urn:x-arq:DefaultGraphNode> is for internal use only.
>>>>>>>>
>>>>>>>> For syntax, that is a named graph just like <http://example/g>
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-04.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g {
>>>>>>>> ?s ?p ?o } }
>>>>>>>>
>>>>>>>> ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>>>>>
>>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>>> input query Query (hashCode: 1768688961)= PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>>> ?s ?p ?o } }
>>>>>>>>
>>>>>>>>
>>>>>>>> Query2 (hashCode: 1896249441)= PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>>> ?s ?p ?o } }
>>>>>>>>
>>>>>>>> PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>>> ?s ?p ?o } } ---- Issue: The output puts the following triple
>>>>>>>> into the GRAPH. See also syntax-quad-construct-08.arq
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-05.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g {
>>>>>>>> ?s ?p ?o } }
>>>>>>>>
>>>>>>>> ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>>>>>
>>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>>> input query Query (hashCode: -262437683)= PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>>>
>>>>>>>>
>>>>>>>> Query2 (hashCode: -399379987)= PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>>>
>>>>>>>> PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } } ---- Issue: Plain ?s ?p
>>>>>>>> ?o has been put into a named graph Adjacent blocks have merged.
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-06.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g
>>>>>>>> { ?s ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE {
>>>>>>>> GRAPH ?g { ?s ?p ?o } }
>>>>>>>>
>>>>>>>> ==== Output of qparse --file syntax-quad-construct-06.arq
>>>>>>>>
>>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>>> input query Query (hashCode: -1800516808)= PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>>> ?o } }
>>>>>>>>
>>>>>>>>
>>>>>>>> Query2 (hashCode: -129418312)= PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>>> ?o } }
>>>>>>>>
>>>>>>>> PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>>> ?o } } ---- Issue: Same as previous.
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-07.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>>> WHERE {}
>>>>>>>>
>>>>>>>> ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>>>>>> : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>>> WHERE { } ---- Issue: Should be different. A named graph of
>>>>>>>> GRAPH <urn:x-arq:DefaultGraphNode> is not the default graph.
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-08.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE
>>>>>>>> { }
>>>>>>>>
>>>>>>>> ==== Output of qparse --file syntax-quad-construct-08.arq
>>>>>>>>
>>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>>> input query Query (hashCode: 636900208)= PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>>>
>>>>>>>>
>>>>>>>> Query2 (hashCode: 636999583)= PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>>>
>>>>>>>> PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { } ----
>>>>>>>> Issue: Adjacent GRAPH blocks have merged.
>>>>>>>>
>>>>>
>>>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Qihong Lin <co...@gmail.com>.
Hi,
I modified the doc here, using the anonymous username:
Index: trunk/content/documentation/query/index.mdtext
===================================================================
--- trunk/content/documentation/query/index.mdtext (revision 1655891)
+++ trunk/content/documentation/query/index.mdtext (working copy)
@@ -46,6 +46,7 @@
- [Sub-SELECT](sub-select.html)
- [Negation](negation.html)
- [Conditions in FILTERs](function_forms.html)
+- [Construct quad](construct-quad.html)
I'd like to compose the construct quad documentation in the above new
"construct-quad.html". Could you tell me how to create a new wiki page
in jena website?
regards,
Qihong
On Tue, Aug 11, 2015 at 10:35 AM, Ying Jiang <jp...@gmail.com> wrote:
> Hi Qihong,
>
> You may have received the reminder email from Google that the final
> evaluation of the GSoC project is approaching. The "soft" deadline is
> 17 August, with the "hard" one on 21 August. It means there're only 2
> weeks left for your remaining work. The tests of arq need improving,
> as Andy points out. You can also deliver the Fuseki part in the other
> branch for review in the mean time. Meanwhile, the documentation can
> be composed in jena web page (wiki). In order to save time, I suggest
> the 3 parts of the work go on simultaneously:
> 1) jena/arq: in master branch (to be merged first)
> 2) jena/fuseki: in JENA-491 branch
> 3) doc: in jena web page (wiki)
>
> Best regards,
> Ying Jiang
>
>
> On Mon, Aug 10, 2015 at 9:58 PM, Andy Seaborne <an...@apache.org> wrote:
>> I've managed to integrate the latest updates.
>>
>> The scripted ones look, at first glance OK, but the data isn't very rich.
>>
>> Also, please can we have some API tests in "TestAPI". These are JUnit tests
>> in java. These should be have comprehensive coverage.
>>
>> I also tried out execConstructTriples(), I noticed that the result is from
>> all graphs. When just triples are asked for, only those in the default
>> graph should be returned. Template.getTriples calls Quad.asTriple. But it
>> needs to deal with just the default graph, and c can't rely on
>> Quad.asTriple.
>>
>> Andy
>>
>>
>> On 10/08/15 12:44, Qihong Lin wrote:
>>>
>>> Hi,
>>>
>>> I've enriched the syntax tests with "short form" and "default graph"
>>> cases.
>>>
>>> For execution tests, I add the test support in QueryTest for construct
>>> quad with the scripts files and data files in TRIG (see
>>> jena-arq/testing/ARQ/Construct/*.trig). I think construct quad should
>>> be part of the construct of ARQ. So I add the execution tests in
>>> jena-arq/testing/ARQ/Construct/manifest.ttl.
>>>
>>> The fuseki part of construct quad has been implemented (not committed
>>> yet). I'll submit the code as soon as the PR 89 [1] being merged.
>>> Anything to be improved for PR 89 from your reviews?
>>>
>>> regards,
>>> Qihong
>>>
>>> [1] https://github.com/apache/jena/pull/89
>>>
>>>
>>> On Thu, Aug 6, 2015 at 8:55 PM, Andy Seaborne <an...@apache.org> wrote:
>>>>
>>>> Hi - looking better - I see the syntax tests I provided.
>>>>
>>>> Does that set of tests cover all cases of the new syntax?
>>>>
>>>> Next, we need execution tests for ARQ.
>>>>
>>>>> There will need to be execute tests in jena-arq as well. These can be
>>>>> Junit tests in java and do not need to be external script files.
>>>>> This is separate from testing in Fuseki.
>>>>
>>>>
>>>>
>>>> Do you have any other constraints on your time over the next 2 weeks?
>>>>
>>>> Andy
>>>>
>>>>
>>>> On 06/08/15 04:18, Qihong Lin wrote:
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> I've fixed the bugs related to syntax checks. Please see my latest
>>>>> commits. Here're the output of the syntax files through qparse (you
>>>>> can also run "ExampleConstructQuads.java" to get the results). Are
>>>>> these with the expected behaviors, especially for
>>>>> "syntax-quad-construct-07.arq"?
>>>>>
>>>>> run-construct-quad-test: ======== File: syntax-quad-construct-01.arq
>>>>> PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of qparse
>>>>> --file syntax-quad-construct-01.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH :g { :s :p :o .} } WHERE { } ======== File:
>>>>> syntax-quad-construct-02.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ==== Output of
>>>>> qparse --file syntax-quad-construct-02.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o .} } WHERE { ?s ?p ?o } ========
>>>>> File: syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>>> syntax-quad-construct-04.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g { ?s ?p
>>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>> PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . } WHERE { GRAPH ?g { ?s
>>>>> ?p ?o } } ======== File: syntax-quad-construct-05.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g { ?s ?p
>>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>> PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { ?s ?p ?o . GRAPH ?g { :s :p :o .} } WHERE { GRAPH ?g { ?s
>>>>> ?p ?o } } ======== File: syntax-quad-construct-06.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s
>>>>> ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE { GRAPH ?g
>>>>> { ?s ?p ?o } } ==== Output of qparse --file
>>>>> syntax-quad-construct-06.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g {
>>>>> ?s ?p ?o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s ?p ?o .} } WHERE {
>>>>> GRAPH ?g { ?s ?p ?o } } ======== File:
>>>>> syntax-quad-construct-07.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} } WHERE
>>>>> {} ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>>> : <http://example/>
>>>>>
>>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>>> syntax-quad-construct-08.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE { }
>>>>> ==== Output of qparse --file syntax-quad-construct-08.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} GRAPH ?g1 { :s :p :o .} } WHERE {
>>>>> }
>>>>>
>>>>> On Sun, Aug 2, 2015 at 9:14 AM, Ying Jiang <jp...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> Hi Qihong,
>>>>>>
>>>>>> I re-checked the code you commited. Most of the hashCode issues
>>>>>> for arq.qparse that Andy pointed out are due to the incorrect
>>>>>> serialization of the Template. The code can only deal with the
>>>>>> quads with the same graph node, for which it may not always be the
>>>>>> case in practcial terms. Please make sure each example syntax file
>>>>>> can pass the checking process of arq.qparse.
>>>>>>
>>>>>> It's August now. You'd better hurry up and make the project
>>>>>> completed on time in the remaining weeks.
>>>>>>
>>>>>> Best regards, Ying Jiang
>>>>>>
>>>>>> On Thu, Jul 30, 2015 at 6:03 AM, Andy Seaborne <an...@apache.org>
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Output of * each examnple syntax file (the queries are nonsense
>>>>>>> in practcial terms!) * running arq.qparse on the file * notes on
>>>>>>> what seems to be going on
>>>>>>>
>>>>>>> Andy
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-01.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of
>>>>>>> qparse --file syntax-quad-construct-01.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <http://example/g> {:s :p :o .} } WHERE { }
>>>>>>> ---- Issue: Minor: formatting of <http://example/g> should be :g
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-02.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ====
>>>>>>> Output of qparse --file syntax-quad-construct-02.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {?s ?p ?o .} } WHERE { ?s ?p ?o } ---- OK
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-03.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>> WHERE { } ---- Issue: Major: The output is contains "GRAPH
>>>>>>> <urn:x-arq:DefaultGraphNode>"
>>>>>>>
>>>>>>> Note: <urn:x-arq:DefaultGraphNode> is for internal use only.
>>>>>>>
>>>>>>> For syntax, that is a named graph just like <http://example/g>
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-04.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g {
>>>>>>> ?s ?p ?o } }
>>>>>>>
>>>>>>> ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>>>>
>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>> input query Query (hashCode: 1768688961)= PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>> ?s ?p ?o } }
>>>>>>>
>>>>>>>
>>>>>>> Query2 (hashCode: 1896249441)= PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>> ?s ?p ?o } }
>>>>>>>
>>>>>>> PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>> ?s ?p ?o } } ---- Issue: The output puts the following triple
>>>>>>> into the GRAPH. See also syntax-quad-construct-08.arq
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-05.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g {
>>>>>>> ?s ?p ?o } }
>>>>>>>
>>>>>>> ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>>>>
>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>> input query Query (hashCode: -262437683)= PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>>
>>>>>>>
>>>>>>> Query2 (hashCode: -399379987)= PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>>
>>>>>>> PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } } ---- Issue: Plain ?s ?p
>>>>>>> ?o has been put into a named graph Adjacent blocks have merged.
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-06.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g
>>>>>>> { ?s ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE {
>>>>>>> GRAPH ?g { ?s ?p ?o } }
>>>>>>>
>>>>>>> ==== Output of qparse --file syntax-quad-construct-06.arq
>>>>>>>
>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>> input query Query (hashCode: -1800516808)= PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>> ?o } }
>>>>>>>
>>>>>>>
>>>>>>> Query2 (hashCode: -129418312)= PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>> ?o } }
>>>>>>>
>>>>>>> PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>> ?o } } ---- Issue: Same as previous.
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-07.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>> WHERE {}
>>>>>>>
>>>>>>> ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>>>>> : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>> WHERE { } ---- Issue: Should be different. A named graph of
>>>>>>> GRAPH <urn:x-arq:DefaultGraphNode> is not the default graph.
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-08.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE
>>>>>>> { }
>>>>>>>
>>>>>>> ==== Output of qparse --file syntax-quad-construct-08.arq
>>>>>>>
>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>> input query Query (hashCode: 636900208)= PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>>
>>>>>>>
>>>>>>> Query2 (hashCode: 636999583)= PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>>
>>>>>>> PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { } ----
>>>>>>> Issue: Adjacent GRAPH blocks have merged.
>>>>>>>
>>>>
>>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Andy Seaborne <an...@apache.org>.
On 12/08/15 09:17, Andy Seaborne wrote:
> On 12/08/15 08:16, Qihong Lin wrote:
>> Hi Andy,
>>
>> I can not find the branch of JENA-491-construct-quads in Jena git
>> repository:
>> https://github.com/apache/jena/branches
>>
>> regards,
>> Qihong
>>
>
> I don't know how branches propagate to github - maybe they need
> something on them,
Seems that's how it work. The branch is there now.
> maybe it's stuck.
>
> But it's there in the Apache repo:
>
> https://git1-us-west.apache.org/repos/asf?p=jena.git;a=shortlog;h=refs/heads/JENA-491-construct-quads
>
>
> Github is a mirror, and a copy of the code.
>
> Andy
>
>> On Tue, Aug 11, 2015 at 4:12 PM, Andy Seaborne <an...@apache.org> wrote:
>>> On 11/08/15 03:35, Ying Jiang wrote:
>>>>
>>>> Hi Qihong,
>>>>
>>>> You may have received the reminder email from Google that the final
>>>> evaluation of the GSoC project is approaching. The "soft" deadline is
>>>> 17 August, with the "hard" one on 21 August. It means there're only 2
>>>> weeks left for your remaining work. The tests of arq need improving,
>>>> as Andy points out. You can also deliver the Fuseki part in the other
>>>> branch for review in the mean time. Meanwhile, the documentation can
>>>> be composed in jena web page (wiki). In order to save time, I suggest
>>>> the 3 parts of the work go on simultaneously:
>>>> 1) jena/arq: in master branch (to be merged first)
>>>> 2) jena/fuseki: in JENA-491 branch
>>>> 3) doc: in jena web page (wiki)
>>>>
>>>> Best regards,
>>>> Ying Jiang
>>>
>>>
>>> I have created a branch in the Jena git repository
>>> 'JENA-491-construct-quads' for doing this.
>>>
>>> Andy
>>>
>>>
>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Andy Seaborne <an...@apache.org>.
On 12/08/15 08:16, Qihong Lin wrote:
> Hi Andy,
>
> I can not find the branch of JENA-491-construct-quads in Jena git repository:
> https://github.com/apache/jena/branches
>
> regards,
> Qihong
>
I don't know how branches propagate to github - maybe they need
something on them, maybe it's stuck.
But it's there in the Apache repo:
https://git1-us-west.apache.org/repos/asf?p=jena.git;a=shortlog;h=refs/heads/JENA-491-construct-quads
Github is a mirror, and a copy of the code.
Andy
> On Tue, Aug 11, 2015 at 4:12 PM, Andy Seaborne <an...@apache.org> wrote:
>> On 11/08/15 03:35, Ying Jiang wrote:
>>>
>>> Hi Qihong,
>>>
>>> You may have received the reminder email from Google that the final
>>> evaluation of the GSoC project is approaching. The "soft" deadline is
>>> 17 August, with the "hard" one on 21 August. It means there're only 2
>>> weeks left for your remaining work. The tests of arq need improving,
>>> as Andy points out. You can also deliver the Fuseki part in the other
>>> branch for review in the mean time. Meanwhile, the documentation can
>>> be composed in jena web page (wiki). In order to save time, I suggest
>>> the 3 parts of the work go on simultaneously:
>>> 1) jena/arq: in master branch (to be merged first)
>>> 2) jena/fuseki: in JENA-491 branch
>>> 3) doc: in jena web page (wiki)
>>>
>>> Best regards,
>>> Ying Jiang
>>
>>
>> I have created a branch in the Jena git repository
>> 'JENA-491-construct-quads' for doing this.
>>
>> Andy
>>
>>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Qihong Lin <co...@gmail.com>.
Hi Andy,
I can not find the branch of JENA-491-construct-quads in Jena git repository:
https://github.com/apache/jena/branches
regards,
Qihong
On Tue, Aug 11, 2015 at 4:12 PM, Andy Seaborne <an...@apache.org> wrote:
> On 11/08/15 03:35, Ying Jiang wrote:
>>
>> Hi Qihong,
>>
>> You may have received the reminder email from Google that the final
>> evaluation of the GSoC project is approaching. The "soft" deadline is
>> 17 August, with the "hard" one on 21 August. It means there're only 2
>> weeks left for your remaining work. The tests of arq need improving,
>> as Andy points out. You can also deliver the Fuseki part in the other
>> branch for review in the mean time. Meanwhile, the documentation can
>> be composed in jena web page (wiki). In order to save time, I suggest
>> the 3 parts of the work go on simultaneously:
>> 1) jena/arq: in master branch (to be merged first)
>> 2) jena/fuseki: in JENA-491 branch
>> 3) doc: in jena web page (wiki)
>>
>> Best regards,
>> Ying Jiang
>
>
> I have created a branch in the Jena git repository
> 'JENA-491-construct-quads' for doing this.
>
> Andy
>
>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Andy Seaborne <an...@apache.org>.
On 11/08/15 03:35, Ying Jiang wrote:
> Hi Qihong,
>
> You may have received the reminder email from Google that the final
> evaluation of the GSoC project is approaching. The "soft" deadline is
> 17 August, with the "hard" one on 21 August. It means there're only 2
> weeks left for your remaining work. The tests of arq need improving,
> as Andy points out. You can also deliver the Fuseki part in the other
> branch for review in the mean time. Meanwhile, the documentation can
> be composed in jena web page (wiki). In order to save time, I suggest
> the 3 parts of the work go on simultaneously:
> 1) jena/arq: in master branch (to be merged first)
> 2) jena/fuseki: in JENA-491 branch
> 3) doc: in jena web page (wiki)
>
> Best regards,
> Ying Jiang
I have created a branch in the Jena git repository
'JENA-491-construct-quads' for doing this.
Andy
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Ying Jiang <jp...@gmail.com>.
Hi,
The doc is actually construct-quad.mdtext. In another easy way, You
can just compose it offline, and send it to us for review. I can help
you commit the mdtext file into svn finally.
Best regards,
Ying Jiang
On Sat, Aug 15, 2015 at 5:21 PM, Qihong Lin <co...@gmail.com> 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
>
> On Tue, Aug 11, 2015 at 10:35 AM, Ying Jiang <jp...@gmail.com> wrote:
>> Hi Qihong,
>>
>> You may have received the reminder email from Google that the final
>> evaluation of the GSoC project is approaching. The "soft" deadline is
>> 17 August, with the "hard" one on 21 August. It means there're only 2
>> weeks left for your remaining work. The tests of arq need improving,
>> as Andy points out. You can also deliver the Fuseki part in the other
>> branch for review in the mean time. Meanwhile, the documentation can
>> be composed in jena web page (wiki). In order to save time, I suggest
>> the 3 parts of the work go on simultaneously:
>> 1) jena/arq: in master branch (to be merged first)
>> 2) jena/fuseki: in JENA-491 branch
>> 3) doc: in jena web page (wiki)
>>
>> Best regards,
>> Ying Jiang
>>
>>
>> On Mon, Aug 10, 2015 at 9:58 PM, Andy Seaborne <an...@apache.org> wrote:
>>> I've managed to integrate the latest updates.
>>>
>>> The scripted ones look, at first glance OK, but the data isn't very rich.
>>>
>>> Also, please can we have some API tests in "TestAPI". These are JUnit tests
>>> in java. These should be have comprehensive coverage.
>>>
>>> I also tried out execConstructTriples(), I noticed that the result is from
>>> all graphs. When just triples are asked for, only those in the default
>>> graph should be returned. Template.getTriples calls Quad.asTriple. But it
>>> needs to deal with just the default graph, and c can't rely on
>>> Quad.asTriple.
>>>
>>> Andy
>>>
>>>
>>> On 10/08/15 12:44, Qihong Lin wrote:
>>>>
>>>> Hi,
>>>>
>>>> I've enriched the syntax tests with "short form" and "default graph"
>>>> cases.
>>>>
>>>> For execution tests, I add the test support in QueryTest for construct
>>>> quad with the scripts files and data files in TRIG (see
>>>> jena-arq/testing/ARQ/Construct/*.trig). I think construct quad should
>>>> be part of the construct of ARQ. So I add the execution tests in
>>>> jena-arq/testing/ARQ/Construct/manifest.ttl.
>>>>
>>>> The fuseki part of construct quad has been implemented (not committed
>>>> yet). I'll submit the code as soon as the PR 89 [1] being merged.
>>>> Anything to be improved for PR 89 from your reviews?
>>>>
>>>> regards,
>>>> Qihong
>>>>
>>>> [1] https://github.com/apache/jena/pull/89
>>>>
>>>>
>>>> On Thu, Aug 6, 2015 at 8:55 PM, Andy Seaborne <an...@apache.org> wrote:
>>>>>
>>>>> Hi - looking better - I see the syntax tests I provided.
>>>>>
>>>>> Does that set of tests cover all cases of the new syntax?
>>>>>
>>>>> Next, we need execution tests for ARQ.
>>>>>
>>>>>> There will need to be execute tests in jena-arq as well. These can be
>>>>>> Junit tests in java and do not need to be external script files.
>>>>>> This is separate from testing in Fuseki.
>>>>>
>>>>>
>>>>>
>>>>> Do you have any other constraints on your time over the next 2 weeks?
>>>>>
>>>>> Andy
>>>>>
>>>>>
>>>>> On 06/08/15 04:18, Qihong Lin wrote:
>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I've fixed the bugs related to syntax checks. Please see my latest
>>>>>> commits. Here're the output of the syntax files through qparse (you
>>>>>> can also run "ExampleConstructQuads.java" to get the results). Are
>>>>>> these with the expected behaviors, especially for
>>>>>> "syntax-quad-construct-07.arq"?
>>>>>>
>>>>>> run-construct-quad-test: ======== File: syntax-quad-construct-01.arq
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of qparse
>>>>>> --file syntax-quad-construct-01.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH :g { :s :p :o .} } WHERE { } ======== File:
>>>>>> syntax-quad-construct-02.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ==== Output of
>>>>>> qparse --file syntax-quad-construct-02.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o .} } WHERE { ?s ?p ?o } ========
>>>>>> File: syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>>>> syntax-quad-construct-04.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g { ?s ?p
>>>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . } WHERE { GRAPH ?g { ?s
>>>>>> ?p ?o } } ======== File: syntax-quad-construct-05.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g { ?s ?p
>>>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { ?s ?p ?o . GRAPH ?g { :s :p :o .} } WHERE { GRAPH ?g { ?s
>>>>>> ?p ?o } } ======== File: syntax-quad-construct-06.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s
>>>>>> ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE { GRAPH ?g
>>>>>> { ?s ?p ?o } } ==== Output of qparse --file
>>>>>> syntax-quad-construct-06.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g {
>>>>>> ?s ?p ?o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s ?p ?o .} } WHERE {
>>>>>> GRAPH ?g { ?s ?p ?o } } ======== File:
>>>>>> syntax-quad-construct-07.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} } WHERE
>>>>>> {} ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>>>> : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>>>> syntax-quad-construct-08.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE { }
>>>>>> ==== Output of qparse --file syntax-quad-construct-08.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} GRAPH ?g1 { :s :p :o .} } WHERE {
>>>>>> }
>>>>>>
>>>>>> On Sun, Aug 2, 2015 at 9:14 AM, Ying Jiang <jp...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Hi Qihong,
>>>>>>>
>>>>>>> I re-checked the code you commited. Most of the hashCode issues
>>>>>>> for arq.qparse that Andy pointed out are due to the incorrect
>>>>>>> serialization of the Template. The code can only deal with the
>>>>>>> quads with the same graph node, for which it may not always be the
>>>>>>> case in practcial terms. Please make sure each example syntax file
>>>>>>> can pass the checking process of arq.qparse.
>>>>>>>
>>>>>>> It's August now. You'd better hurry up and make the project
>>>>>>> completed on time in the remaining weeks.
>>>>>>>
>>>>>>> Best regards, Ying Jiang
>>>>>>>
>>>>>>> On Thu, Jul 30, 2015 at 6:03 AM, Andy Seaborne <an...@apache.org>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Output of * each examnple syntax file (the queries are nonsense
>>>>>>>> in practcial terms!) * running arq.qparse on the file * notes on
>>>>>>>> what seems to be going on
>>>>>>>>
>>>>>>>> Andy
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-01.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of
>>>>>>>> qparse --file syntax-quad-construct-01.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <http://example/g> {:s :p :o .} } WHERE { }
>>>>>>>> ---- Issue: Minor: formatting of <http://example/g> should be :g
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-02.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ====
>>>>>>>> Output of qparse --file syntax-quad-construct-02.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {?s ?p ?o .} } WHERE { ?s ?p ?o } ---- OK
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-03.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>>>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>>> WHERE { } ---- Issue: Major: The output is contains "GRAPH
>>>>>>>> <urn:x-arq:DefaultGraphNode>"
>>>>>>>>
>>>>>>>> Note: <urn:x-arq:DefaultGraphNode> is for internal use only.
>>>>>>>>
>>>>>>>> For syntax, that is a named graph just like <http://example/g>
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-04.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g {
>>>>>>>> ?s ?p ?o } }
>>>>>>>>
>>>>>>>> ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>>>>>
>>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>>> input query Query (hashCode: 1768688961)= PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>>> ?s ?p ?o } }
>>>>>>>>
>>>>>>>>
>>>>>>>> Query2 (hashCode: 1896249441)= PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>>> ?s ?p ?o } }
>>>>>>>>
>>>>>>>> PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>>> ?s ?p ?o } } ---- Issue: The output puts the following triple
>>>>>>>> into the GRAPH. See also syntax-quad-construct-08.arq
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-05.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g {
>>>>>>>> ?s ?p ?o } }
>>>>>>>>
>>>>>>>> ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>>>>>
>>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>>> input query Query (hashCode: -262437683)= PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>>>
>>>>>>>>
>>>>>>>> Query2 (hashCode: -399379987)= PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>>>
>>>>>>>> PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } } ---- Issue: Plain ?s ?p
>>>>>>>> ?o has been put into a named graph Adjacent blocks have merged.
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-06.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g
>>>>>>>> { ?s ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE {
>>>>>>>> GRAPH ?g { ?s ?p ?o } }
>>>>>>>>
>>>>>>>> ==== Output of qparse --file syntax-quad-construct-06.arq
>>>>>>>>
>>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>>> input query Query (hashCode: -1800516808)= PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>>> ?o } }
>>>>>>>>
>>>>>>>>
>>>>>>>> Query2 (hashCode: -129418312)= PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>>> ?o } }
>>>>>>>>
>>>>>>>> PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>>> ?o } } ---- Issue: Same as previous.
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-07.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>>> WHERE {}
>>>>>>>>
>>>>>>>> ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>>>>>> : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>>> WHERE { } ---- Issue: Should be different. A named graph of
>>>>>>>> GRAPH <urn:x-arq:DefaultGraphNode> is not the default graph.
>>>>>>>>
>>>>>>>> ======== File: syntax-quad-construct-08.arq PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE
>>>>>>>> { }
>>>>>>>>
>>>>>>>> ==== Output of qparse --file syntax-quad-construct-08.arq
>>>>>>>>
>>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>>> input query Query (hashCode: 636900208)= PREFIX :
>>>>>>>> <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>>>
>>>>>>>>
>>>>>>>> Query2 (hashCode: 636999583)= PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>>>
>>>>>>>> PREFIX : <http://example/>
>>>>>>>>
>>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { } ----
>>>>>>>> Issue: Adjacent GRAPH blocks have merged.
>>>>>>>>
>>>>>
>>>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Andy Seaborne <an...@apache.org>.
On 19/08/15 16:23, Qihong Lin wrote:
> Hi Andy,
>
> I've committed the code according to your suggestion. The server side
> only runs QueryExecutionBase::execConstructQuads().
>
> I've also hacked QueryEngineHTTP to test the conneg of
> execConstructTriples() and execConstructQuads(). For
> execConstructQuads(), all of the content types in DEF.quadsOffer have
> been tested: if the client sends Accept content type of, e.g. TriG,
> the sever will response with the desired same content type.
> Please check the PR 91: TestQuery.query_construct_quad_conneg()
>
> regards,
> Qihong
I've pulled the PR latest into the JENA-491-construct-quads. I've
managed to get the test working now as well (some conneg mixups abnd a
bug elsewhere in Jena (JENA-1011).
Thank you for your contributions during GSoC,
Andy
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Qihong Lin <co...@gmail.com>.
Hi Andy,
I've committed the code according to your suggestion. The server side
only runs QueryExecutionBase::execConstructQuads().
I've also hacked QueryEngineHTTP to test the conneg of
execConstructTriples() and execConstructQuads(). For
execConstructQuads(), all of the content types in DEF.quadsOffer have
been tested: if the client sends Accept content type of, e.g. TriG,
the sever will response with the desired same content type.
Please check the PR 91: TestQuery.query_construct_quad_conneg()
regards,
Qihong
On Tue, Aug 18, 2015 at 4:26 PM, Andy Seaborne <an...@apache.org> wrote:
> On 18/08/15 08:44, Qihong Lin wrote:
>>
>> Hi Andy,
>>
>> Thank for your comments! I can understand your idea of A/ B/ C/. But
>> there'a problem in practice.
>>
>> In brief:
>> For A/, at the server side, always call
>> QueryExecutionBase::execConstructDataset()
>> For B/, the problem is, there're overlaps between DEF.rdfOffer and
>> DEF.quadsOffer, e.g. TriX, TriXxml and JSONLD.
>> For C/, e.g. if the Accept lang is JSONLD, which should be written out
>> by RDFDataMgr, model or dataset? Note that, the server side doesn't
>> know which it's called from the client side,
>> QueryEngineHTTP::exeConstructTriples() or exeConstructQuads().
>
>
> I wrote:
>>> a combined DEF.rdfOffer+DEF.quadsOffer
>
> Create a new offer which combines all the languages you want.
> DEF.constructOffer.
>
> If the language is quad-supporting, RDFLanguages.isQuads is true, process as
> a dataset regardless.
>
> It does not matter if the client is asking for a model or a dataset because
> in all syntax cases, a dataset of just the default (the unnamed) graph looks
> like a single graph. This is while you can generalise to work in datasets
> for much of the processing. The default graph in a datasets is written as
> just triples without a graph field.
>
>> Also at the client side, if
>> QueryEngineHTTP::exeConstructTriples()/exeConstructQuads() gets the
>> content type of, e.g. JSONLD, it doesn't know whether it is a model or
>> dataset.
>
>
> If they call execConstructTriples, then either the CONSTRUCT query will only
> have a default graph template or it's an extended syntax query and you want
> the default graph. In both cases, parse to a steam of triples. The parsers
> skip named graphs when they are asked for triples only.
>
>> So, that's why I introduce the DEF.pureRdfOffer to distinguish the
>> triple format that is not a quad format. In my way, both the sever
>> side and the client side separate model and dataset. It's kind of ugly
>> in code. Any more suggestion?
>
>
> That would probably also work but it is not what the code is doing in
> SPARQL_Query. It just offers DEF.pureRdfOffer and then tests for *. There
> is no datasets content negotation possible (e.g. n-quads vs Trig) because
> the process can't get to ResponseDataset with application/n-quads set, say.
> The only way I can see to get there is a Accept-type of "*" in SPARQL_Query.
>
> Try it in a debugger.
>
> hack to run Fusek2 clean in Eclipse (string names need changing):
>
> public class DevFuseki2 {
> public static void main(String[] args) {
> String DIR = "/home/afs/ASF/jena-491/" ;
> System.setProperty("FUSEKI_HOME",
> DIR+"jena-fuseki2/jena-fuseki-core") ;
> String fusekiBase =
> "/home/afs/ASF/jena-491/jena-fuseki2/jena-fuseki-core/run" ;
> System.setProperty("FUSEKI_BASE", fusekiBase) ;
> String runArea = Paths.get(fusekiBase).toAbsolutePath().toString() ;
> // **** Delete any previous state.
> // FileOps.ensureDir(runArea) ;
> FusekiCmd.main() ;
> System.exit(0) ;
> }
> }
>
>
> Andy
>
>
>>
>> regards,
>> Qihong
>>
>> On Mon, Aug 17, 2015 at 10:49 PM, Andy Seaborne <an...@apache.org> wrote:
>>>
>>> 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)
Posted by Andy Seaborne <an...@apache.org>.
On 18/08/15 08:44, Qihong Lin wrote:
> Hi Andy,
>
> Thank for your comments! I can understand your idea of A/ B/ C/. But
> there'a problem in practice.
>
> In brief:
> For A/, at the server side, always call
> QueryExecutionBase::execConstructDataset()
> For B/, the problem is, there're overlaps between DEF.rdfOffer and
> DEF.quadsOffer, e.g. TriX, TriXxml and JSONLD.
> For C/, e.g. if the Accept lang is JSONLD, which should be written out
> by RDFDataMgr, model or dataset? Note that, the server side doesn't
> know which it's called from the client side,
> QueryEngineHTTP::exeConstructTriples() or exeConstructQuads().
I wrote:
>> a combined DEF.rdfOffer+DEF.quadsOffer
Create a new offer which combines all the languages you want.
DEF.constructOffer.
If the language is quad-supporting, RDFLanguages.isQuads is true,
process as a dataset regardless.
It does not matter if the client is asking for a model or a dataset
because in all syntax cases, a dataset of just the default (the unnamed)
graph looks like a single graph. This is while you can generalise to
work in datasets for much of the processing. The default graph in a
datasets is written as just triples without a graph field.
> Also at the client side, if
> QueryEngineHTTP::exeConstructTriples()/exeConstructQuads() gets the
> content type of, e.g. JSONLD, it doesn't know whether it is a model or
> dataset.
If they call execConstructTriples, then either the CONSTRUCT query will
only have a default graph template or it's an extended syntax query and
you want the default graph. In both cases, parse to a steam of triples.
The parsers skip named graphs when they are asked for triples only.
> So, that's why I introduce the DEF.pureRdfOffer to distinguish the
> triple format that is not a quad format. In my way, both the sever
> side and the client side separate model and dataset. It's kind of ugly
> in code. Any more suggestion?
That would probably also work but it is not what the code is doing in
SPARQL_Query. It just offers DEF.pureRdfOffer and then tests for *.
There is no datasets content negotation possible (e.g. n-quads vs Trig)
because the process can't get to ResponseDataset with
application/n-quads set, say. The only way I can see to get there is a
Accept-type of "*" in SPARQL_Query.
Try it in a debugger.
hack to run Fusek2 clean in Eclipse (string names need changing):
public class DevFuseki2 {
public static void main(String[] args) {
String DIR = "/home/afs/ASF/jena-491/" ;
System.setProperty("FUSEKI_HOME",
DIR+"jena-fuseki2/jena-fuseki-core") ;
String fusekiBase =
"/home/afs/ASF/jena-491/jena-fuseki2/jena-fuseki-core/run" ;
System.setProperty("FUSEKI_BASE", fusekiBase) ;
String runArea = Paths.get(fusekiBase).toAbsolutePath().toString() ;
// **** Delete any previous state.
// FileOps.ensureDir(runArea) ;
FusekiCmd.main() ;
System.exit(0) ;
}
}
Andy
>
> regards,
> Qihong
>
> On Mon, Aug 17, 2015 at 10:49 PM, Andy Seaborne <an...@apache.org> wrote:
>> 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)
Posted by Qihong Lin <co...@gmail.com>.
Hi Andy,
Thank for your comments! I can understand your idea of A/ B/ C/. But
there'a problem in practice.
In brief:
For A/, at the server side, always call
QueryExecutionBase::execConstructDataset()
For B/, the problem is, there're overlaps between DEF.rdfOffer and
DEF.quadsOffer, e.g. TriX, TriXxml and JSONLD.
For C/, e.g. if the Accept lang is JSONLD, which should be written out
by RDFDataMgr, model or dataset? Note that, the server side doesn't
know which it's called from the client side,
QueryEngineHTTP::exeConstructTriples() or exeConstructQuads().
Also at the client side, if
QueryEngineHTTP::exeConstructTriples()/exeConstructQuads() gets the
content type of, e.g. JSONLD, it doesn't know whether it is a model or
dataset.
So, that's why I introduce the DEF.pureRdfOffer to distinguish the
triple format that is not a quad format. In my way, both the sever
side and the client side separate model and dataset. It's kind of ugly
in code. Any more suggestion?
regards,
Qihong
On Mon, Aug 17, 2015 at 10:49 PM, Andy Seaborne <an...@apache.org> wrote:
> 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)
Posted by Andy Seaborne <an...@apache.org>.
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)
Posted by Andy Seaborne <an...@apache.org>.
I've pushed PR91 to the JENA-491-construct-quads branch. Let's consider
the is working baseline for code.
Andy
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Andy Seaborne <an...@apache.org>.
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)
Posted by Qihong Lin <co...@gmail.com>.
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 <an...@apache.org> 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: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Andy Seaborne <an...@apache.org>.
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: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Qihong Lin <co...@gmail.com>.
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
On Tue, Aug 11, 2015 at 10:35 AM, Ying Jiang <jp...@gmail.com> wrote:
> Hi Qihong,
>
> You may have received the reminder email from Google that the final
> evaluation of the GSoC project is approaching. The "soft" deadline is
> 17 August, with the "hard" one on 21 August. It means there're only 2
> weeks left for your remaining work. The tests of arq need improving,
> as Andy points out. You can also deliver the Fuseki part in the other
> branch for review in the mean time. Meanwhile, the documentation can
> be composed in jena web page (wiki). In order to save time, I suggest
> the 3 parts of the work go on simultaneously:
> 1) jena/arq: in master branch (to be merged first)
> 2) jena/fuseki: in JENA-491 branch
> 3) doc: in jena web page (wiki)
>
> Best regards,
> Ying Jiang
>
>
> On Mon, Aug 10, 2015 at 9:58 PM, Andy Seaborne <an...@apache.org> wrote:
>> I've managed to integrate the latest updates.
>>
>> The scripted ones look, at first glance OK, but the data isn't very rich.
>>
>> Also, please can we have some API tests in "TestAPI". These are JUnit tests
>> in java. These should be have comprehensive coverage.
>>
>> I also tried out execConstructTriples(), I noticed that the result is from
>> all graphs. When just triples are asked for, only those in the default
>> graph should be returned. Template.getTriples calls Quad.asTriple. But it
>> needs to deal with just the default graph, and c can't rely on
>> Quad.asTriple.
>>
>> Andy
>>
>>
>> On 10/08/15 12:44, Qihong Lin wrote:
>>>
>>> Hi,
>>>
>>> I've enriched the syntax tests with "short form" and "default graph"
>>> cases.
>>>
>>> For execution tests, I add the test support in QueryTest for construct
>>> quad with the scripts files and data files in TRIG (see
>>> jena-arq/testing/ARQ/Construct/*.trig). I think construct quad should
>>> be part of the construct of ARQ. So I add the execution tests in
>>> jena-arq/testing/ARQ/Construct/manifest.ttl.
>>>
>>> The fuseki part of construct quad has been implemented (not committed
>>> yet). I'll submit the code as soon as the PR 89 [1] being merged.
>>> Anything to be improved for PR 89 from your reviews?
>>>
>>> regards,
>>> Qihong
>>>
>>> [1] https://github.com/apache/jena/pull/89
>>>
>>>
>>> On Thu, Aug 6, 2015 at 8:55 PM, Andy Seaborne <an...@apache.org> wrote:
>>>>
>>>> Hi - looking better - I see the syntax tests I provided.
>>>>
>>>> Does that set of tests cover all cases of the new syntax?
>>>>
>>>> Next, we need execution tests for ARQ.
>>>>
>>>>> There will need to be execute tests in jena-arq as well. These can be
>>>>> Junit tests in java and do not need to be external script files.
>>>>> This is separate from testing in Fuseki.
>>>>
>>>>
>>>>
>>>> Do you have any other constraints on your time over the next 2 weeks?
>>>>
>>>> Andy
>>>>
>>>>
>>>> On 06/08/15 04:18, Qihong Lin wrote:
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> I've fixed the bugs related to syntax checks. Please see my latest
>>>>> commits. Here're the output of the syntax files through qparse (you
>>>>> can also run "ExampleConstructQuads.java" to get the results). Are
>>>>> these with the expected behaviors, especially for
>>>>> "syntax-quad-construct-07.arq"?
>>>>>
>>>>> run-construct-quad-test: ======== File: syntax-quad-construct-01.arq
>>>>> PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of qparse
>>>>> --file syntax-quad-construct-01.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH :g { :s :p :o .} } WHERE { } ======== File:
>>>>> syntax-quad-construct-02.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ==== Output of
>>>>> qparse --file syntax-quad-construct-02.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o .} } WHERE { ?s ?p ?o } ========
>>>>> File: syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>>> syntax-quad-construct-04.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g { ?s ?p
>>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>> PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . } WHERE { GRAPH ?g { ?s
>>>>> ?p ?o } } ======== File: syntax-quad-construct-05.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g { ?s ?p
>>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>> PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { ?s ?p ?o . GRAPH ?g { :s :p :o .} } WHERE { GRAPH ?g { ?s
>>>>> ?p ?o } } ======== File: syntax-quad-construct-06.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s
>>>>> ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE { GRAPH ?g
>>>>> { ?s ?p ?o } } ==== Output of qparse --file
>>>>> syntax-quad-construct-06.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g {
>>>>> ?s ?p ?o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s ?p ?o .} } WHERE {
>>>>> GRAPH ?g { ?s ?p ?o } } ======== File:
>>>>> syntax-quad-construct-07.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} } WHERE
>>>>> {} ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>>> : <http://example/>
>>>>>
>>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>>> syntax-quad-construct-08.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE { }
>>>>> ==== Output of qparse --file syntax-quad-construct-08.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} GRAPH ?g1 { :s :p :o .} } WHERE {
>>>>> }
>>>>>
>>>>> On Sun, Aug 2, 2015 at 9:14 AM, Ying Jiang <jp...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> Hi Qihong,
>>>>>>
>>>>>> I re-checked the code you commited. Most of the hashCode issues
>>>>>> for arq.qparse that Andy pointed out are due to the incorrect
>>>>>> serialization of the Template. The code can only deal with the
>>>>>> quads with the same graph node, for which it may not always be the
>>>>>> case in practcial terms. Please make sure each example syntax file
>>>>>> can pass the checking process of arq.qparse.
>>>>>>
>>>>>> It's August now. You'd better hurry up and make the project
>>>>>> completed on time in the remaining weeks.
>>>>>>
>>>>>> Best regards, Ying Jiang
>>>>>>
>>>>>> On Thu, Jul 30, 2015 at 6:03 AM, Andy Seaborne <an...@apache.org>
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Output of * each examnple syntax file (the queries are nonsense
>>>>>>> in practcial terms!) * running arq.qparse on the file * notes on
>>>>>>> what seems to be going on
>>>>>>>
>>>>>>> Andy
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-01.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of
>>>>>>> qparse --file syntax-quad-construct-01.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <http://example/g> {:s :p :o .} } WHERE { }
>>>>>>> ---- Issue: Minor: formatting of <http://example/g> should be :g
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-02.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ====
>>>>>>> Output of qparse --file syntax-quad-construct-02.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {?s ?p ?o .} } WHERE { ?s ?p ?o } ---- OK
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-03.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>> WHERE { } ---- Issue: Major: The output is contains "GRAPH
>>>>>>> <urn:x-arq:DefaultGraphNode>"
>>>>>>>
>>>>>>> Note: <urn:x-arq:DefaultGraphNode> is for internal use only.
>>>>>>>
>>>>>>> For syntax, that is a named graph just like <http://example/g>
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-04.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g {
>>>>>>> ?s ?p ?o } }
>>>>>>>
>>>>>>> ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>>>>
>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>> input query Query (hashCode: 1768688961)= PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>> ?s ?p ?o } }
>>>>>>>
>>>>>>>
>>>>>>> Query2 (hashCode: 1896249441)= PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>> ?s ?p ?o } }
>>>>>>>
>>>>>>> PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>>> ?s ?p ?o } } ---- Issue: The output puts the following triple
>>>>>>> into the GRAPH. See also syntax-quad-construct-08.arq
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-05.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g {
>>>>>>> ?s ?p ?o } }
>>>>>>>
>>>>>>> ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>>>>
>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>> input query Query (hashCode: -262437683)= PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>>
>>>>>>>
>>>>>>> Query2 (hashCode: -399379987)= PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>>
>>>>>>> PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } } ---- Issue: Plain ?s ?p
>>>>>>> ?o has been put into a named graph Adjacent blocks have merged.
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-06.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g
>>>>>>> { ?s ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE {
>>>>>>> GRAPH ?g { ?s ?p ?o } }
>>>>>>>
>>>>>>> ==== Output of qparse --file syntax-quad-construct-06.arq
>>>>>>>
>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>> input query Query (hashCode: -1800516808)= PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>> ?o } }
>>>>>>>
>>>>>>>
>>>>>>> Query2 (hashCode: -129418312)= PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>> ?o } }
>>>>>>>
>>>>>>> PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>>> ?o } } ---- Issue: Same as previous.
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-07.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>> WHERE {}
>>>>>>>
>>>>>>> ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>>>>> : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>>> WHERE { } ---- Issue: Should be different. A named graph of
>>>>>>> GRAPH <urn:x-arq:DefaultGraphNode> is not the default graph.
>>>>>>>
>>>>>>> ======== File: syntax-quad-construct-08.arq PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE
>>>>>>> { }
>>>>>>>
>>>>>>> ==== Output of qparse --file syntax-quad-construct-08.arq
>>>>>>>
>>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>>> input query Query (hashCode: 636900208)= PREFIX :
>>>>>>> <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>>
>>>>>>>
>>>>>>> Query2 (hashCode: 636999583)= PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>>
>>>>>>> PREFIX : <http://example/>
>>>>>>>
>>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { } ----
>>>>>>> Issue: Adjacent GRAPH blocks have merged.
>>>>>>>
>>>>
>>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Ying Jiang <jp...@gmail.com>.
Hi Qihong,
You may have received the reminder email from Google that the final
evaluation of the GSoC project is approaching. The "soft" deadline is
17 August, with the "hard" one on 21 August. It means there're only 2
weeks left for your remaining work. The tests of arq need improving,
as Andy points out. You can also deliver the Fuseki part in the other
branch for review in the mean time. Meanwhile, the documentation can
be composed in jena web page (wiki). In order to save time, I suggest
the 3 parts of the work go on simultaneously:
1) jena/arq: in master branch (to be merged first)
2) jena/fuseki: in JENA-491 branch
3) doc: in jena web page (wiki)
Best regards,
Ying Jiang
On Mon, Aug 10, 2015 at 9:58 PM, Andy Seaborne <an...@apache.org> wrote:
> I've managed to integrate the latest updates.
>
> The scripted ones look, at first glance OK, but the data isn't very rich.
>
> Also, please can we have some API tests in "TestAPI". These are JUnit tests
> in java. These should be have comprehensive coverage.
>
> I also tried out execConstructTriples(), I noticed that the result is from
> all graphs. When just triples are asked for, only those in the default
> graph should be returned. Template.getTriples calls Quad.asTriple. But it
> needs to deal with just the default graph, and c can't rely on
> Quad.asTriple.
>
> Andy
>
>
> On 10/08/15 12:44, Qihong Lin wrote:
>>
>> Hi,
>>
>> I've enriched the syntax tests with "short form" and "default graph"
>> cases.
>>
>> For execution tests, I add the test support in QueryTest for construct
>> quad with the scripts files and data files in TRIG (see
>> jena-arq/testing/ARQ/Construct/*.trig). I think construct quad should
>> be part of the construct of ARQ. So I add the execution tests in
>> jena-arq/testing/ARQ/Construct/manifest.ttl.
>>
>> The fuseki part of construct quad has been implemented (not committed
>> yet). I'll submit the code as soon as the PR 89 [1] being merged.
>> Anything to be improved for PR 89 from your reviews?
>>
>> regards,
>> Qihong
>>
>> [1] https://github.com/apache/jena/pull/89
>>
>>
>> On Thu, Aug 6, 2015 at 8:55 PM, Andy Seaborne <an...@apache.org> wrote:
>>>
>>> Hi - looking better - I see the syntax tests I provided.
>>>
>>> Does that set of tests cover all cases of the new syntax?
>>>
>>> Next, we need execution tests for ARQ.
>>>
>>>> There will need to be execute tests in jena-arq as well. These can be
>>>> Junit tests in java and do not need to be external script files.
>>>> This is separate from testing in Fuseki.
>>>
>>>
>>>
>>> Do you have any other constraints on your time over the next 2 weeks?
>>>
>>> Andy
>>>
>>>
>>> On 06/08/15 04:18, Qihong Lin wrote:
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I've fixed the bugs related to syntax checks. Please see my latest
>>>> commits. Here're the output of the syntax files through qparse (you
>>>> can also run "ExampleConstructQuads.java" to get the results). Are
>>>> these with the expected behaviors, especially for
>>>> "syntax-quad-construct-07.arq"?
>>>>
>>>> run-construct-quad-test: ======== File: syntax-quad-construct-01.arq
>>>> PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of qparse
>>>> --file syntax-quad-construct-01.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH :g { :s :p :o .} } WHERE { } ======== File:
>>>> syntax-quad-construct-02.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ==== Output of
>>>> qparse --file syntax-quad-construct-02.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o .} } WHERE { ?s ?p ?o } ========
>>>> File: syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>> syntax-quad-construct-04.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g { ?s ?p
>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-04.arq
>>>> PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . } WHERE { GRAPH ?g { ?s
>>>> ?p ?o } } ======== File: syntax-quad-construct-05.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g { ?s ?p
>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-05.arq
>>>> PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { ?s ?p ?o . GRAPH ?g { :s :p :o .} } WHERE { GRAPH ?g { ?s
>>>> ?p ?o } } ======== File: syntax-quad-construct-06.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s
>>>> ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE { GRAPH ?g
>>>> { ?s ?p ?o } } ==== Output of qparse --file
>>>> syntax-quad-construct-06.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g {
>>>> ?s ?p ?o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s ?p ?o .} } WHERE {
>>>> GRAPH ?g { ?s ?p ?o } } ======== File:
>>>> syntax-quad-construct-07.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} } WHERE
>>>> {} ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>> : <http://example/>
>>>>
>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>> syntax-quad-construct-08.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE { }
>>>> ==== Output of qparse --file syntax-quad-construct-08.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} GRAPH ?g1 { :s :p :o .} } WHERE {
>>>> }
>>>>
>>>> On Sun, Aug 2, 2015 at 9:14 AM, Ying Jiang <jp...@gmail.com>
>>>> wrote:
>>>>>
>>>>>
>>>>> Hi Qihong,
>>>>>
>>>>> I re-checked the code you commited. Most of the hashCode issues
>>>>> for arq.qparse that Andy pointed out are due to the incorrect
>>>>> serialization of the Template. The code can only deal with the
>>>>> quads with the same graph node, for which it may not always be the
>>>>> case in practcial terms. Please make sure each example syntax file
>>>>> can pass the checking process of arq.qparse.
>>>>>
>>>>> It's August now. You'd better hurry up and make the project
>>>>> completed on time in the remaining weeks.
>>>>>
>>>>> Best regards, Ying Jiang
>>>>>
>>>>> On Thu, Jul 30, 2015 at 6:03 AM, Andy Seaborne <an...@apache.org>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> Output of * each examnple syntax file (the queries are nonsense
>>>>>> in practcial terms!) * running arq.qparse on the file * notes on
>>>>>> what seems to be going on
>>>>>>
>>>>>> Andy
>>>>>>
>>>>>> ======== File: syntax-quad-construct-01.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of
>>>>>> qparse --file syntax-quad-construct-01.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <http://example/g> {:s :p :o .} } WHERE { }
>>>>>> ---- Issue: Minor: formatting of <http://example/g> should be :g
>>>>>>
>>>>>> ======== File: syntax-quad-construct-02.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ====
>>>>>> Output of qparse --file syntax-quad-construct-02.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {?s ?p ?o .} } WHERE { ?s ?p ?o } ---- OK
>>>>>>
>>>>>> ======== File: syntax-quad-construct-03.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>> WHERE { } ---- Issue: Major: The output is contains "GRAPH
>>>>>> <urn:x-arq:DefaultGraphNode>"
>>>>>>
>>>>>> Note: <urn:x-arq:DefaultGraphNode> is for internal use only.
>>>>>>
>>>>>> For syntax, that is a named graph just like <http://example/g>
>>>>>>
>>>>>> ======== File: syntax-quad-construct-04.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g {
>>>>>> ?s ?p ?o } }
>>>>>>
>>>>>> ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>>>
>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>> input query Query (hashCode: 1768688961)= PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>> ?s ?p ?o } }
>>>>>>
>>>>>>
>>>>>> Query2 (hashCode: 1896249441)= PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>> ?s ?p ?o } }
>>>>>>
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>> ?s ?p ?o } } ---- Issue: The output puts the following triple
>>>>>> into the GRAPH. See also syntax-quad-construct-08.arq
>>>>>>
>>>>>> ======== File: syntax-quad-construct-05.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g {
>>>>>> ?s ?p ?o } }
>>>>>>
>>>>>> ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>>>
>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>> input query Query (hashCode: -262437683)= PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>
>>>>>>
>>>>>> Query2 (hashCode: -399379987)= PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } } ---- Issue: Plain ?s ?p
>>>>>> ?o has been put into a named graph Adjacent blocks have merged.
>>>>>>
>>>>>> ======== File: syntax-quad-construct-06.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g
>>>>>> { ?s ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE {
>>>>>> GRAPH ?g { ?s ?p ?o } }
>>>>>>
>>>>>> ==== Output of qparse --file syntax-quad-construct-06.arq
>>>>>>
>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>> input query Query (hashCode: -1800516808)= PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>> ?o } }
>>>>>>
>>>>>>
>>>>>> Query2 (hashCode: -129418312)= PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>> ?o } }
>>>>>>
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>> ?o } } ---- Issue: Same as previous.
>>>>>>
>>>>>> ======== File: syntax-quad-construct-07.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>> WHERE {}
>>>>>>
>>>>>> ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>>>> : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>> WHERE { } ---- Issue: Should be different. A named graph of
>>>>>> GRAPH <urn:x-arq:DefaultGraphNode> is not the default graph.
>>>>>>
>>>>>> ======== File: syntax-quad-construct-08.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE
>>>>>> { }
>>>>>>
>>>>>> ==== Output of qparse --file syntax-quad-construct-08.arq
>>>>>>
>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>> input query Query (hashCode: 636900208)= PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>
>>>>>>
>>>>>> Query2 (hashCode: 636999583)= PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { } ----
>>>>>> Issue: Adjacent GRAPH blocks have merged.
>>>>>>
>>>
>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Qihong Lin <co...@gmail.com>.
Hi Andy,
I've got the idea of projection. The bug has been fixed. I'll deliver
more tests.
Thanks!
Qihong
On Tue, Aug 11, 2015 at 4:52 PM, Andy Seaborne <an...@apache.org> wrote:
> On 11/08/15 09:11, Qihong Lin wrote:
>>
>> hi Andy,
>>
>> I'll further enrich the test data and add JUnit tests in TestAPI for
>> better coverage.
>>
>> I'm thinking of the problem you mentioned. In fact, there're 2 types
>> of query strings:
>> a) Query String without Construct Quad, e.g. "CONSTRUCT { ?s ?p ?o }
>> WHERE { ?s ?p ?o }";
>> b) Query String with Construct Quad, e.g. "CONSTRUCT { ?s ?p ?o GRAPH
>> :g1 { :s1 ?p :o1 } } WHERE { ?s ?p ?o }"
>> Also, the users can choose to execute 2 kinds of query methods:
>> 1) Iterator<Triple> execTriples()
>> 2) Iterator<Quad> execQuads()
>>
>> These make 4 cases:
>> a)+1): No problem, original ARQ construct query
>
>
> and execContructQuads returns quads with the default graph set.
> and the execContructDataset contains a dataset with triples in the default
> graph.
>
>> b)+2): No problem, new construct quad query
>
> Yes
>>
>> a)+2): The result quads are in the default graph? Or just throw
>> exception saying the query string not working with the query method?
>
>
> Quads, with graph field being for the default graph.
>
>> b)+1)(you mentioned): The result triples contain only the "?s ?p ?o"
>> part, ignoring construct "GRAPH :g1 { :s1 ?p :o1 }"? Or just throw
>> exception saying the query string not working with the query method?
>> Could you please tell me your opnions about the last 2 cases?
>
>
> The effect should be triples in the default graph (?s ?p ?o). it's a
> projection. The same happens if you parse, say TriG, into a model : just
> the default graph is seen.
>
> There is a general abstraction here (CONSTRUCT template to dataset). It's a
> matter of how to handle the two API forms that deal with a restricted form
> (triples/model). Seeing the default graph in each case is the way to deal
> with it.
>
> Andy
>
>
>>
>> regards,
>> Qihong
>>
>> On Mon, Aug 10, 2015 at 9:58 PM, Andy Seaborne <an...@apache.org> wrote:
>>>
>>> I've managed to integrate the latest updates.
>>>
>>> The scripted ones look, at first glance OK, but the data isn't very rich.
>>>
>>> Also, please can we have some API tests in "TestAPI". These are JUnit
>>> tests
>>> in java. These should be have comprehensive coverage.
>>>
>>> I also tried out execConstructTriples(), I noticed that the result is
>>> from
>>> all graphs. When just triples are asked for, only those in the default
>>> graph should be returned. Template.getTriples calls Quad.asTriple. But
>>> it
>>> needs to deal with just the default graph, and c can't rely on
>>> Quad.asTriple.
>>>
>>> Andy
>>>
>>>
>>> On 10/08/15 12:44, Qihong Lin wrote:
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I've enriched the syntax tests with "short form" and "default graph"
>>>> cases.
>>>>
>>>> For execution tests, I add the test support in QueryTest for construct
>>>> quad with the scripts files and data files in TRIG (see
>>>> jena-arq/testing/ARQ/Construct/*.trig). I think construct quad should
>>>> be part of the construct of ARQ. So I add the execution tests in
>>>> jena-arq/testing/ARQ/Construct/manifest.ttl.
>>>>
>>>> The fuseki part of construct quad has been implemented (not committed
>>>> yet). I'll submit the code as soon as the PR 89 [1] being merged.
>>>> Anything to be improved for PR 89 from your reviews?
>>>>
>>>> regards,
>>>> Qihong
>>>>
>>>> [1] https://github.com/apache/jena/pull/89
>
>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Andy Seaborne <an...@apache.org>.
On 11/08/15 09:11, Qihong Lin wrote:
> hi Andy,
>
> I'll further enrich the test data and add JUnit tests in TestAPI for
> better coverage.
>
> I'm thinking of the problem you mentioned. In fact, there're 2 types
> of query strings:
> a) Query String without Construct Quad, e.g. "CONSTRUCT { ?s ?p ?o }
> WHERE { ?s ?p ?o }";
> b) Query String with Construct Quad, e.g. "CONSTRUCT { ?s ?p ?o GRAPH
> :g1 { :s1 ?p :o1 } } WHERE { ?s ?p ?o }"
> Also, the users can choose to execute 2 kinds of query methods:
> 1) Iterator<Triple> execTriples()
> 2) Iterator<Quad> execQuads()
>
> These make 4 cases:
> a)+1): No problem, original ARQ construct query
and execContructQuads returns quads with the default graph set.
and the execContructDataset contains a dataset with triples in the
default graph.
> b)+2): No problem, new construct quad query
Yes
> a)+2): The result quads are in the default graph? Or just throw
> exception saying the query string not working with the query method?
Quads, with graph field being for the default graph.
> b)+1)(you mentioned): The result triples contain only the "?s ?p ?o"
> part, ignoring construct "GRAPH :g1 { :s1 ?p :o1 }"? Or just throw
> exception saying the query string not working with the query method?
> Could you please tell me your opnions about the last 2 cases?
The effect should be triples in the default graph (?s ?p ?o). it's a
projection. The same happens if you parse, say TriG, into a model :
just the default graph is seen.
There is a general abstraction here (CONSTRUCT template to dataset).
It's a matter of how to handle the two API forms that deal with a
restricted form (triples/model). Seeing the default graph in each case
is the way to deal with it.
Andy
>
> regards,
> Qihong
>
> On Mon, Aug 10, 2015 at 9:58 PM, Andy Seaborne <an...@apache.org> wrote:
>> I've managed to integrate the latest updates.
>>
>> The scripted ones look, at first glance OK, but the data isn't very rich.
>>
>> Also, please can we have some API tests in "TestAPI". These are JUnit tests
>> in java. These should be have comprehensive coverage.
>>
>> I also tried out execConstructTriples(), I noticed that the result is from
>> all graphs. When just triples are asked for, only those in the default
>> graph should be returned. Template.getTriples calls Quad.asTriple. But it
>> needs to deal with just the default graph, and c can't rely on
>> Quad.asTriple.
>>
>> Andy
>>
>>
>> On 10/08/15 12:44, Qihong Lin wrote:
>>>
>>> Hi,
>>>
>>> I've enriched the syntax tests with "short form" and "default graph"
>>> cases.
>>>
>>> For execution tests, I add the test support in QueryTest for construct
>>> quad with the scripts files and data files in TRIG (see
>>> jena-arq/testing/ARQ/Construct/*.trig). I think construct quad should
>>> be part of the construct of ARQ. So I add the execution tests in
>>> jena-arq/testing/ARQ/Construct/manifest.ttl.
>>>
>>> The fuseki part of construct quad has been implemented (not committed
>>> yet). I'll submit the code as soon as the PR 89 [1] being merged.
>>> Anything to be improved for PR 89 from your reviews?
>>>
>>> regards,
>>> Qihong
>>>
>>> [1] https://github.com/apache/jena/pull/89
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Qihong Lin <co...@gmail.com>.
hi Andy,
I'll further enrich the test data and add JUnit tests in TestAPI for
better coverage.
I'm thinking of the problem you mentioned. In fact, there're 2 types
of query strings:
a) Query String without Construct Quad, e.g. "CONSTRUCT { ?s ?p ?o }
WHERE { ?s ?p ?o }";
b) Query String with Construct Quad, e.g. "CONSTRUCT { ?s ?p ?o GRAPH
:g1 { :s1 ?p :o1 } } WHERE { ?s ?p ?o }"
Also, the users can choose to execute 2 kinds of query methods:
1) Iterator<Triple> execTriples()
2) Iterator<Quad> execQuads()
These make 4 cases:
a)+1): No problem, original ARQ construct query
b)+2): No problem, new construct quad query
a)+2): The result quads are in the default graph? Or just throw
exception saying the query string not working with the query method?
b)+1)(you mentioned): The result triples contain only the "?s ?p ?o"
part, ignoring construct "GRAPH :g1 { :s1 ?p :o1 }"? Or just throw
exception saying the query string not working with the query method?
Could you please tell me your opnions about the last 2 cases?
regards,
Qihong
On Mon, Aug 10, 2015 at 9:58 PM, Andy Seaborne <an...@apache.org> wrote:
> I've managed to integrate the latest updates.
>
> The scripted ones look, at first glance OK, but the data isn't very rich.
>
> Also, please can we have some API tests in "TestAPI". These are JUnit tests
> in java. These should be have comprehensive coverage.
>
> I also tried out execConstructTriples(), I noticed that the result is from
> all graphs. When just triples are asked for, only those in the default
> graph should be returned. Template.getTriples calls Quad.asTriple. But it
> needs to deal with just the default graph, and c can't rely on
> Quad.asTriple.
>
> Andy
>
>
> On 10/08/15 12:44, Qihong Lin wrote:
>>
>> Hi,
>>
>> I've enriched the syntax tests with "short form" and "default graph"
>> cases.
>>
>> For execution tests, I add the test support in QueryTest for construct
>> quad with the scripts files and data files in TRIG (see
>> jena-arq/testing/ARQ/Construct/*.trig). I think construct quad should
>> be part of the construct of ARQ. So I add the execution tests in
>> jena-arq/testing/ARQ/Construct/manifest.ttl.
>>
>> The fuseki part of construct quad has been implemented (not committed
>> yet). I'll submit the code as soon as the PR 89 [1] being merged.
>> Anything to be improved for PR 89 from your reviews?
>>
>> regards,
>> Qihong
>>
>> [1] https://github.com/apache/jena/pull/89
>>
>>
>> On Thu, Aug 6, 2015 at 8:55 PM, Andy Seaborne <an...@apache.org> wrote:
>>>
>>> Hi - looking better - I see the syntax tests I provided.
>>>
>>> Does that set of tests cover all cases of the new syntax?
>>>
>>> Next, we need execution tests for ARQ.
>>>
>>>> There will need to be execute tests in jena-arq as well. These can be
>>>> Junit tests in java and do not need to be external script files.
>>>> This is separate from testing in Fuseki.
>>>
>>>
>>>
>>> Do you have any other constraints on your time over the next 2 weeks?
>>>
>>> Andy
>>>
>>>
>>> On 06/08/15 04:18, Qihong Lin wrote:
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I've fixed the bugs related to syntax checks. Please see my latest
>>>> commits. Here're the output of the syntax files through qparse (you
>>>> can also run "ExampleConstructQuads.java" to get the results). Are
>>>> these with the expected behaviors, especially for
>>>> "syntax-quad-construct-07.arq"?
>>>>
>>>> run-construct-quad-test: ======== File: syntax-quad-construct-01.arq
>>>> PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of qparse
>>>> --file syntax-quad-construct-01.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH :g { :s :p :o .} } WHERE { } ======== File:
>>>> syntax-quad-construct-02.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ==== Output of
>>>> qparse --file syntax-quad-construct-02.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o .} } WHERE { ?s ?p ?o } ========
>>>> File: syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>> syntax-quad-construct-04.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g { ?s ?p
>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-04.arq
>>>> PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . } WHERE { GRAPH ?g { ?s
>>>> ?p ?o } } ======== File: syntax-quad-construct-05.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g { ?s ?p
>>>> ?o } } ==== Output of qparse --file syntax-quad-construct-05.arq
>>>> PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { ?s ?p ?o . GRAPH ?g { :s :p :o .} } WHERE { GRAPH ?g { ?s
>>>> ?p ?o } } ======== File: syntax-quad-construct-06.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s
>>>> ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE { GRAPH ?g
>>>> { ?s ?p ?o } } ==== Output of qparse --file
>>>> syntax-quad-construct-06.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g {
>>>> ?s ?p ?o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s ?p ?o .} } WHERE {
>>>> GRAPH ?g { ?s ?p ?o } } ======== File:
>>>> syntax-quad-construct-07.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} } WHERE
>>>> {} ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>> : <http://example/>
>>>>
>>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>>> syntax-quad-construct-08.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE { }
>>>> ==== Output of qparse --file syntax-quad-construct-08.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o .} GRAPH ?g1 { :s :p :o .} } WHERE {
>>>> }
>>>>
>>>> On Sun, Aug 2, 2015 at 9:14 AM, Ying Jiang <jp...@gmail.com>
>>>> wrote:
>>>>>
>>>>>
>>>>> Hi Qihong,
>>>>>
>>>>> I re-checked the code you commited. Most of the hashCode issues
>>>>> for arq.qparse that Andy pointed out are due to the incorrect
>>>>> serialization of the Template. The code can only deal with the
>>>>> quads with the same graph node, for which it may not always be the
>>>>> case in practcial terms. Please make sure each example syntax file
>>>>> can pass the checking process of arq.qparse.
>>>>>
>>>>> It's August now. You'd better hurry up and make the project
>>>>> completed on time in the remaining weeks.
>>>>>
>>>>> Best regards, Ying Jiang
>>>>>
>>>>> On Thu, Jul 30, 2015 at 6:03 AM, Andy Seaborne <an...@apache.org>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> Output of * each examnple syntax file (the queries are nonsense
>>>>>> in practcial terms!) * running arq.qparse on the file * notes on
>>>>>> what seems to be going on
>>>>>>
>>>>>> Andy
>>>>>>
>>>>>> ======== File: syntax-quad-construct-01.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of
>>>>>> qparse --file syntax-quad-construct-01.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <http://example/g> {:s :p :o .} } WHERE { }
>>>>>> ---- Issue: Minor: formatting of <http://example/g> should be :g
>>>>>>
>>>>>> ======== File: syntax-quad-construct-02.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ====
>>>>>> Output of qparse --file syntax-quad-construct-02.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {?s ?p ?o .} } WHERE { ?s ?p ?o } ---- OK
>>>>>>
>>>>>> ======== File: syntax-quad-construct-03.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>> WHERE { } ---- Issue: Major: The output is contains "GRAPH
>>>>>> <urn:x-arq:DefaultGraphNode>"
>>>>>>
>>>>>> Note: <urn:x-arq:DefaultGraphNode> is for internal use only.
>>>>>>
>>>>>> For syntax, that is a named graph just like <http://example/g>
>>>>>>
>>>>>> ======== File: syntax-quad-construct-04.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g {
>>>>>> ?s ?p ?o } }
>>>>>>
>>>>>> ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>>>
>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>> input query Query (hashCode: 1768688961)= PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>> ?s ?p ?o } }
>>>>>>
>>>>>>
>>>>>> Query2 (hashCode: 1896249441)= PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>> ?s ?p ?o } }
>>>>>>
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>>> ?s ?p ?o } } ---- Issue: The output puts the following triple
>>>>>> into the GRAPH. See also syntax-quad-construct-08.arq
>>>>>>
>>>>>> ======== File: syntax-quad-construct-05.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g {
>>>>>> ?s ?p ?o } }
>>>>>>
>>>>>> ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>>>
>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>> input query Query (hashCode: -262437683)= PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>
>>>>>>
>>>>>> Query2 (hashCode: -399379987)= PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>>
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } } ---- Issue: Plain ?s ?p
>>>>>> ?o has been put into a named graph Adjacent blocks have merged.
>>>>>>
>>>>>> ======== File: syntax-quad-construct-06.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g
>>>>>> { ?s ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE {
>>>>>> GRAPH ?g { ?s ?p ?o } }
>>>>>>
>>>>>> ==== Output of qparse --file syntax-quad-construct-06.arq
>>>>>>
>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>> input query Query (hashCode: -1800516808)= PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>> ?o } }
>>>>>>
>>>>>>
>>>>>> Query2 (hashCode: -129418312)= PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>> ?o } }
>>>>>>
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>>> ?o } } ---- Issue: Same as previous.
>>>>>>
>>>>>> ======== File: syntax-quad-construct-07.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>> WHERE {}
>>>>>>
>>>>>> ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>>>> : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>>> WHERE { } ---- Issue: Should be different. A named graph of
>>>>>> GRAPH <urn:x-arq:DefaultGraphNode> is not the default graph.
>>>>>>
>>>>>> ======== File: syntax-quad-construct-08.arq PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE
>>>>>> { }
>>>>>>
>>>>>> ==== Output of qparse --file syntax-quad-construct-08.arq
>>>>>>
>>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>>> input query Query (hashCode: 636900208)= PREFIX :
>>>>>> <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>
>>>>>>
>>>>>> Query2 (hashCode: 636999583)= PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>>
>>>>>> PREFIX : <http://example/>
>>>>>>
>>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { } ----
>>>>>> Issue: Adjacent GRAPH blocks have merged.
>>>>>>
>>>
>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Andy Seaborne <an...@apache.org>.
I've managed to integrate the latest updates.
The scripted ones look, at first glance OK, but the data isn't very rich.
Also, please can we have some API tests in "TestAPI". These are JUnit
tests in java. These should be have comprehensive coverage.
I also tried out execConstructTriples(), I noticed that the result is
from all graphs. When just triples are asked for, only those in the
default graph should be returned. Template.getTriples calls
Quad.asTriple. But it needs to deal with just the default graph, and c
can't rely on Quad.asTriple.
Andy
On 10/08/15 12:44, Qihong Lin wrote:
> Hi,
>
> I've enriched the syntax tests with "short form" and "default graph" cases.
>
> For execution tests, I add the test support in QueryTest for construct
> quad with the scripts files and data files in TRIG (see
> jena-arq/testing/ARQ/Construct/*.trig). I think construct quad should
> be part of the construct of ARQ. So I add the execution tests in
> jena-arq/testing/ARQ/Construct/manifest.ttl.
>
> The fuseki part of construct quad has been implemented (not committed
> yet). I'll submit the code as soon as the PR 89 [1] being merged.
> Anything to be improved for PR 89 from your reviews?
>
> regards,
> Qihong
>
> [1] https://github.com/apache/jena/pull/89
>
>
> On Thu, Aug 6, 2015 at 8:55 PM, Andy Seaborne <an...@apache.org> wrote:
>> Hi - looking better - I see the syntax tests I provided.
>>
>> Does that set of tests cover all cases of the new syntax?
>>
>> Next, we need execution tests for ARQ.
>>
>>> There will need to be execute tests in jena-arq as well. These can be
>>> Junit tests in java and do not need to be external script files.
>>> This is separate from testing in Fuseki.
>>
>>
>> Do you have any other constraints on your time over the next 2 weeks?
>>
>> Andy
>>
>>
>> On 06/08/15 04:18, Qihong Lin wrote:
>>>
>>> Hi,
>>>
>>> I've fixed the bugs related to syntax checks. Please see my latest
>>> commits. Here're the output of the syntax files through qparse (you
>>> can also run "ExampleConstructQuads.java" to get the results). Are
>>> these with the expected behaviors, especially for
>>> "syntax-quad-construct-07.arq"?
>>>
>>> run-construct-quad-test: ======== File: syntax-quad-construct-01.arq
>>> PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of qparse
>>> --file syntax-quad-construct-01.arq PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH :g { :s :p :o .} } WHERE { } ======== File:
>>> syntax-quad-construct-02.arq PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ==== Output of
>>> qparse --file syntax-quad-construct-02.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o .} } WHERE { ?s ?p ?o } ========
>>> File: syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>
>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>
>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>> syntax-quad-construct-04.arq PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g { ?s ?p
>>> ?o } } ==== Output of qparse --file syntax-quad-construct-04.arq
>>> PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . } WHERE { GRAPH ?g { ?s
>>> ?p ?o } } ======== File: syntax-quad-construct-05.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g { ?s ?p
>>> ?o } } ==== Output of qparse --file syntax-quad-construct-05.arq
>>> PREFIX : <http://example/>
>>>
>>> CONSTRUCT { ?s ?p ?o . GRAPH ?g { :s :p :o .} } WHERE { GRAPH ?g { ?s
>>> ?p ?o } } ======== File: syntax-quad-construct-06.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s
>>> ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE { GRAPH ?g
>>> { ?s ?p ?o } } ==== Output of qparse --file
>>> syntax-quad-construct-06.arq PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g {
>>> ?s ?p ?o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s ?p ?o .} } WHERE {
>>> GRAPH ?g { ?s ?p ?o } } ======== File:
>>> syntax-quad-construct-07.arq PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} } WHERE
>>> {} ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>> : <http://example/>
>>>
>>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>>> syntax-quad-construct-08.arq PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE { }
>>> ==== Output of qparse --file syntax-quad-construct-08.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g { :s :p :o .} GRAPH ?g1 { :s :p :o .} } WHERE {
>>> }
>>>
>>> On Sun, Aug 2, 2015 at 9:14 AM, Ying Jiang <jp...@gmail.com>
>>> wrote:
>>>>
>>>> Hi Qihong,
>>>>
>>>> I re-checked the code you commited. Most of the hashCode issues
>>>> for arq.qparse that Andy pointed out are due to the incorrect
>>>> serialization of the Template. The code can only deal with the
>>>> quads with the same graph node, for which it may not always be the
>>>> case in practcial terms. Please make sure each example syntax file
>>>> can pass the checking process of arq.qparse.
>>>>
>>>> It's August now. You'd better hurry up and make the project
>>>> completed on time in the remaining weeks.
>>>>
>>>> Best regards, Ying Jiang
>>>>
>>>> On Thu, Jul 30, 2015 at 6:03 AM, Andy Seaborne <an...@apache.org>
>>>> wrote:
>>>>>
>>>>> Output of * each examnple syntax file (the queries are nonsense
>>>>> in practcial terms!) * running arq.qparse on the file * notes on
>>>>> what seems to be going on
>>>>>
>>>>> Andy
>>>>>
>>>>> ======== File: syntax-quad-construct-01.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of
>>>>> qparse --file syntax-quad-construct-01.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH <http://example/g> {:s :p :o .} } WHERE { }
>>>>> ---- Issue: Minor: formatting of <http://example/g> should be :g
>>>>>
>>>>> ======== File: syntax-quad-construct-02.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ====
>>>>> Output of qparse --file syntax-quad-construct-02.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g {?s ?p ?o .} } WHERE { ?s ?p ?o } ---- OK
>>>>>
>>>>> ======== File: syntax-quad-construct-03.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>> WHERE { } ---- Issue: Major: The output is contains "GRAPH
>>>>> <urn:x-arq:DefaultGraphNode>"
>>>>>
>>>>> Note: <urn:x-arq:DefaultGraphNode> is for internal use only.
>>>>>
>>>>> For syntax, that is a named graph just like <http://example/g>
>>>>>
>>>>> ======== File: syntax-quad-construct-04.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g {
>>>>> ?s ?p ?o } }
>>>>>
>>>>> ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>>
>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>> input query Query (hashCode: 1768688961)= PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>> ?s ?p ?o } }
>>>>>
>>>>>
>>>>> Query2 (hashCode: 1896249441)= PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>> ?s ?p ?o } }
>>>>>
>>>>> PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>>> ?s ?p ?o } } ---- Issue: The output puts the following triple
>>>>> into the GRAPH. See also syntax-quad-construct-08.arq
>>>>>
>>>>> ======== File: syntax-quad-construct-05.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g {
>>>>> ?s ?p ?o } }
>>>>>
>>>>> ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>>
>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>> input query Query (hashCode: -262437683)= PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>
>>>>>
>>>>> Query2 (hashCode: -399379987)= PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>>
>>>>> PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } } ---- Issue: Plain ?s ?p
>>>>> ?o has been put into a named graph Adjacent blocks have merged.
>>>>>
>>>>> ======== File: syntax-quad-construct-06.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g
>>>>> { ?s ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE {
>>>>> GRAPH ?g { ?s ?p ?o } }
>>>>>
>>>>> ==== Output of qparse --file syntax-quad-construct-06.arq
>>>>>
>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>> input query Query (hashCode: -1800516808)= PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>> ?o } }
>>>>>
>>>>>
>>>>> Query2 (hashCode: -129418312)= PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>> ?o } }
>>>>>
>>>>> PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>>> ?o } } ---- Issue: Same as previous.
>>>>>
>>>>> ======== File: syntax-quad-construct-07.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>> WHERE {}
>>>>>
>>>>> ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>>> : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>>> WHERE { } ---- Issue: Should be different. A named graph of
>>>>> GRAPH <urn:x-arq:DefaultGraphNode> is not the default graph.
>>>>>
>>>>> ======== File: syntax-quad-construct-08.arq PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE
>>>>> { }
>>>>>
>>>>> ==== Output of qparse --file syntax-quad-construct-08.arq
>>>>>
>>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>>> input query Query (hashCode: 636900208)= PREFIX :
>>>>> <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>
>>>>>
>>>>> Query2 (hashCode: 636999583)= PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>>
>>>>> PREFIX : <http://example/>
>>>>>
>>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { } ----
>>>>> Issue: Adjacent GRAPH blocks have merged.
>>>>>
>>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Qihong Lin <co...@gmail.com>.
Hi,
I've enriched the syntax tests with "short form" and "default graph" cases.
For execution tests, I add the test support in QueryTest for construct
quad with the scripts files and data files in TRIG (see
jena-arq/testing/ARQ/Construct/*.trig). I think construct quad should
be part of the construct of ARQ. So I add the execution tests in
jena-arq/testing/ARQ/Construct/manifest.ttl.
The fuseki part of construct quad has been implemented (not committed
yet). I'll submit the code as soon as the PR 89 [1] being merged.
Anything to be improved for PR 89 from your reviews?
regards,
Qihong
[1] https://github.com/apache/jena/pull/89
On Thu, Aug 6, 2015 at 8:55 PM, Andy Seaborne <an...@apache.org> wrote:
> Hi - looking better - I see the syntax tests I provided.
>
> Does that set of tests cover all cases of the new syntax?
>
> Next, we need execution tests for ARQ.
>
>> There will need to be execute tests in jena-arq as well. These can be
>> Junit tests in java and do not need to be external script files.
>> This is separate from testing in Fuseki.
>
>
> Do you have any other constraints on your time over the next 2 weeks?
>
> Andy
>
>
> On 06/08/15 04:18, Qihong Lin wrote:
>>
>> Hi,
>>
>> I've fixed the bugs related to syntax checks. Please see my latest
>> commits. Here're the output of the syntax files through qparse (you
>> can also run "ExampleConstructQuads.java" to get the results). Are
>> these with the expected behaviors, especially for
>> "syntax-quad-construct-07.arq"?
>>
>> run-construct-quad-test: ======== File: syntax-quad-construct-01.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of qparse
>> --file syntax-quad-construct-01.arq PREFIX : <http://example/>
>>
>> CONSTRUCT { GRAPH :g { :s :p :o .} } WHERE { } ======== File:
>> syntax-quad-construct-02.arq PREFIX : <http://example/>
>>
>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ==== Output of
>> qparse --file syntax-quad-construct-02.arq PREFIX :
>> <http://example/>
>>
>> CONSTRUCT { GRAPH ?g { ?s ?p ?o .} } WHERE { ?s ?p ?o } ========
>> File: syntax-quad-construct-03.arq PREFIX : <http://example/>
>>
>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>
>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>> syntax-quad-construct-04.arq PREFIX : <http://example/>
>>
>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g { ?s ?p
>> ?o } } ==== Output of qparse --file syntax-quad-construct-04.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . } WHERE { GRAPH ?g { ?s
>> ?p ?o } } ======== File: syntax-quad-construct-05.arq PREFIX :
>> <http://example/>
>>
>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g { ?s ?p
>> ?o } } ==== Output of qparse --file syntax-quad-construct-05.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT { ?s ?p ?o . GRAPH ?g { :s :p :o .} } WHERE { GRAPH ?g { ?s
>> ?p ?o } } ======== File: syntax-quad-construct-06.arq PREFIX :
>> <http://example/>
>>
>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s
>> ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE { GRAPH ?g
>> { ?s ?p ?o } } ==== Output of qparse --file
>> syntax-quad-construct-06.arq PREFIX : <http://example/>
>>
>> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g {
>> ?s ?p ?o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s ?p ?o .} } WHERE {
>> GRAPH ?g { ?s ?p ?o } } ======== File:
>> syntax-quad-construct-07.arq PREFIX : <http://example/>
>>
>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} } WHERE
>> {} ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>> : <http://example/>
>>
>> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
>> syntax-quad-construct-08.arq PREFIX : <http://example/>
>>
>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE { }
>> ==== Output of qparse --file syntax-quad-construct-08.arq PREFIX :
>> <http://example/>
>>
>> CONSTRUCT { GRAPH ?g { :s :p :o .} GRAPH ?g1 { :s :p :o .} } WHERE {
>> }
>>
>> On Sun, Aug 2, 2015 at 9:14 AM, Ying Jiang <jp...@gmail.com>
>> wrote:
>>>
>>> Hi Qihong,
>>>
>>> I re-checked the code you commited. Most of the hashCode issues
>>> for arq.qparse that Andy pointed out are due to the incorrect
>>> serialization of the Template. The code can only deal with the
>>> quads with the same graph node, for which it may not always be the
>>> case in practcial terms. Please make sure each example syntax file
>>> can pass the checking process of arq.qparse.
>>>
>>> It's August now. You'd better hurry up and make the project
>>> completed on time in the remaining weeks.
>>>
>>> Best regards, Ying Jiang
>>>
>>> On Thu, Jul 30, 2015 at 6:03 AM, Andy Seaborne <an...@apache.org>
>>> wrote:
>>>>
>>>> Output of * each examnple syntax file (the queries are nonsense
>>>> in practcial terms!) * running arq.qparse on the file * notes on
>>>> what seems to be going on
>>>>
>>>> Andy
>>>>
>>>> ======== File: syntax-quad-construct-01.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of
>>>> qparse --file syntax-quad-construct-01.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH <http://example/g> {:s :p :o .} } WHERE { }
>>>> ---- Issue: Minor: formatting of <http://example/g> should be :g
>>>>
>>>> ======== File: syntax-quad-construct-02.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ====
>>>> Output of qparse --file syntax-quad-construct-02.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g {?s ?p ?o .} } WHERE { ?s ?p ?o } ---- OK
>>>>
>>>> ======== File: syntax-quad-construct-03.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>> WHERE { } ---- Issue: Major: The output is contains "GRAPH
>>>> <urn:x-arq:DefaultGraphNode>"
>>>>
>>>> Note: <urn:x-arq:DefaultGraphNode> is for internal use only.
>>>>
>>>> For syntax, that is a named graph just like <http://example/g>
>>>>
>>>> ======== File: syntax-quad-construct-04.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g {
>>>> ?s ?p ?o } }
>>>>
>>>> ==== Output of qparse --file syntax-quad-construct-04.arq
>>>>
>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>> input query Query (hashCode: 1768688961)= PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>> ?s ?p ?o } }
>>>>
>>>>
>>>> Query2 (hashCode: 1896249441)= PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>> ?s ?p ?o } }
>>>>
>>>> PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>>> ?s ?p ?o } } ---- Issue: The output puts the following triple
>>>> into the GRAPH. See also syntax-quad-construct-08.arq
>>>>
>>>> ======== File: syntax-quad-construct-05.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g {
>>>> ?s ?p ?o } }
>>>>
>>>> ==== Output of qparse --file syntax-quad-construct-05.arq
>>>>
>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>> input query Query (hashCode: -262437683)= PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>
>>>>
>>>> Query2 (hashCode: -399379987)= PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>>
>>>> PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } } ---- Issue: Plain ?s ?p
>>>> ?o has been put into a named graph Adjacent blocks have merged.
>>>>
>>>> ======== File: syntax-quad-construct-06.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g
>>>> { ?s ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE {
>>>> GRAPH ?g { ?s ?p ?o } }
>>>>
>>>> ==== Output of qparse --file syntax-quad-construct-06.arq
>>>>
>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>> input query Query (hashCode: -1800516808)= PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>> ?o } }
>>>>
>>>>
>>>> Query2 (hashCode: -129418312)= PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>> ?o } }
>>>>
>>>> PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>>> ?o } } ---- Issue: Same as previous.
>>>>
>>>> ======== File: syntax-quad-construct-07.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>> WHERE {}
>>>>
>>>> ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>>> : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>>> WHERE { } ---- Issue: Should be different. A named graph of
>>>> GRAPH <urn:x-arq:DefaultGraphNode> is not the default graph.
>>>>
>>>> ======== File: syntax-quad-construct-08.arq PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE
>>>> { }
>>>>
>>>> ==== Output of qparse --file syntax-quad-construct-08.arq
>>>>
>>>> **** Check failure: reparsed query hashCode does not equal parsed
>>>> input query Query (hashCode: 636900208)= PREFIX :
>>>> <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>
>>>>
>>>> Query2 (hashCode: 636999583)= PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>>
>>>> PREFIX : <http://example/>
>>>>
>>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { } ----
>>>> Issue: Adjacent GRAPH blocks have merged.
>>>>
>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Andy Seaborne <an...@apache.org>.
Hi - looking better - I see the syntax tests I provided.
Does that set of tests cover all cases of the new syntax?
Next, we need execution tests for ARQ.
> There will need to be execute tests in jena-arq as well. These can be
> Junit tests in java and do not need to be external script files.
> This is separate from testing in Fuseki.
Do you have any other constraints on your time over the next 2 weeks?
Andy
On 06/08/15 04:18, Qihong Lin wrote:
> Hi,
>
> I've fixed the bugs related to syntax checks. Please see my latest
> commits. Here're the output of the syntax files through qparse (you
> can also run "ExampleConstructQuads.java" to get the results). Are
> these with the expected behaviors, especially for
> "syntax-quad-construct-07.arq"?
>
> run-construct-quad-test: ======== File: syntax-quad-construct-01.arq
> PREFIX : <http://example/>
>
> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of qparse
> --file syntax-quad-construct-01.arq PREFIX : <http://example/>
>
> CONSTRUCT { GRAPH :g { :s :p :o .} } WHERE { } ======== File:
> syntax-quad-construct-02.arq PREFIX : <http://example/>
>
> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ==== Output of
> qparse --file syntax-quad-construct-02.arq PREFIX :
> <http://example/>
>
> CONSTRUCT { GRAPH ?g { ?s ?p ?o .} } WHERE { ?s ?p ?o } ========
> File: syntax-quad-construct-03.arq PREFIX : <http://example/>
>
> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
> syntax-quad-construct-03.arq PREFIX : <http://example/>
>
> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
> syntax-quad-construct-04.arq PREFIX : <http://example/>
>
> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g { ?s ?p
> ?o } } ==== Output of qparse --file syntax-quad-construct-04.arq
> PREFIX : <http://example/>
>
> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . } WHERE { GRAPH ?g { ?s
> ?p ?o } } ======== File: syntax-quad-construct-05.arq PREFIX :
> <http://example/>
>
> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g { ?s ?p
> ?o } } ==== Output of qparse --file syntax-quad-construct-05.arq
> PREFIX : <http://example/>
>
> CONSTRUCT { ?s ?p ?o . GRAPH ?g { :s :p :o .} } WHERE { GRAPH ?g { ?s
> ?p ?o } } ======== File: syntax-quad-construct-06.arq PREFIX :
> <http://example/>
>
> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s
> ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE { GRAPH ?g
> { ?s ?p ?o } } ==== Output of qparse --file
> syntax-quad-construct-06.arq PREFIX : <http://example/>
>
> CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g {
> ?s ?p ?o .} ?s ?p ?o . ?s ?p ?o . GRAPH ?g { ?s ?p ?o .} } WHERE {
> GRAPH ?g { ?s ?p ?o } } ======== File:
> syntax-quad-construct-07.arq PREFIX : <http://example/>
>
> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} } WHERE
> {} ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
> : <http://example/>
>
> CONSTRUCT { :s :p :o . } WHERE { } ======== File:
> syntax-quad-construct-08.arq PREFIX : <http://example/>
>
> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE { }
> ==== Output of qparse --file syntax-quad-construct-08.arq PREFIX :
> <http://example/>
>
> CONSTRUCT { GRAPH ?g { :s :p :o .} GRAPH ?g1 { :s :p :o .} } WHERE {
> }
>
> On Sun, Aug 2, 2015 at 9:14 AM, Ying Jiang <jp...@gmail.com>
> wrote:
>> Hi Qihong,
>>
>> I re-checked the code you commited. Most of the hashCode issues
>> for arq.qparse that Andy pointed out are due to the incorrect
>> serialization of the Template. The code can only deal with the
>> quads with the same graph node, for which it may not always be the
>> case in practcial terms. Please make sure each example syntax file
>> can pass the checking process of arq.qparse.
>>
>> It's August now. You'd better hurry up and make the project
>> completed on time in the remaining weeks.
>>
>> Best regards, Ying Jiang
>>
>> On Thu, Jul 30, 2015 at 6:03 AM, Andy Seaborne <an...@apache.org>
>> wrote:
>>> Output of * each examnple syntax file (the queries are nonsense
>>> in practcial terms!) * running arq.qparse on the file * notes on
>>> what seems to be going on
>>>
>>> Andy
>>>
>>> ======== File: syntax-quad-construct-01.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {} ==== Output of
>>> qparse --file syntax-quad-construct-01.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH <http://example/g> {:s :p :o .} } WHERE { }
>>> ---- Issue: Minor: formatting of <http://example/g> should be :g
>>>
>>> ======== File: syntax-quad-construct-02.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o } ====
>>> Output of qparse --file syntax-quad-construct-02.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g {?s ?p ?o .} } WHERE { ?s ?p ?o } ---- OK
>>>
>>> ======== File: syntax-quad-construct-03.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { :s :p :o } WHERE {} ==== Output of qparse --file
>>> syntax-quad-construct-03.arq PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>> WHERE { } ---- Issue: Major: The output is contains "GRAPH
>>> <urn:x-arq:DefaultGraphNode>"
>>>
>>> Note: <urn:x-arq:DefaultGraphNode> is for internal use only.
>>>
>>> For syntax, that is a named graph just like <http://example/g>
>>>
>>> ======== File: syntax-quad-construct-04.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o } WHERE { GRAPH ?g {
>>> ?s ?p ?o } }
>>>
>>> ==== Output of qparse --file syntax-quad-construct-04.arq
>>>
>>> **** Check failure: reparsed query hashCode does not equal parsed
>>> input query Query (hashCode: 1768688961)= PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>> ?s ?p ?o } }
>>>
>>>
>>> Query2 (hashCode: 1896249441)= PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>> ?s ?p ?o } }
>>>
>>> PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o .} } WHERE { GRAPH ?g {
>>> ?s ?p ?o } } ---- Issue: The output puts the following triple
>>> into the GRAPH. See also syntax-quad-construct-08.arq
>>>
>>> ======== File: syntax-quad-construct-05.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { ?s ?p ?o GRAPH ?g { :s :p :o } } WHERE { GRAPH ?g {
>>> ?s ?p ?o } }
>>>
>>> ==== Output of qparse --file syntax-quad-construct-05.arq
>>>
>>> **** Check failure: reparsed query hashCode does not equal parsed
>>> input query Query (hashCode: -262437683)= PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>
>>>
>>> Query2 (hashCode: -399379987)= PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } }
>>>
>>> PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o . :s :p
>>> :o .} } WHERE { GRAPH ?g { ?s ?p ?o } } ---- Issue: Plain ?s ?p
>>> ?o has been put into a named graph Adjacent blocks have merged.
>>>
>>> ======== File: syntax-quad-construct-06.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g { :s :p :o } ?s ?p ?o . ?s ?p ?o . GRAPH ?g
>>> { ?s ?p ?o } ?s ?p ?o . ?s ?p ?o GRAPH ?g { ?s ?p ?o } } WHERE {
>>> GRAPH ?g { ?s ?p ?o } }
>>>
>>> ==== Output of qparse --file syntax-quad-construct-06.arq
>>>
>>> **** Check failure: reparsed query hashCode does not equal parsed
>>> input query Query (hashCode: -1800516808)= PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>> ?o } }
>>>
>>>
>>> Query2 (hashCode: -129418312)= PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>> ?o } }
>>>
>>> PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g {:s :p :o . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o
>>> . ?s ?p ?o . ?s ?p ?o . ?s ?p ?o .} } WHERE { GRAPH ?g { ?s ?p
>>> ?o } } ---- Issue: Same as previous.
>>>
>>> ======== File: syntax-quad-construct-07.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>> WHERE {}
>>>
>>> ==== Output of qparse --file syntax-quad-construct-07.arq PREFIX
>>> : <http://example/>
>>>
>>> CONSTRUCT { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .} }
>>> WHERE { } ---- Issue: Should be different. A named graph of
>>> GRAPH <urn:x-arq:DefaultGraphNode> is not the default graph.
>>>
>>> ======== File: syntax-quad-construct-08.arq PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g { :s :p :o } GRAPH ?g1 { :s :p :o } } WHERE
>>> { }
>>>
>>> ==== Output of qparse --file syntax-quad-construct-08.arq
>>>
>>> **** Check failure: reparsed query hashCode does not equal parsed
>>> input query Query (hashCode: 636900208)= PREFIX :
>>> <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>
>>>
>>> Query2 (hashCode: 636999583)= PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { }
>>>
>>> PREFIX : <http://example/>
>>>
>>> CONSTRUCT { GRAPH ?g {:s :p :o . :s :p :o .} } WHERE { } ----
>>> Issue: Adjacent GRAPH blocks have merged.
>>>
Re: Fwd: Final Deliveries of GSoC Project (JENA-491)
Posted by Qihong Lin <co...@gmail.com>.
Hi,
I've fixed the bugs related to syntax checks. Please see my latest
commits. Here're the output of the syntax files through qparse (you
can also run "ExampleConstructQuads.java" to get the results). Are
these with the expected behaviors, especially for
"syntax-quad-construct-07.arq"?
run-construct-quad-test:
======== File: syntax-quad-construct-01.arq
PREFIX : <http://example/>
CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {}
==== Output of qparse --file syntax-quad-construct-01.arq
PREFIX : <http://example/>
CONSTRUCT
{
GRAPH :g
{ :s :p :o .}
}
WHERE
{ }
======== File: syntax-quad-construct-02.arq
PREFIX : <http://example/>
CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o }
==== Output of qparse --file syntax-quad-construct-02.arq
PREFIX : <http://example/>
CONSTRUCT
{
GRAPH ?g
{ ?s ?p ?o .}
}
WHERE
{ ?s ?p ?o }
======== File: syntax-quad-construct-03.arq
PREFIX : <http://example/>
CONSTRUCT { :s :p :o } WHERE {}
==== Output of qparse --file syntax-quad-construct-03.arq
PREFIX : <http://example/>
CONSTRUCT
{
:s :p :o .
}
WHERE
{ }
======== File: syntax-quad-construct-04.arq
PREFIX : <http://example/>
CONSTRUCT {
GRAPH ?g { :s :p :o }
?s ?p ?o
}
WHERE
{ GRAPH ?g { ?s ?p ?o } }
==== Output of qparse --file syntax-quad-construct-04.arq
PREFIX : <http://example/>
CONSTRUCT
{
GRAPH ?g
{ :s :p :o .}
?s ?p ?o .
}
WHERE
{ GRAPH ?g
{ ?s ?p ?o }
}
======== File: syntax-quad-construct-05.arq
PREFIX : <http://example/>
CONSTRUCT {
?s ?p ?o
GRAPH ?g { :s :p :o }
}
WHERE
{ GRAPH ?g { ?s ?p ?o } }
==== Output of qparse --file syntax-quad-construct-05.arq
PREFIX : <http://example/>
CONSTRUCT
{
?s ?p ?o .
GRAPH ?g
{ :s :p :o .}
}
WHERE
{ GRAPH ?g
{ ?s ?p ?o }
}
======== File: syntax-quad-construct-06.arq
PREFIX : <http://example/>
CONSTRUCT {
GRAPH ?g { :s :p :o }
?s ?p ?o .
?s ?p ?o .
GRAPH ?g { ?s ?p ?o }
?s ?p ?o .
?s ?p ?o
GRAPH ?g { ?s ?p ?o }
}
WHERE
{ GRAPH ?g { ?s ?p ?o } }
==== Output of qparse --file syntax-quad-construct-06.arq
PREFIX : <http://example/>
CONSTRUCT
{
GRAPH ?g
{ :s :p :o .}
?s ?p ?o .
?s ?p ?o .
GRAPH ?g
{ ?s ?p ?o .}
?s ?p ?o .
?s ?p ?o .
GRAPH ?g
{ ?s ?p ?o .}
}
WHERE
{ GRAPH ?g
{ ?s ?p ?o }
}
======== File: syntax-quad-construct-07.arq
PREFIX : <http://example/>
CONSTRUCT {
GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .}
}
WHERE {}
==== Output of qparse --file syntax-quad-construct-07.arq
PREFIX : <http://example/>
CONSTRUCT
{
:s :p :o .
}
WHERE
{ }
======== File: syntax-quad-construct-08.arq
PREFIX : <http://example/>
CONSTRUCT {
GRAPH ?g { :s :p :o }
GRAPH ?g1 { :s :p :o }
}
WHERE
{ }
==== Output of qparse --file syntax-quad-construct-08.arq
PREFIX : <http://example/>
CONSTRUCT
{
GRAPH ?g
{ :s :p :o .}
GRAPH ?g1
{ :s :p :o .}
}
WHERE
{ }
On Sun, Aug 2, 2015 at 9:14 AM, Ying Jiang <jp...@gmail.com> wrote:
> Hi Qihong,
>
> I re-checked the code you commited. Most of the hashCode issues for
> arq.qparse that Andy pointed out are due to the incorrect
> serialization of the Template. The code can only deal with the quads
> with the same graph node, for which it may not always be the case in
> practcial terms. Please make sure each example syntax file can pass
> the checking process of arq.qparse.
>
> It's August now. You'd better hurry up and make the project completed
> on time in the remaining weeks.
>
> Best regards,
> Ying Jiang
>
> On Thu, Jul 30, 2015 at 6:03 AM, Andy Seaborne <an...@apache.org> wrote:
>> Output of
>> * each examnple syntax file (the queries are nonsense in practcial terms!)
>> * running arq.qparse on the file
>> * notes on what seems to be going on
>>
>> Andy
>>
>> ======== File: syntax-quad-construct-01.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {}
>> ==== Output of qparse --file syntax-quad-construct-01.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH <http://example/g> {:s :p :o .}
>> }
>> WHERE
>> { }
>> ---- Issue:
>> Minor: formatting of <http://example/g> should be :g
>>
>> ======== File: syntax-quad-construct-02.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o }
>> ==== Output of qparse --file syntax-quad-construct-02.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH ?g {?s ?p ?o .}
>> }
>> WHERE
>> { ?s ?p ?o }
>> ----
>> OK
>>
>> ======== File: syntax-quad-construct-03.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT { :s :p :o } WHERE {}
>> ==== Output of qparse --file syntax-quad-construct-03.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .}
>> }
>> WHERE
>> { }
>> ---- Issue:
>> Major: The output is contains "GRAPH <urn:x-arq:DefaultGraphNode>"
>>
>> Note: <urn:x-arq:DefaultGraphNode> is for internal use only.
>>
>> For syntax, that is a named graph just like <http://example/g>
>>
>> ======== File: syntax-quad-construct-04.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT {
>> GRAPH ?g { :s :p :o }
>> ?s ?p ?o
>> }
>> WHERE
>> { GRAPH ?g { ?s ?p ?o } }
>>
>> ==== Output of qparse --file syntax-quad-construct-04.arq
>>
>> **** Check failure: reparsed query hashCode does not equal parsed input
>> query
>> Query (hashCode: 1768688961)=
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH ?g {:s :p :o .
>> ?s ?p ?o .}
>> }
>> WHERE
>> { GRAPH ?g
>> { ?s ?p ?o }
>> }
>>
>>
>> Query2 (hashCode: 1896249441)=
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH ?g {:s :p :o .
>> ?s ?p ?o .}
>> }
>> WHERE
>> { GRAPH ?g
>> { ?s ?p ?o }
>> }
>>
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH ?g {:s :p :o .
>> ?s ?p ?o .}
>> }
>> WHERE
>> { GRAPH ?g
>> { ?s ?p ?o }
>> }
>> ---- Issue:
>> The output puts the following triple into the GRAPH.
>> See also syntax-quad-construct-08.arq
>>
>> ======== File: syntax-quad-construct-05.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT {
>> ?s ?p ?o
>> GRAPH ?g { :s :p :o }
>> }
>> WHERE
>> { GRAPH ?g { ?s ?p ?o } }
>>
>> ==== Output of qparse --file syntax-quad-construct-05.arq
>>
>> **** Check failure: reparsed query hashCode does not equal parsed input
>> query
>> Query (hashCode: -262437683)=
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o .
>> :s :p :o .}
>> }
>> WHERE
>> { GRAPH ?g
>> { ?s ?p ?o }
>> }
>>
>>
>> Query2 (hashCode: -399379987)=
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o .
>> :s :p :o .}
>> }
>> WHERE
>> { GRAPH ?g
>> { ?s ?p ?o }
>> }
>>
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH <urn:x-arq:DefaultGraphNode> {?s ?p ?o .
>> :s :p :o .}
>> }
>> WHERE
>> { GRAPH ?g
>> { ?s ?p ?o }
>> }
>> ---- Issue:
>> Plain ?s ?p ?o has been put into a named graph
>> Adjacent blocks have merged.
>>
>> ======== File: syntax-quad-construct-06.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT {
>> GRAPH ?g { :s :p :o }
>> ?s ?p ?o .
>> ?s ?p ?o .
>> GRAPH ?g { ?s ?p ?o }
>> ?s ?p ?o .
>> ?s ?p ?o
>> GRAPH ?g { ?s ?p ?o }
>> }
>> WHERE
>> { GRAPH ?g { ?s ?p ?o } }
>>
>> ==== Output of qparse --file syntax-quad-construct-06.arq
>>
>> **** Check failure: reparsed query hashCode does not equal parsed input
>> query
>> Query (hashCode: -1800516808)=
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH ?g {:s :p :o .
>> ?s ?p ?o .
>> ?s ?p ?o .
>> ?s ?p ?o .
>> ?s ?p ?o .
>> ?s ?p ?o .
>> ?s ?p ?o .}
>> }
>> WHERE
>> { GRAPH ?g
>> { ?s ?p ?o }
>> }
>>
>>
>> Query2 (hashCode: -129418312)=
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH ?g {:s :p :o .
>> ?s ?p ?o .
>> ?s ?p ?o .
>> ?s ?p ?o .
>> ?s ?p ?o .
>> ?s ?p ?o .
>> ?s ?p ?o .}
>> }
>> WHERE
>> { GRAPH ?g
>> { ?s ?p ?o }
>> }
>>
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH ?g {:s :p :o .
>> ?s ?p ?o .
>> ?s ?p ?o .
>> ?s ?p ?o .
>> ?s ?p ?o .
>> ?s ?p ?o .
>> ?s ?p ?o .}
>> }
>> WHERE
>> { GRAPH ?g
>> { ?s ?p ?o }
>> }
>> ---- Issue:
>> Same as previous.
>>
>> ======== File: syntax-quad-construct-07.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT {
>> GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .}
>> }
>> WHERE {}
>>
>> ==== Output of qparse --file syntax-quad-construct-07.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .}
>> }
>> WHERE
>> { }
>> ---- Issue:
>> Should be different. A named graph of GRAPH <urn:x-arq:DefaultGraphNode>
>> is not the default graph.
>>
>> ======== File: syntax-quad-construct-08.arq
>> PREFIX : <http://example/>
>>
>> CONSTRUCT {
>> GRAPH ?g { :s :p :o }
>> GRAPH ?g1 { :s :p :o }
>> }
>> WHERE
>> { }
>>
>> ==== Output of qparse --file syntax-quad-construct-08.arq
>>
>> **** Check failure: reparsed query hashCode does not equal parsed input
>> query
>> Query (hashCode: 636900208)=
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH ?g {:s :p :o .
>> :s :p :o .}
>> }
>> WHERE
>> { }
>>
>>
>> Query2 (hashCode: 636999583)=
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH ?g {:s :p :o .
>> :s :p :o .}
>> }
>> WHERE
>> { }
>>
>> PREFIX : <http://example/>
>>
>> CONSTRUCT
>> { GRAPH ?g {:s :p :o .
>> :s :p :o .}
>> }
>> WHERE
>> { }
>> ---- Issue:
>> Adjacent GRAPH blocks have merged.
>>