[jira] [Commented] (JENA-945) Add Seven methods to Query class

2015-05-17 Thread Andy Seaborne (JIRA)

[ 
https://issues.apache.org/jira/browse/JENA-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14547096#comment-14547096
 ] 

Andy Seaborne commented on JENA-945:


The description does not say why the proposed operations are needed.  

I was not clear whether the need is because something can't be done (parsing 
and serializaling is managing to use the public interface to create queries), 
or needs to be done differently or the presence of the operations was missed.

The only thing that direct access to those members gives is being about to set 
them to null, and then every access has to check, or to use an alternative to 
{{ArrayList}}.

If you wish to add javadoc, then go ahead but additional operations to provide 
similar function don't seem like a good idea to me.



 Add Seven methods to Query class
 

 Key: JENA-945
 URL: https://issues.apache.org/jira/browse/JENA-945
 Project: Apache Jena
  Issue Type: Improvement
  Components: Core
Affects Versions: Jena 3.0.0
Reporter: Claude Warren
Assignee: Claude Warren
Priority: Minor

 The QueryBuilder uses reflection to perform some of its data manipulation.  
 This reflection will fail in an environment with Java Security Manager 
 enabled.
 This change is to add methods so that QueryBuilder no longer needs to use 
 reflection to get and set Query internal variables.
 The variables are:
 namedGraphURIs  -- get and set required. parameter/return: ListString
 graphURIs -- get and set required. parameter/return: ListString
 projectVars -- get and set required. parameter/return: VarExprList
 groupVars -- set required. parameter: VarExprList



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


Re: jena git commit: Fixes for JENA-946

2015-05-17 Thread Andy Seaborne

On 16/05/15 21:59, cla...@apache.org wrote:

http://git-wip-us.apache.org/repos/asf/jena/blob/25b36522/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/SelectHandler.java
--
diff --git 
a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/SelectHandler.java
 
b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/SelectHandler.java
index 7dba795..37726d8 100644
--- 
a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/SelectHandler.java
+++ 
b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/SelectHandler.java
@@ -17,14 +17,19 @@



+   public void addVar(String expression, Var var) throws ParseException {
+   SPARQLParser11 parser = new SPARQLParser11(new 
ByteArrayInputStream(
+   expression.getBytes()));


The function ExprUtils.parse will hide the implementation details of 
parsing expressions.


Minor notes:

You don't have to convert to bytes - the parsers work from Readers and 
Stringreaders are the one case reader are OK.


String.getBytes() is nearly always wrong!  It uses the platform 
character set so on MSWindows it is not UTF-8.  Use 
StandardCharsets.UTF_8 with getBytes unless provable something else is 
needed..


Andy



[jira] [Commented] (JENA-946) Add '(Expression as Var)' support to the QueryBuilder select clause

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

[ 
https://issues.apache.org/jira/browse/JENA-946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14547245#comment-14547245
 ] 

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

Commit b739e4d59e9b2fbbf313858da5f5e82a2db7b1d2 in jena's branch 
refs/heads/master from [~cla...@xenei.org]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=b739e4d ]

Changes to JENA-946 to rely on ExprUtils.parse for expression parsing.


 Add '(Expression as Var)' support to the QueryBuilder select clause
 ---

 Key: JENA-946
 URL: https://issues.apache.org/jira/browse/JENA-946
 Project: Apache Jena
  Issue Type: Improvement
Affects Versions: Jena 3.0.0
Reporter: Claude Warren
Assignee: Claude Warren
Priority: Minor
 Fix For: Jena 3.0.0


 Current SelectClause implementation does not support addVar( Expression, Var) 
 format.   This is to implement it.



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


[GitHub] jena pull request: JENA-938: Nonfunctional cleanup in various modu...

2015-05-17 Thread afs
Github user afs commented on the pull request:

https://github.com/apache/jena/pull/61#issuecomment-102834531
  
Would it be an easy task to possible to split this into jena-elephas 
related changes and changas related to other modules?  I'm not so familiar with 
jena-elephas but I could progress the other bits and pieces.  (If it's not an 
easy task, I can take a patch and edit it but the history is lost).


---
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] [Commented] (JENA-938) Clean up dead code

2015-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/JENA-938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14547284#comment-14547284
 ] 

ASF GitHub Bot commented on JENA-938:
-

Github user afs commented on the pull request:

https://github.com/apache/jena/pull/61#issuecomment-102834531
  
Would it be an easy task to possible to split this into jena-elephas 
related changes and changas related to other modules?  I'm not so familiar with 
jena-elephas but I could progress the other bits and pieces.  (If it's not an 
easy task, I can take a patch and edit it but the history is lost).


 Clean up dead code
 --

 Key: JENA-938
 URL: https://issues.apache.org/jira/browse/JENA-938
 Project: Apache Jena
  Issue Type: Task
  Components: Jena
Affects Versions: Jena 3.0.0
Reporter: A. Soroka
Priority: Minor
  Labels: cleanup, jena

 This is an umbrella task to which several PRs will be attached, each 
 containing clean up for some modules in Jena. Each PR will contain only 
 non-controversial emendations, such as the removal of unused imports or 
 unthrown exceptions. Specifically disallowed are the removal of actual logic 
 or methods. 



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


[jira] [Commented] (JENA-938) Clean up dead code

2015-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/JENA-938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14547285#comment-14547285
 ] 

ASF GitHub Bot commented on JENA-938:
-

Github user afs commented on the pull request:

https://github.com/apache/jena/pull/62#issuecomment-102834572
  
Would it be an easy task to possible to split this into jena-jdbc related 
changes and changes related to other modules? (If it's not an easy task, I can 
take a patch and edit it but the history is lost).


 Clean up dead code
 --

 Key: JENA-938
 URL: https://issues.apache.org/jira/browse/JENA-938
 Project: Apache Jena
  Issue Type: Task
  Components: Jena
Affects Versions: Jena 3.0.0
Reporter: A. Soroka
Priority: Minor
  Labels: cleanup, jena

 This is an umbrella task to which several PRs will be attached, each 
 containing clean up for some modules in Jena. Each PR will contain only 
 non-controversial emendations, such as the removal of unused imports or 
 unthrown exceptions. Specifically disallowed are the removal of actual logic 
 or methods. 



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


[GitHub] jena pull request: JENA-938: Nonfunctional cleanup in various modu...

2015-05-17 Thread afs
Github user afs commented on the pull request:

https://github.com/apache/jena/pull/62#issuecomment-102834572
  
Would it be an easy task to possible to split this into jena-jdbc related 
changes and changes related to other modules? (If it's not an easy task, I can 
take a patch and edit it but the history is lost).


---
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.
---