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

2015-08-11 Thread Qihong Lin
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 execTriples()
2) Iterator 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  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  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 : 

 CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {}  Output of qparse
 --file syntax-quad-construct-01.arq PREFIX  : 

 CONSTRUCT { GRAPH :g { :s :p :o .} } WHERE {  }  File:
 syntax-quad-construct-02.arq PREFIX : 

 CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o }  Output of
 qparse --file syntax-quad-construct-02.arq PREFIX  :
 

 CONSTRUCT { GRAPH ?g { ?s ?p ?o .} } WHERE { ?s  ?p  ?o } 
 File: syntax-quad-construct-03.arq PREFIX : 

 CONSTRUCT { :s :p :o } WHERE {}  Output of qparse --file
 syntax-quad-construct-03.arq PREFIX  : 

 CONSTRUCT { :s :p :o . } WHERE {  }  File:
 syntax-quad-construct-04.arq PREFIX : 

 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  : 

 CONSTRUCT { GRAPH ?g { :s :p :o .} ?s ?p ?o . } WHERE { GRAPH ?g { ?s
 ?p  ?o } }  File: syntax-quad-construct-05.arq PREFIX :
 

 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  : 

 CONSTRUCT { ?s ?p ?o . GRAPH ?g { :s :p :o .} } WHERE { GRAPH ?g { ?s
 ?p  ?o } }  File: syntax-quad-construct-06.arq PREFIX :
>>

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

2015-08-11 Thread Andy Seaborne

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)

2015-08-11 Thread Andy Seaborne

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 execTriples()
2) Iterator 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  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




[jira] [Created] (JENA-1008) Jena Tutorials still pointing to old package names

2015-08-11 Thread Werner Keil (JIRA)
Werner Keil created JENA-1008:
-

 Summary: Jena Tutorials still pointing to old package names
 Key: JENA-1008
 URL: https://issues.apache.org/jira/browse/JENA-1008
 Project: Apache Jena
  Issue Type: Bug
  Components: RDF API
Reporter: Werner Keil


Example code for tutorials in http://jena.apache.org/tutorials/rdf_api.html 
under jena-core/src-examples still points to an older version of Jena with 
package names {{com.hp...}}. 



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