[GitHub] jena pull request #:

2017-06-20 Thread sshmyeclipse
Github user sshmyeclipse commented on the pull request:


https://github.com/apache/jena/commit/f56429fb95891a95fce3023e863b6689e9487c88#commitcomment-22669606
  
Hi - thanks for your reply.
I checked out jena-1363-text-es-assembler. And the problem was sloved.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: querybuilder - txt based tests

2017-06-20 Thread Claude Warren
Andy,

The contract is "equivalent to", so I don't expect it to be exactly like a
parser and not exactly like a string either.  I'll have to think about this
again.  I reviewed it in my mind recently when I was looking at the update
builder stuff.

The problem with doing parse( builder.toString() ) and comparing the result
is that the toString() performs the build() and then toString() on the
result.  So the test becomes effectively query = parse( query.toString() )

For the union question: I used the union-of-one construct because it was
available.  The test can easily add a second side to the union.

is the union-of-one still legal during the construction of the query?  The
expected usage in the builder is:

{noformat}
builder.addUnion(  ).addUnion(
)
{noformat}

Currently the code builds a union-of-one and adds the next union to it.  Do
I need to think about how to change this?

I could add a check to ensure that a union-of-one is not generated in the
final result.

Contract Testing Q:

The contract testing looks for testing classes on the class path during
testing.  Depending on how you build your projects the test jars may not
have been updated / installed on your system.  In this case a complete
rebuild will be necessary.

The contract test runner scans the classpath looking for classes annotated
with @Contract( some-interface-class ) and determines if the class under
test implements it and if so adds it to the suite.

Are you saying that changes to classes were not detected or changes to
test-classes were not detected?

Claude

On Tue, Jun 20, 2017 at 10:04 PM, Andy Seaborne  wrote:

> Claude,
>
> A couple of issues in jena-querybuilder from JENA-369.  These are in
> commits I made today (2017-06-20).
>
> 1/ I had to change some "testList" to recognize the new pretty list
> output.  But only some. See WhereHandlerList testList/testListInTriple.
>
> There "testList" does not trigger pretty printing so it must be a
> different syntax structure. It may not trigger efficient query.
>
> What may help testing is that Query.equals is a deep structural
> comparison.
>
> If the contract is "like the parser", then writing the expected answer as
> a string, parsing it then using Query.equals will be more robust.
>
> If the contract is for building strings, then running builder.toString,
> parse that string then compare is moer robust than regexs.
>
>
> 2/ testSetVarsInUnion
>
> This creates a UNION of one element which is illegal SPARQL.
>
> I've put back the output old format (ElementFormatter) for this for now
> but it is not syntactically correct. It would be better if generated a
> legal query - I had changed it to create "{ pattern }" hence { { pattern }
> }" where as the test is for the original and bad syntax "{ UNION { pattern
> } }".
>
> Is this a deeper issue about allowing UNION-of-one in the first place?
>
> Andy
>
> PS I also had to do a complete rebuild for the contract tests to pick up
> changes across modules in Jena. Do you know why this might be?
>



-- 
I like: Like Like - The likeliest place on the web

LinkedIn: http://www.linkedin.com/in/claudewarren


[jira] [Commented] (JENA-1363) jena-text-es does not register its assembler.

2017-06-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on JENA-1363:
--

GitHub user afs opened a pull request:

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

JENA-1363: jena-text-es: register assembler



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

$ git pull https://github.com/afs/jena jena-1363-text-es-assembler

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

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

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

This closes #264






> jena-text-es does not register its assembler.
> -
>
> Key: JENA-1363
> URL: https://issues.apache.org/jira/browse/JENA-1363
> Project: Apache Jena
>  Issue Type: Bug
>Affects Versions: Jena 3.3.0
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>
> https://github.com/apache/jena/commit/f56429fb95891a95fce3023e863b6689e9487c88#commitcomment-22643425



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] jena pull request #264: JENA-1363: jena-text-es: register assembler

2017-06-20 Thread afs
GitHub user afs opened a pull request:

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

JENA-1363: jena-text-es: register assembler



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

$ git pull https://github.com/afs/jena jena-1363-text-es-assembler

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

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

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

This closes #264






---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


querybuilder - txt based tests

2017-06-20 Thread Andy Seaborne

Claude,

A couple of issues in jena-querybuilder from JENA-369.  These are in 
commits I made today (2017-06-20).


1/ I had to change some "testList" to recognize the new pretty list 
output.  But only some. See WhereHandlerList testList/testListInTriple.


There "testList" does not trigger pretty printing so it must be a 
different syntax structure. It may not trigger efficient query.


What may help testing is that Query.equals is a deep structural
comparison.

If the contract is "like the parser", then writing the expected answer 
as a string, parsing it then using Query.equals will be more robust.


If the contract is for building strings, then running builder.toString, 
parse that string then compare is moer robust than regexs.



2/ testSetVarsInUnion

This creates a UNION of one element which is illegal SPARQL.

I've put back the output old format (ElementFormatter) for this for now 
but it is not syntactically correct. It would be better if generated a 
legal query - I had changed it to create "{ pattern }" hence { { pattern 
} }" where as the test is for the original and bad syntax "{ UNION { 
pattern } }".


Is this a deeper issue about allowing UNION-of-one in the first place?

Andy

PS I also had to do a complete rebuild for the contract tests to pick up 
changes across modules in Jena. Do you know why this might be?


[jira] [Created] (JENA-1364) Jena-core has dependency on vulnerable Xerces version

2017-06-20 Thread Yev Bronshteyn (JIRA)
Yev Bronshteyn created JENA-1364:


 Summary: Jena-core has dependency on vulnerable Xerces version
 Key: JENA-1364
 URL: https://issues.apache.org/jira/browse/JENA-1364
 Project: Apache Jena
  Issue Type: Bug
  Components: Core
Affects Versions: Jena 3.3.0
Reporter: Yev Bronshteyn


jena-core pulls in Xerces 2.11.0, which has a known vulnerability CVE-2013-4002 
(exploitable, resulting in DOS).
{code}
[INFO] +- org.apache.jena:apache-jena-libs:pom:3.3.0:compile
[INFO] |  +- org.apache.jena:jena-tdb:jar:3.3.0:compile
[INFO] |  |  \- org.apache.jena:jena-arq:jar:3.3.0:compile
[INFO] |  | +- org.apache.jena:jena-core:jar:3.3.0:compile
[INFO] |  | |  +- xerces:xercesImpl:jar:2.11.0:compile
{code}

A potential fix would be to pull in xerces 2.11.0.SP1 or later from one of the 
Red Hat repositories.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (JENA-1363) jena-text-es does not register its assembler.

2017-06-20 Thread Andy Seaborne (JIRA)

 [ 
https://issues.apache.org/jira/browse/JENA-1363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Seaborne reassigned JENA-1363:
---

Assignee: Andy Seaborne

> jena-text-es does not register its assembler.
> -
>
> Key: JENA-1363
> URL: https://issues.apache.org/jira/browse/JENA-1363
> Project: Apache Jena
>  Issue Type: Bug
>Affects Versions: Jena 3.3.0
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>
> https://github.com/apache/jena/commit/f56429fb95891a95fce3023e863b6689e9487c88#commitcomment-22643425



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (JENA-1363) jena-text-es does not register its assembler.

2017-06-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on JENA-1363:
--

Github user afs commented on the pull request:


https://github.com/apache/jena/commit/f56429fb95891a95fce3023e863b6689e9487c88#commitcomment-22649472
  
Hi - thanks for the report.  

Same happens for me - I don't see anywhere in the code where it registers 
the assembler which would explain the problem.

I've created https://issues.apache.org/jira/browse/JENA-1363


> jena-text-es does not register its assembler.
> -
>
> Key: JENA-1363
> URL: https://issues.apache.org/jira/browse/JENA-1363
> Project: Apache Jena
>  Issue Type: Bug
>Affects Versions: Jena 3.3.0
>Reporter: Andy Seaborne
>
> https://github.com/apache/jena/commit/f56429fb95891a95fce3023e863b6689e9487c88#commitcomment-22643425



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] jena pull request #:

2017-06-20 Thread afs
Github user afs commented on the pull request:


https://github.com/apache/jena/commit/f56429fb95891a95fce3023e863b6689e9487c88#commitcomment-22649472
  
Hi - thanks for the report.  

Same happens for me - I don't see anywhere in the code where it registers 
the assembler which would explain the problem.

I've created https://issues.apache.org/jira/browse/JENA-1363


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Created] (JENA-1363) jena-text-es does not register its assembler.

2017-06-20 Thread Andy Seaborne (JIRA)
Andy Seaborne created JENA-1363:
---

 Summary: jena-text-es does not register its assembler.
 Key: JENA-1363
 URL: https://issues.apache.org/jira/browse/JENA-1363
 Project: Apache Jena
  Issue Type: Bug
Affects Versions: Jena 3.3.0
Reporter: Andy Seaborne


https://github.com/apache/jena/commit/f56429fb95891a95fce3023e863b6689e9487c88#commitcomment-22643425



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (JENA-369) Improve the use of syntactic forms when outputing SPARQL

2017-06-20 Thread Andy Seaborne (JIRA)

 [ 
https://issues.apache.org/jira/browse/JENA-369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Seaborne resolved JENA-369.

   Resolution: Done
Fix Version/s: Jena 3.4.0

Use of () for lists added for some cases.

Within the bounds of keeping the triples in the same order as the parse 
generated them, there are limits to how much pretty printing can be done.

> Improve the use of syntactic forms when outputing SPARQL 
> -
>
> Key: JENA-369
> URL: https://issues.apache.org/jira/browse/JENA-369
> Project: Apache Jena
>  Issue Type: Improvement
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>Priority: Minor
> Fix For: Jena 3.4.0
>
>
> Example:
> PREFIX : 
> SELECT * { :s :p :o ; :p1 :o2 }
> and "qparse --file Q.rq" 
> does not use ";" in the output formatted update request.
> Applies to SPARQL Query and SPARQL Update.
> Still should preserve the order of triples to be clear as to the relationship 
> of input and output syntax but it can combine adjacent triple patterns using 
> ";"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (JENA-1361) Writing SPARQL Update does not convert variable to bNodes correctly.

2017-06-20 Thread Andy Seaborne (JIRA)

 [ 
https://issues.apache.org/jira/browse/JENA-1361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Seaborne resolved JENA-1361.
-
   Resolution: Fixed
Fix Version/s: Jena 3.4.0

> Writing SPARQL Update does not convert variable to bNodes correctly.
> 
>
> Key: JENA-1361
> URL: https://issues.apache.org/jira/browse/JENA-1361
> Project: Apache Jena
>  Issue Type: Bug
>Affects Versions: Jena 3.3.0
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
> Fix For: Jena 3.4.0
>
>
> DELETE-INSERT-WHERE form.
> Output in the WHERE clause is still in the hidden variable {{??0}} form.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (JENA-369) Improve the use of syntactic forms when outputing SPARQL

2017-06-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on JENA-369:
-

Github user asfgit closed the pull request at:

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


> Improve the use of syntactic forms when outputing SPARQL 
> -
>
> Key: JENA-369
> URL: https://issues.apache.org/jira/browse/JENA-369
> Project: Apache Jena
>  Issue Type: Improvement
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>Priority: Minor
>
> Example:
> PREFIX : 
> SELECT * { :s :p :o ; :p1 :o2 }
> and "qparse --file Q.rq" 
> does not use ";" in the output formatted update request.
> Applies to SPARQL Query and SPARQL Update.
> Still should preserve the order of triples to be clear as to the relationship 
> of input and output syntax but it can combine adjacent triple patterns using 
> ";"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (JENA-369) Improve the use of syntactic forms when outputing SPARQL

2017-06-20 Thread ASF subversion and git services (JIRA)

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

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

Commit f89025a832aa8f854f0cee012be560b550c11ffd in jena's branch 
refs/heads/master from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=f89025a ]

JENA-1361, JENA-369: Merge commit 'refs/pull/263/head' of github.com:apache/jena

This closes #263.


> Improve the use of syntactic forms when outputing SPARQL 
> -
>
> Key: JENA-369
> URL: https://issues.apache.org/jira/browse/JENA-369
> Project: Apache Jena
>  Issue Type: Improvement
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>Priority: Minor
>
> Example:
> PREFIX : 
> SELECT * { :s :p :o ; :p1 :o2 }
> and "qparse --file Q.rq" 
> does not use ";" in the output formatted update request.
> Applies to SPARQL Query and SPARQL Update.
> Still should preserve the order of triples to be clear as to the relationship 
> of input and output syntax but it can combine adjacent triple patterns using 
> ";"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (JENA-1361) Writing SPARQL Update does not convert variable to bNodes correctly.

2017-06-20 Thread ASF subversion and git services (JIRA)

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

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

Commit d377dd141028ae81ed373b86d3fc8f26cc898447 in jena's branch 
refs/heads/master from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=d377dd1 ]

JENA-1361: Convert back to blank nodes.

> Writing SPARQL Update does not convert variable to bNodes correctly.
> 
>
> Key: JENA-1361
> URL: https://issues.apache.org/jira/browse/JENA-1361
> Project: Apache Jena
>  Issue Type: Bug
>Affects Versions: Jena 3.3.0
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>
> DELETE-INSERT-WHERE form.
> Output in the WHERE clause is still in the hidden variable {{??0}} form.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (JENA-369) Improve the use of syntactic forms when outputing SPARQL

2017-06-20 Thread ASF subversion and git services (JIRA)

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

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

Commit f19d8b267e1976f655e2c7509e6c7ce67c0c9496 in jena's branch 
refs/heads/master from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=f19d8b2 ]

JENA-369: Output pretty lists in basic graph patterns.

This includes property functions.
Conversion is cautious - it looks for the triples as the parser
might output them.

Nested bnodes structures in lists are not converted back.


> Improve the use of syntactic forms when outputing SPARQL 
> -
>
> Key: JENA-369
> URL: https://issues.apache.org/jira/browse/JENA-369
> Project: Apache Jena
>  Issue Type: Improvement
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>Priority: Minor
>
> Example:
> PREFIX : 
> SELECT * { :s :p :o ; :p1 :o2 }
> and "qparse --file Q.rq" 
> does not use ";" in the output formatted update request.
> Applies to SPARQL Query and SPARQL Update.
> Still should preserve the order of triples to be clear as to the relationship 
> of input and output syntax but it can combine adjacent triple patterns using 
> ";"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (JENA-1361) Writing SPARQL Update does not convert variable to bNodes correctly.

2017-06-20 Thread ASF subversion and git services (JIRA)

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

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

Commit f89025a832aa8f854f0cee012be560b550c11ffd in jena's branch 
refs/heads/master from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=f89025a ]

JENA-1361, JENA-369: Merge commit 'refs/pull/263/head' of github.com:apache/jena

This closes #263.


> Writing SPARQL Update does not convert variable to bNodes correctly.
> 
>
> Key: JENA-1361
> URL: https://issues.apache.org/jira/browse/JENA-1361
> Project: Apache Jena
>  Issue Type: Bug
>Affects Versions: Jena 3.3.0
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>
> DELETE-INSERT-WHERE form.
> Output in the WHERE clause is still in the hidden variable {{??0}} form.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] jena pull request #263: Writer updates

2017-06-20 Thread asfgit
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---