Re: Error in query

2017-08-24 Thread javed khan
Thank you Martynas, I got it... It confused me slightly because it was my first time I executed CONSTRUCT using Jena code. On Fri, Aug 25, 2017 at 12:00 AM, Martynas Jusevičius < marty...@atomgraph.com> wrote: > Because there are 2 forms of SPARQL queries: > - ASK and SELECT return ResultSet

Re: Error in query

2017-08-24 Thread Martynas Jusevičius
Because there are 2 forms of SPARQL queries: - ASK and SELECT return ResultSet (table of variable bindings) - CONSTRUCT and DESCRIBE return Model (RDF graph = triples) On Thu, Aug 24, 2017 at 10:58 PM, javed khan wrote: > Hello Martynas, it finally showed the result. > >

Re: Error in query

2017-08-24 Thread javed khan
Hello Martynas, it finally showed the result. But I did not understand the code. Why we assign the result to a Model? Why not resultset. Model results = qexec.execConstruct() ; On Thu, Aug 24, 2017 at 11:44 PM, Martynas Jusevičius < marty...@atomgraph.com> wrote: > This means your query

Re: Error in query

2017-08-24 Thread Martynas Jusevičius
This means your query hasn't matched anything. Show us your data. On Thu, Aug 24, 2017 at 10:42 PM, javed khan wrote: > In response to my question earlier, I replace this > > ResultSet results = (ResultSet) qexec.execConstruct() ; > > with > > Model results =

Re: Error in query

2017-08-24 Thread javed khan
In response to my question earlier, I replace this ResultSet results = (ResultSet) qexec.execConstruct() ; with Model results = qexec.execConstruct() ; results.write(System.out, "TURTLE"); But how can I get the require result i.e value of ?z and ?y I expect the following result: Bob

Error in query

2017-08-24 Thread javed khan
Hello What is the problem in this query: 'Male' is string literal here. (The query works inside Protege) CONSTRUCT { ?x mo:hasUncle ?y } WHERE { ?x mo:hasParents ?z .?z mo:Gender 'Male' . ?z mo:hasBrother ?y} Query query = QueryFactory.create(str); QueryExecution qexec =

RE: Using Lucene with multiple triplestores

2017-08-24 Thread Charles Greer
An alternate approach to Lucene + fuseki, though decidedly less Open Source, is to use the MarkLogic connector for Jena. MarkLogic is a document store with highly sophisticated text analytics and search, plus it also supports triples, graphs + SPARQL. Documents can embed both complex markup,

Re: SPARQL vs Jena rules

2017-08-24 Thread dandh988
As Andy said this has been asked before on this list and others. I'm guessing this is an academic question? As such you need to research what SPARQL and rules are designed to do. When you understand that you can compare them. Whether one is faster than the other depends on the implementation.

Re: SPARQL vs Jena rules

2017-08-24 Thread Andy Seaborne
This has been asked before, most recently 2017-08-14. https://lists.apache.org/thread.html/ae4c1f5dfbacfb9bf4294a4cf2967e0c7050c81b20f80e6c425a9aa8@%3Cusers.jena.apache.org%3E Please search the archives before asking questions. Andy On 24/08/17 08:50, tina sani wrote: What are some of

Re: more predictable Turtle output

2017-08-24 Thread Élie Roux
Le 02/08/2017 à 18:39, Élie Roux a écrit : Subclassing ShellGraph and overriding the methods like writePredicateObjectList would be my approach. Too much is private to really subclass - you'll need to copy the class at them moment. Along with registration, then at least you can have both in the

SPARQL vs Jena rules

2017-08-24 Thread tina sani
What are some of advantages of SPARQL over (Jena) rules? I know only that SPARQL is W3C recommendation and jena rules are not. Similarly, Jena rules are monotonic which does not add/remove any data just infer new knowledge. How SPARQL is more expressive than rules? If we get some inference using