[GitHub] jena pull request: Jena 491 - Fuseki support of construct quad
GitHub user confidencesun opened a pull request: https://github.com/apache/jena/pull/91 Jena 491 - Fuseki support of construct quad confidencesun/jena/JENA-491 contains the code commits of Fuseki support of construct quad You can merge this pull request into a Git repository by running: $ git pull https://github.com/confidencesun/jena JENA-491 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/jena/pull/91.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 #91 commit 5237c71aef40b7e1be24a62f407ab3f0ae550b41 Author: confidencesun confidence@gmail.com Date: 2015-03-21T16:34:54Z a demo for JENA-491 commit 15c9b132964e331132225661da4cc8348d02418c Author: confidencesun confidence@gmail.com Date: 2015-05-24T08:39:47Z Merge pull request #1 from apache/master pull master to begin commit ee075b7b201f80c6ed421210971952f139a8ccaf Author: confidencesun confidence@gmail.com Date: 2015-05-26T13:24:15Z Merge pull request #3 from apache/master sych master 20150526 commit 3f163bff6b1d4020c0f2a77321bbb47baf743ebb Author: confidencesun confidence@gmail.com Date: 2015-05-26T23:38:58Z delete JENA-491 example code commit ca1dc7bbcce401dea0908f22b3a4209d562716a0 Author: confidencesun confidence@gmail.com Date: 2015-05-26T23:47:00Z Merge pull request #4 from confidencesun/master delete JENA-491 example code commit 2d09a7dfe84539ecdafc9f99247019d0ddeefd5e Author: confidencesun confidence@gmail.com Date: 2015-06-11T14:56:15Z create new Template for SPARQL_11 commit 07c8b98dbafbf2ea12ee3f6df6816e8edda93650 Author: confidencesun confidence@gmail.com Date: 2015-06-12T03:03:13Z rollback FmtTemplate, in order to build success for TS_Scripted commit 2cb175d2305c02582eb24629d18d06bdc53ae4ba Author: confidencesun confidence@gmail.com Date: 2015-06-15T10:12:10Z reimplement Template, that does not affect the SPARQL 1.0 parser commit a8b0d53e83a39357f6d35763494ecfa447826b51 Author: confidencesun confidence@gmail.com Date: 2015-06-18T03:21:34Z The SPARQL 1.1 parser (like the SPARQL 1.0 parser) are now unchanged. commit c475249148792da2148cd9ec9976312516ed1d11 Author: confidencesun confidence@gmail.com Date: 2015-06-18T08:44:33Z refactor ConstructTemplate() to make ARQ for constructing quards similar to that for triples. commit 5076b1ed0844d0a1e7c57b539b64af3d831ee039 Author: confidencesun confidence@gmail.com Date: 2015-06-19T08:22:38Z new QueryExecution operations: execConstrucQuads(), execConstructDataset() commit d0ce13b2587905859c9ed854f5114b8c86c2125c Author: confidencesun confidence@gmail.com Date: 2015-06-19T08:53:07Z add licence info for ExampleConstructQuads; retain QuadAcc unchanged commit d58625693e9439ee0c9164b56993b44f34c2a383 Author: confidencesun confidence@gmail.com Date: 2015-06-21T13:16:18Z fix bugs for default graphs; add some examples in ExampleConstructQuads.java commit 5e56c1f2b0e2b0b2f6a1e7fda9fe17b6254176da Author: confidencesun confidence@gmail.com Date: 2015-06-21T13:28:15Z commit ExampleConstructQuads.java commit 1348bf5498543f747f1b4707f011a46bfcca90e1 Author: confidencesun confidence@gmail.com Date: 2015-07-22T06:16:15Z Merge pull request #8 from apache/master pull master up to date commit e58b62cb2e288cc71754776e00179cd011ecdf5f Author: confidencesun confidence@gmail.com Date: 2015-07-22T07:07:10Z Merge remote-tracking branch 'origin/JENA-491' commit 6e4379e5d4ab94d5689813edeef1edfa496f9d33 Author: confidencesun confidence@gmail.com Date: 2015-07-24T09:41:55Z Merge pull request #9 from apache/master pull master 2015-07-24 commit 5b73280fc9ecbfe8526230031080a4bb6c8cbec3 Author: confidencesun confidence@gmail.com Date: 2015-07-24T10:39:48Z 1) remove all @author; 2) remove unnecesary blank lines commit 7d0986fbde189afa79c8cf52a81a56802f37aff5 Author: confidencesun confidence@gmail.com Date: 2015-07-24T21:40:12Z better way to print datasets commit 44d8010659bbc813dddee9ffca8ef529f716ad11 Author: confidencesun confidence@gmail.com Date: 2015-07-24T23:39:32Z No need to write the package name - add an import commit e398c4e73e6ebb907c1b9acd584f965050cbc4ca Author: confidencesun confidence@gmail.com Date: 2015-07-27T00:54:40Z fix graph uri in the example of construct quads commit 1ce04970fdf72c1b5bf2d209349ad4fec4390b65 Author: confidencesun confidence@gmail.com Date: 2015-07-28T19:40:08Z Merge pull request #10 from apache/master pull master 2015-07-28 commit 9920b52b5614e48dca4bf5f96bc493b466a991bd Author: confidencesun confidence@gmail.com Date: 2015-07-28T19:41:24Z Merge pull request #11 from confidencesun
[GitHub] jena pull request: Merge confidencesun/master (Merged from JENA-49...
Github user confidencesun commented on a diff in the pull request: https://github.com/apache/jena/pull/89#discussion_r35834150 --- Diff: jena-arq/src/main/java/org/apache/jena/sparql/syntax/Template.java --- @@ -52,14 +63,43 @@ public Template(BasicPattern bgp) //public void addTriplePath(int index, TriplePath path) //{ throw new ARQException(Triples-only collector) ; } - -public BasicPattern getBGP(){ return bgp ; } -public ListTriple getTriples(){ return bgp.getList() ; } +public BasicPattern getBGP() +{ + if (this.bgp != null){ + return this.bgp; + } + BasicPattern bgp = new BasicPattern(); + for(Quad q: qp.getQuads()){ + bgp.add(q.asTriple()); + } + return bgp; +} +public ListTriple getTriples() +{ + if(this.bgp != null){ + return this.bgp.getList(); + } + ListTriple triples = new ArrayListTriple(); + for(Quad q: qp.getQuads()){ + triples.add(q.asTriple()); + } + return triples; +} +public ListQuad getQuads() { + if( this.bgp != null){ + ListQuad quads = new ArrayListQuad(); + for(Triple triple: this.bgp.getList()){ + quads.add( new Quad( Quad.defaultGraphNodeGenerated, triple ) ); --- End diff -- What do you mean by streams? Any examples? --- 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: Merge confidencesun/master (Merged from JENA-49...
Github user confidencesun commented on a diff in the pull request: https://github.com/apache/jena/pull/89#discussion_r35834125 --- Diff: jena-arq/src-examples/arq/examples/constructquads/ExampleConstructQuads.java --- @@ -0,0 +1,141 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package arq.examples.constructquads; + +import java.util.Iterator; + +import org.apache.jena.graph.Triple; +import org.apache.jena.query.Dataset; +import org.apache.jena.query.DatasetFactory; +import org.apache.jena.query.Query; +import org.apache.jena.query.QueryExecution; +import org.apache.jena.query.QueryExecutionFactory; +import org.apache.jena.query.QueryFactory; +import org.apache.jena.query.Syntax; +import org.apache.jena.rdf.model.Model; +import org.apache.jena.rdf.model.ModelFactory; +import org.apache.jena.rdf.model.Property; +import org.apache.jena.rdf.model.Resource; +import org.apache.jena.sparql.core.Quad; +import org.apache.jena.util.PrintUtil; + +public class ExampleConstructQuads { + public static void main(String[] args) { + + // create testing data : + // 1) default graph data + Model model = ModelFactory.createDefaultModel(); + Resource s = model.createResource(http://eg.com/s;); + Property p = model.createProperty(http://eg.com/p;); + Resource o = model.createResource(http://eg.com/o;); + model.add(s, p, o); + Dataset dataset = DatasetFactory.create(model); + // 2) named graph data + Model model1 = ModelFactory.createDefaultModel(); + Resource s1 = model.createResource(http://eg.com/s1;); + Property p1 = model.createProperty(http://eg.com/p1;); + Resource o1 = model.createResource(http://eg.com/o1;); + model1.add(s1, p1, o1); + dataset.addNamedModel(http://eg.com/g1, model1); + + + // construct named graph + System.out.println(construct named graph:); + String queryString = CONSTRUCT { GRAPH ?g {http://eg.com/s1 http://eg.com/p1 ?o} } WHERE{ GRAPH ?g {http://eg.com/s1 http://eg.com/p1 ?o} }; + Query query = QueryFactory.create(queryString, Syntax.syntaxARQ); + QueryExecution qexec = QueryExecutionFactory.create(query, dataset); --- End diff -- I don't see any warnings in Eclipse regarding to try-catch here. --- 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: Merge Jena 491 for the first half part of GSoC ...
GitHub user confidencesun reopened a pull request: https://github.com/apache/jena/pull/88 Merge Jena 491 for the first half part of GSoC 2015 project You can merge this pull request into a Git repository by running: $ git pull https://github.com/confidencesun/jena JENA-491 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/jena/pull/88.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 #88 commit 5237c71aef40b7e1be24a62f407ab3f0ae550b41 Author: confidencesun confidence@gmail.com Date: 2015-03-21T16:34:54Z a demo for JENA-491 commit 15c9b132964e331132225661da4cc8348d02418c Author: confidencesun confidence@gmail.com Date: 2015-05-24T08:39:47Z Merge pull request #1 from apache/master pull master to begin commit ee075b7b201f80c6ed421210971952f139a8ccaf Author: confidencesun confidence@gmail.com Date: 2015-05-26T13:24:15Z Merge pull request #3 from apache/master sych master 20150526 commit 3f163bff6b1d4020c0f2a77321bbb47baf743ebb Author: confidencesun confidence@gmail.com Date: 2015-05-26T23:38:58Z delete JENA-491 example code commit ca1dc7bbcce401dea0908f22b3a4209d562716a0 Author: confidencesun confidence@gmail.com Date: 2015-05-26T23:47:00Z Merge pull request #4 from confidencesun/master delete JENA-491 example code commit 2d09a7dfe84539ecdafc9f99247019d0ddeefd5e Author: confidencesun confidence@gmail.com Date: 2015-06-11T14:56:15Z create new Template for SPARQL_11 commit 07c8b98dbafbf2ea12ee3f6df6816e8edda93650 Author: confidencesun confidence@gmail.com Date: 2015-06-12T03:03:13Z rollback FmtTemplate, in order to build success for TS_Scripted commit 2cb175d2305c02582eb24629d18d06bdc53ae4ba Author: confidencesun confidence@gmail.com Date: 2015-06-15T10:12:10Z reimplement Template, that does not affect the SPARQL 1.0 parser commit a8b0d53e83a39357f6d35763494ecfa447826b51 Author: confidencesun confidence@gmail.com Date: 2015-06-18T03:21:34Z The SPARQL 1.1 parser (like the SPARQL 1.0 parser) are now unchanged. commit c475249148792da2148cd9ec9976312516ed1d11 Author: confidencesun confidence@gmail.com Date: 2015-06-18T08:44:33Z refactor ConstructTemplate() to make ARQ for constructing quards similar to that for triples. commit 5076b1ed0844d0a1e7c57b539b64af3d831ee039 Author: confidencesun confidence@gmail.com Date: 2015-06-19T08:22:38Z new QueryExecution operations: execConstrucQuads(), execConstructDataset() commit d0ce13b2587905859c9ed854f5114b8c86c2125c Author: confidencesun confidence@gmail.com Date: 2015-06-19T08:53:07Z add licence info for ExampleConstructQuads; retain QuadAcc unchanged commit d58625693e9439ee0c9164b56993b44f34c2a383 Author: confidencesun confidence@gmail.com Date: 2015-06-21T13:16:18Z fix bugs for default graphs; add some examples in ExampleConstructQuads.java commit 5e56c1f2b0e2b0b2f6a1e7fda9fe17b6254176da Author: confidencesun confidence@gmail.com Date: 2015-06-21T13:28:15Z commit ExampleConstructQuads.java --- 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: Merge Jena 491 for the first half part of GSoC ...
Github user confidencesun closed the pull request at: https://github.com/apache/jena/pull/88 --- 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: Merge Jena 491 for the first half part of GSoC ...
Github user confidencesun closed the pull request at: https://github.com/apache/jena/pull/88 --- 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: Merge confidencesun/master (Merged from JENA-49...
GitHub user confidencesun opened a pull request: https://github.com/apache/jena/pull/89 Merge confidencesun/master (Merged from JENA-491) for the first half part of GSoC 2015 project You can merge this pull request into a Git repository by running: $ git pull https://github.com/confidencesun/jena master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/jena/pull/89.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 #89 commit 5237c71aef40b7e1be24a62f407ab3f0ae550b41 Author: confidencesun confidence@gmail.com Date: 2015-03-21T16:34:54Z a demo for JENA-491 commit 15c9b132964e331132225661da4cc8348d02418c Author: confidencesun confidence@gmail.com Date: 2015-05-24T08:39:47Z Merge pull request #1 from apache/master pull master to begin commit ee075b7b201f80c6ed421210971952f139a8ccaf Author: confidencesun confidence@gmail.com Date: 2015-05-26T13:24:15Z Merge pull request #3 from apache/master sych master 20150526 commit 3f163bff6b1d4020c0f2a77321bbb47baf743ebb Author: confidencesun confidence@gmail.com Date: 2015-05-26T23:38:58Z delete JENA-491 example code commit ca1dc7bbcce401dea0908f22b3a4209d562716a0 Author: confidencesun confidence@gmail.com Date: 2015-05-26T23:47:00Z Merge pull request #4 from confidencesun/master delete JENA-491 example code commit 2d09a7dfe84539ecdafc9f99247019d0ddeefd5e Author: confidencesun confidence@gmail.com Date: 2015-06-11T14:56:15Z create new Template for SPARQL_11 commit 07c8b98dbafbf2ea12ee3f6df6816e8edda93650 Author: confidencesun confidence@gmail.com Date: 2015-06-12T03:03:13Z rollback FmtTemplate, in order to build success for TS_Scripted commit 2cb175d2305c02582eb24629d18d06bdc53ae4ba Author: confidencesun confidence@gmail.com Date: 2015-06-15T10:12:10Z reimplement Template, that does not affect the SPARQL 1.0 parser commit a8b0d53e83a39357f6d35763494ecfa447826b51 Author: confidencesun confidence@gmail.com Date: 2015-06-18T03:21:34Z The SPARQL 1.1 parser (like the SPARQL 1.0 parser) are now unchanged. commit c475249148792da2148cd9ec9976312516ed1d11 Author: confidencesun confidence@gmail.com Date: 2015-06-18T08:44:33Z refactor ConstructTemplate() to make ARQ for constructing quards similar to that for triples. commit 5076b1ed0844d0a1e7c57b539b64af3d831ee039 Author: confidencesun confidence@gmail.com Date: 2015-06-19T08:22:38Z new QueryExecution operations: execConstrucQuads(), execConstructDataset() commit d0ce13b2587905859c9ed854f5114b8c86c2125c Author: confidencesun confidence@gmail.com Date: 2015-06-19T08:53:07Z add licence info for ExampleConstructQuads; retain QuadAcc unchanged commit d58625693e9439ee0c9164b56993b44f34c2a383 Author: confidencesun confidence@gmail.com Date: 2015-06-21T13:16:18Z fix bugs for default graphs; add some examples in ExampleConstructQuads.java commit 5e56c1f2b0e2b0b2f6a1e7fda9fe17b6254176da Author: confidencesun confidence@gmail.com Date: 2015-06-21T13:28:15Z commit ExampleConstructQuads.java commit 1348bf5498543f747f1b4707f011a46bfcca90e1 Author: confidencesun confidence@gmail.com Date: 2015-07-22T06:16:15Z Merge pull request #8 from apache/master pull master up to date commit e58b62cb2e288cc71754776e00179cd011ecdf5f Author: confidencesun confidence@gmail.com Date: 2015-07-22T07:07:10Z Merge remote-tracking branch 'origin/JENA-491' --- 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: Merge Jena 491 for the first half part of GSoC ...
GitHub user confidencesun opened a pull request: https://github.com/apache/jena/pull/88 Merge Jena 491 for the first half part of GSoC 2015 project You can merge this pull request into a Git repository by running: $ git pull https://github.com/confidencesun/jena JENA-491 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/jena/pull/88.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 #88 commit 5237c71aef40b7e1be24a62f407ab3f0ae550b41 Author: confidencesun confidence@gmail.com Date: 2015-03-21T16:34:54Z a demo for JENA-491 commit 15c9b132964e331132225661da4cc8348d02418c Author: confidencesun confidence@gmail.com Date: 2015-05-24T08:39:47Z Merge pull request #1 from apache/master pull master to begin commit ee075b7b201f80c6ed421210971952f139a8ccaf Author: confidencesun confidence@gmail.com Date: 2015-05-26T13:24:15Z Merge pull request #3 from apache/master sych master 20150526 commit 3f163bff6b1d4020c0f2a77321bbb47baf743ebb Author: confidencesun confidence@gmail.com Date: 2015-05-26T23:38:58Z delete JENA-491 example code commit ca1dc7bbcce401dea0908f22b3a4209d562716a0 Author: confidencesun confidence@gmail.com Date: 2015-05-26T23:47:00Z Merge pull request #4 from confidencesun/master delete JENA-491 example code commit 2d09a7dfe84539ecdafc9f99247019d0ddeefd5e Author: confidencesun confidence@gmail.com Date: 2015-06-11T14:56:15Z create new Template for SPARQL_11 commit 07c8b98dbafbf2ea12ee3f6df6816e8edda93650 Author: confidencesun confidence@gmail.com Date: 2015-06-12T03:03:13Z rollback FmtTemplate, in order to build success for TS_Scripted commit 2cb175d2305c02582eb24629d18d06bdc53ae4ba Author: confidencesun confidence@gmail.com Date: 2015-06-15T10:12:10Z reimplement Template, that does not affect the SPARQL 1.0 parser commit a8b0d53e83a39357f6d35763494ecfa447826b51 Author: confidencesun confidence@gmail.com Date: 2015-06-18T03:21:34Z The SPARQL 1.1 parser (like the SPARQL 1.0 parser) are now unchanged. commit c475249148792da2148cd9ec9976312516ed1d11 Author: confidencesun confidence@gmail.com Date: 2015-06-18T08:44:33Z refactor ConstructTemplate() to make ARQ for constructing quards similar to that for triples. commit 5076b1ed0844d0a1e7c57b539b64af3d831ee039 Author: confidencesun confidence@gmail.com Date: 2015-06-19T08:22:38Z new QueryExecution operations: execConstrucQuads(), execConstructDataset() commit d0ce13b2587905859c9ed854f5114b8c86c2125c Author: confidencesun confidence@gmail.com Date: 2015-06-19T08:53:07Z add licence info for ExampleConstructQuads; retain QuadAcc unchanged commit d58625693e9439ee0c9164b56993b44f34c2a383 Author: confidencesun confidence@gmail.com Date: 2015-06-21T13:16:18Z fix bugs for default graphs; add some examples in ExampleConstructQuads.java commit 5e56c1f2b0e2b0b2f6a1e7fda9fe17b6254176da Author: confidencesun confidence@gmail.com Date: 2015-06-21T13:28:15Z commit ExampleConstructQuads.java --- 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: pull master to begin
GitHub user confidencesun opened a pull request: https://github.com/apache/jena/pull/71 pull master to begin You can merge this pull request into a Git repository by running: $ git pull https://github.com/confidencesun/jena master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/jena/pull/71.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 #71 commit 5237c71aef40b7e1be24a62f407ab3f0ae550b41 Author: confidencesun confidence@gmail.com Date: 2015-03-21T16:34:54Z a demo for JENA-491 --- 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: pull master to begin
Github user confidencesun closed the pull request at: https://github.com/apache/jena/pull/71 --- 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. ---