[jira] [Commented] (JENA-632) Generate JSON from SPARQL directly.

2016-01-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on JENA-632:
-

Github user kinow commented on a diff in the pull request:

https://github.com/apache/jena/pull/114#discussion_r48680983
  
--- Diff: 
jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_11/SPARQLParser11Constants.java
 ---
@@ -431,6 +433,7 @@
 "\"select\"",
 "\"distinct\"",
 "\"reduced\"",
+"\"json\"",
--- End diff --

Oh, when updating the branch (it was written when Jena was 2.x) I simply 
applied the same changes to master.jj and sparql_11.jj, and looked at other 
classes that I had patched, and looked for similar classes that looked like had 
to be updated as well.

But maybe I added Should I revert this one line?


> Generate JSON from SPARQL directly.
> ---
>
> Key: JENA-632
> URL: https://issues.apache.org/jira/browse/JENA-632
> Project: Apache Jena
>  Issue Type: Improvement
>  Components: ARQ, Fuseki
>Reporter: Andy Seaborne
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: java, javacc
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The capability to generate JSON directly from a SPARQL (or extended SPARQL) 
> query would enable the creation of JSON data API over published linked data.
> This project would cover:
> # Design and publication of a design.
> # Refinement of design based on community feed
> # Implementation, including testing.
> # Refinement of implementation based on community feed
> Skills required: Java, some parser work, design and discussion with the user 
> community, basic understanding of HTTP and content negotiation.



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


[jira] [Commented] (JENA-632) Generate JSON from SPARQL directly.

2016-01-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on JENA-632:
-

Github user kinow commented on a diff in the pull request:

https://github.com/apache/jena/pull/114#discussion_r48680972
  
--- Diff: jena-arq/Grammar/master.jj ---
@@ -327,6 +359,35 @@ void AskQuery() : {}
   SolutionModifier()
 }
 
+void JsonQuery() : {}
+{
+  JsonClause()
+  ( DatasetClause() )*
+  WhereClause()
+  SolutionModifier()
+}
+
+void JsonClause() : { Object o ; String s ; }
+{
+   { getQuery().setQueryJsonType() ; }
+  
+  s = String() < PNAME_NS >
+  (
--- End diff --

I will need some time to check in Eclipse why I used PNAME_NS. If I 
remember correctly, using COLON, JavaCC would find it ambiguous with some other 
character or rule? 


> Generate JSON from SPARQL directly.
> ---
>
> Key: JENA-632
> URL: https://issues.apache.org/jira/browse/JENA-632
> Project: Apache Jena
>  Issue Type: Improvement
>  Components: ARQ, Fuseki
>Reporter: Andy Seaborne
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: java, javacc
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The capability to generate JSON directly from a SPARQL (or extended SPARQL) 
> query would enable the creation of JSON data API over published linked data.
> This project would cover:
> # Design and publication of a design.
> # Refinement of design based on community feed
> # Implementation, including testing.
> # Refinement of implementation based on community feed
> Skills required: Java, some parser work, design and discussion with the user 
> community, basic understanding of HTTP and content negotiation.



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


[GitHub] jena pull request: JENA-632: Generate JSON from SPARQL directly

2016-01-01 Thread kinow
Github user kinow commented on a diff in the pull request:

https://github.com/apache/jena/pull/114#discussion_r48680972
  
--- Diff: jena-arq/Grammar/master.jj ---
@@ -327,6 +359,35 @@ void AskQuery() : {}
   SolutionModifier()
 }
 
+void JsonQuery() : {}
+{
+  JsonClause()
+  ( DatasetClause() )*
+  WhereClause()
+  SolutionModifier()
+}
+
+void JsonClause() : { Object o ; String s ; }
+{
+   { getQuery().setQueryJsonType() ; }
+  
+  s = String() < PNAME_NS >
+  (
--- End diff --

I will need some time to check in Eclipse why I used PNAME_NS. If I 
remember correctly, using COLON, JavaCC would find it ambiguous with some other 
character or rule? 


---
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-1108) New module : jena-cmds

2016-01-01 Thread Andy Seaborne (JIRA)
Andy Seaborne created JENA-1108:
---

 Summary: New module : jena-cmds
 Key: JENA-1108
 URL: https://issues.apache.org/jira/browse/JENA-1108
 Project: Apache Jena
  Issue Type: Task
  Components: cmd
Affects Versions: Jena 3.0.1
Reporter: Andy Seaborne
Assignee: Andy Seaborne


Put the command line tools (code, arq, tdb) in their own module.

This includes the command line support code.




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


[jira] [Commented] (JENA-1108) New module : jena-cmds

2016-01-01 Thread Andy Seaborne (JIRA)

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

Andy Seaborne commented on JENA-1108:
-

This is also a small step towards sorting out logging needs.

JENA-1005


> New module : jena-cmds
> --
>
> Key: JENA-1108
> URL: https://issues.apache.org/jira/browse/JENA-1108
> Project: Apache Jena
>  Issue Type: Task
>  Components: cmd
>Affects Versions: Jena 3.0.1
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>
> Put the command line tools (code, arq, tdb) in their own module.
> This includes the command line support code.



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


[GitHub] jena pull request: JENA-632: Generate JSON from SPARQL directly

2016-01-01 Thread kinow
Github user kinow commented on a diff in the pull request:

https://github.com/apache/jena/pull/114#discussion_r48680983
  
--- Diff: 
jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_11/SPARQLParser11Constants.java
 ---
@@ -431,6 +433,7 @@
 "\"select\"",
 "\"distinct\"",
 "\"reduced\"",
+"\"json\"",
--- End diff --

Oh, when updating the branch (it was written when Jena was 2.x) I simply 
applied the same changes to master.jj and sparql_11.jj, and looked at other 
classes that I had patched, and looked for similar classes that looked like had 
to be updated as well.

But maybe I added Should I revert this one line?


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


[GitHub] jena pull request: JENA-632: Generate JSON from SPARQL directly

2016-01-01 Thread kinow
Github user kinow commented on a diff in the pull request:

https://github.com/apache/jena/pull/114#discussion_r48680907
  
--- Diff: jena-arq/Grammar/master.jj ---
@@ -100,6 +100,38 @@ import org.apache.jena.sparql.core.Quad ;
 public class CLASS extends PARSERBASE
 {
 boolean allowAggregatesInExpressions = false ;
+
+public static void main(String args[]) {
+while (true) {
--- End diff --

Not sure where else it could go. I copied (shamelessly) from an example I 
found online while re-reading about JavaCC. With this main method, you can run 
the grammar in Eclipse, and in the Eclipse Console it will be waiting for a 
String+LFLF (two break lines IIRC).

Then it will use the grammar to parse the string and will output the 
QueryUnit. I found it useful for reviewing the changes without running some 
extra class with a main method, or Fuseki.

What do you think? I'm OK with removing it, or moving it somewhere else. 
Just don't know where else it could go :-)


---
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-632) Generate JSON from SPARQL directly.

2016-01-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on JENA-632:
-

Github user kinow commented on a diff in the pull request:

https://github.com/apache/jena/pull/114#discussion_r48680907
  
--- Diff: jena-arq/Grammar/master.jj ---
@@ -100,6 +100,38 @@ import org.apache.jena.sparql.core.Quad ;
 public class CLASS extends PARSERBASE
 {
 boolean allowAggregatesInExpressions = false ;
+
+public static void main(String args[]) {
+while (true) {
--- End diff --

Not sure where else it could go. I copied (shamelessly) from an example I 
found online while re-reading about JavaCC. With this main method, you can run 
the grammar in Eclipse, and in the Eclipse Console it will be waiting for a 
String+LFLF (two break lines IIRC).

Then it will use the grammar to parse the string and will output the 
QueryUnit. I found it useful for reviewing the changes without running some 
extra class with a main method, or Fuseki.

What do you think? I'm OK with removing it, or moving it somewhere else. 
Just don't know where else it could go :-)


> Generate JSON from SPARQL directly.
> ---
>
> Key: JENA-632
> URL: https://issues.apache.org/jira/browse/JENA-632
> Project: Apache Jena
>  Issue Type: Improvement
>  Components: ARQ, Fuseki
>Reporter: Andy Seaborne
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: java, javacc
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The capability to generate JSON directly from a SPARQL (or extended SPARQL) 
> query would enable the creation of JSON data API over published linked data.
> This project would cover:
> # Design and publication of a design.
> # Refinement of design based on community feed
> # Implementation, including testing.
> # Refinement of implementation based on community feed
> Skills required: Java, some parser work, design and discussion with the user 
> community, basic understanding of HTTP and content negotiation.



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


[jira] [Commented] (JENA-632) Generate JSON from SPARQL directly.

2016-01-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on JENA-632:
-

Github user kinow commented on a diff in the pull request:

https://github.com/apache/jena/pull/114#discussion_r48680948
  
--- Diff: jena-arq/Grammar/master.jj ---
@@ -100,6 +100,38 @@ import org.apache.jena.sparql.core.Quad ;
 public class CLASS extends PARSERBASE
--- End diff --

Looking at the Notes file, there is a comment to run "jj2tokens 
sparql_11.jj > tokens.txt" to create an initial tokens.txt file, and then 
manually tidy it up.

Should I re-run jj2tokens, or just manually add the missing entries?

Not sure if that hasn't been used in a while and could generate strange 
behaviour in other grammars later.


> Generate JSON from SPARQL directly.
> ---
>
> Key: JENA-632
> URL: https://issues.apache.org/jira/browse/JENA-632
> Project: Apache Jena
>  Issue Type: Improvement
>  Components: ARQ, Fuseki
>Reporter: Andy Seaborne
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: java, javacc
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The capability to generate JSON directly from a SPARQL (or extended SPARQL) 
> query would enable the creation of JSON data API over published linked data.
> This project would cover:
> # Design and publication of a design.
> # Refinement of design based on community feed
> # Implementation, including testing.
> # Refinement of implementation based on community feed
> Skills required: Java, some parser work, design and discussion with the user 
> community, basic understanding of HTTP and content negotiation.



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


[GitHub] jena pull request: JENA-632: Generate JSON from SPARQL directly

2016-01-01 Thread kinow
Github user kinow commented on a diff in the pull request:

https://github.com/apache/jena/pull/114#discussion_r48680948
  
--- Diff: jena-arq/Grammar/master.jj ---
@@ -100,6 +100,38 @@ import org.apache.jena.sparql.core.Quad ;
 public class CLASS extends PARSERBASE
--- End diff --

Looking at the Notes file, there is a comment to run "jj2tokens 
sparql_11.jj > tokens.txt" to create an initial tokens.txt file, and then 
manually tidy it up.

Should I re-run jj2tokens, or just manually add the missing entries?

Not sure if that hasn't been used in a while and could generate strange 
behaviour in other grammars later.


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


[GitHub] jena pull request: JENA-583: Using Maven optional tag for log4j de...

2016-01-01 Thread afs
Github user afs commented on the pull request:

https://github.com/apache/jena/pull/117#issuecomment-168302946
  
The codebase should compile with a clean maven repo.
Jena does not compile without this dependency.

This is a discussion needed -- see JENA-1005.


---
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-583) Get rid of log4j dependency in jena-core

2016-01-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on JENA-583:
-

Github user afs commented on the pull request:

https://github.com/apache/jena/pull/117#issuecomment-168302946
  
The codebase should compile with a clean maven repo.
Jena does not compile without this dependency.

This is a discussion needed -- see JENA-1005.


> Get rid of log4j dependency in jena-core
> 
>
> Key: JENA-583
> URL: https://issues.apache.org/jira/browse/JENA-583
> Project: Apache Jena
>  Issue Type: Improvement
>  Components: Jena
>Affects Versions: Jena 2.11.0
>Reporter: Francis De Brabandere
>  Labels: logging
>
> Apache jena core seems to pull in log4j and slf4j-log4j12, since you use 
> slf4j I would suppose I can plug in my own logging backend. If you have a 
> hard dependency on log4j at least make it optional and don't force it in the 
> core jena components.
> Ultimately this avoids these kinds of issues:
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in 
> [jar:file:.../target/universal/stage/lib/ch.qos.logback.logback-classic-1.0.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in 
> [jar:file:.../target/universal/stage/lib/org.slf4j.slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
> explanation.
> SLF4J: Actual binding is of type 
> [ch.qos.logback.classic.util.ContextSelectorStaticBinder]



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


[jira] [Commented] (JENA-583) Get rid of log4j dependency in jena-core

2016-01-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on JENA-583:
-

Github user ajs6f commented on the pull request:

https://github.com/apache/jena/pull/117#issuecomment-168308691
  
This PR builds with `mvn clean install` or, to be extra-sure:
```
mvn clean dependency:purge-local-repository -DreResolve=false
mvn install
```


> Get rid of log4j dependency in jena-core
> 
>
> Key: JENA-583
> URL: https://issues.apache.org/jira/browse/JENA-583
> Project: Apache Jena
>  Issue Type: Improvement
>  Components: Jena
>Affects Versions: Jena 2.11.0
>Reporter: Francis De Brabandere
>  Labels: logging
>
> Apache jena core seems to pull in log4j and slf4j-log4j12, since you use 
> slf4j I would suppose I can plug in my own logging backend. If you have a 
> hard dependency on log4j at least make it optional and don't force it in the 
> core jena components.
> Ultimately this avoids these kinds of issues:
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in 
> [jar:file:.../target/universal/stage/lib/ch.qos.logback.logback-classic-1.0.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in 
> [jar:file:.../target/universal/stage/lib/org.slf4j.slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
> explanation.
> SLF4J: Actual binding is of type 
> [ch.qos.logback.classic.util.ContextSelectorStaticBinder]



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


[GitHub] jena pull request: JENA-583: Using Maven optional tag for log4j de...

2016-01-01 Thread ajs6f
Github user ajs6f commented on the pull request:

https://github.com/apache/jena/pull/117#issuecomment-168308691
  
This PR builds with `mvn clean install` or, to be extra-sure:
```
mvn clean dependency:purge-local-repository -DreResolve=false
mvn install
```


---
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-583) Get rid of log4j dependency in jena-core

2016-01-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on JENA-583:
-

Github user ajs6f commented on the pull request:

https://github.com/apache/jena/pull/117#issuecomment-168305858
  
Having the [optional 
tag](https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html)
 doesn't prevent Jena from using this dependency. It's just as much present as 
ever it was. It prevents the dependency from being _transitive_. I successfully 
compiled this PR before sending it and tested the CLI tools.


> Get rid of log4j dependency in jena-core
> 
>
> Key: JENA-583
> URL: https://issues.apache.org/jira/browse/JENA-583
> Project: Apache Jena
>  Issue Type: Improvement
>  Components: Jena
>Affects Versions: Jena 2.11.0
>Reporter: Francis De Brabandere
>  Labels: logging
>
> Apache jena core seems to pull in log4j and slf4j-log4j12, since you use 
> slf4j I would suppose I can plug in my own logging backend. If you have a 
> hard dependency on log4j at least make it optional and don't force it in the 
> core jena components.
> Ultimately this avoids these kinds of issues:
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in 
> [jar:file:.../target/universal/stage/lib/ch.qos.logback.logback-classic-1.0.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in 
> [jar:file:.../target/universal/stage/lib/org.slf4j.slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
> explanation.
> SLF4J: Actual binding is of type 
> [ch.qos.logback.classic.util.ContextSelectorStaticBinder]



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


[GitHub] jena pull request: JENA-583: Using Maven optional tag for log4j de...

2016-01-01 Thread ajs6f
Github user ajs6f commented on the pull request:

https://github.com/apache/jena/pull/117#issuecomment-168305858
  
Having the [optional 
tag](https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html)
 doesn't prevent Jena from using this dependency. It's just as much present as 
ever it was. It prevents the dependency from being _transitive_. I successfully 
compiled this PR before sending it and tested the CLI tools.


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