Re: Jena TDB OOME GC overhead limit exceeded

2016-07-27 Thread Dick Murray
The MWE in the previous email will work with any even line text file and will produce the odd [B values. I can't see anywhere obvious where the non Jena code is creating them, just odd that there's so many of them! OK, that knocks the DBB idea on the head! I'll set the mapped symbol and play

Re: Jena TDB OOME GC overhead limit exceeded

2016-07-27 Thread Andy Seaborne
On 27/07/16 13:19, Dick Murray wrote: ;-) Yes I did. But then I switched to the actual files I need to import and they produce ~3.5M triples... Using normal Jena 3.1 (i.e. no special context symbols set) the commit after 100k triples works to import the file 10 times with the [B varying between

Query normalization for detection of interchangeable queries

2016-07-27 Thread Jindřich Mynarz
Hi, I want to be able to tell if SPARQL queries are interchangeable: their semantics is the same and they lead to the same results. I'd appreciate any tips on detecting interchangeable queries using Jena. Here's what I tried so far. I start with computationally cheaper comparisons and continue

Re: Unequal SPARQL algebras

2016-07-27 Thread Jindřich Mynarz
On Wed, Jul 27, 2016 at 12:36 PM, Andy Seaborne wrote: > > ARQ does have some isomorphism support: >>> >>>Op.isEqualTo(Op other, NodeIsomorphismMap labelMap) >>> >>> >> I found only Op.equalTo ( >> >>

Re: Jena TDB OOME GC overhead limit exceeded

2016-07-27 Thread Dick Murray
;-) Yes I did. But then I switched to the actual files I need to import and they produce ~3.5M triples... Using normal Jena 3.1 (i.e. no special context symbols set) the commit after 100k triples works to import the file 10 times with the [B varying between ~2Mb and ~4Mb. I'm currently testing a

Re: Setting error handler for WriterGraph/DatasetRIOT

2016-07-27 Thread Andy Seaborne
On 27/07/16 00:08, Martynas Jusevičius wrote: On 3.0.1 RDFWriter w = model.getWriter("RDF/XML"); w.setProperty("allowBadURIs", true); does not work -- calls RDFWriterRIOT.setProperty() instead of BaseXMLWriter.setProperty(), so "allowBadURIs" has no effect. Any workaround ideas? It

Re: Setting error handler for WriterGraph/DatasetRIOT

2016-07-27 Thread Andy Seaborne
On 27/07/16 10:18, Martynas Jusevičius wrote: Our use case is round-tripping, so after I solved reading I moved on to writing (and started a new thread). What I probably haven't made clear is that there is no intermediate data structure holding the form data. It is being read directly into a

Re: Jena TDB OOME GC overhead limit exceeded

2016-07-27 Thread Andy Seaborne
On 27/07/16 11:22, Dick Murray wrote: Hello. Something doesn't add up here... I've run repeated tests with the following MWE on a 16GB machine with -Xms8g -Xmx8g and the I always get an OOME. What I don't understand is the size of [B increases with each pass until the OOME is thrown. The exact

Re: Unequal SPARQL algebras

2016-07-27 Thread Andy Seaborne
On 27/07/16 11:13, Jindřich Mynarz wrote: Hi Andy, On Wed, Jul 27, 2016 at 11:56 AM, Andy Seaborne wrote: Two algebra expressions are equal if they are the same structures, including variable names. ARQ does have some isomorphism support: Op.isEqualTo(Op other,

Re: Jena TDB OOME GC overhead limit exceeded

2016-07-27 Thread Dick Murray
Hello. Something doesn't add up here... I've run repeated tests with the following MWE on a 16GB machine with -Xms8g -Xmx8g and the I always get an OOME. What I don't understand is the size of [B increases with each pass until the OOME is thrown. The exact same process is run 5 times with a new

Re: Jena generic rules

2016-07-27 Thread javed khan
Thanks Dave and Lorenz for your time, I finally fixed it. I passed "model" as second orgument to QueryExecutionFactory , which should be InfModel rather.. QueryExecution qe=QueryExecutionFactory.create(query, inf); regards On Wed, Jul 27, 2016 at 2:10 AM, Dave Reynolds

Re: Unequal SPARQL algebras

2016-07-27 Thread Jindřich Mynarz
Hi Andy, On Wed, Jul 27, 2016 at 11:56 AM, Andy Seaborne wrote: > > Two algebra expressions are equal if they are the same structures, > including variable names. > > ARQ does have some isomorphism support: > >Op.isEqualTo(Op other, NodeIsomorphismMap labelMap) > I found

Re: Unequal SPARQL algebras

2016-07-27 Thread Andy Seaborne
On 27/07/16 09:25, Jindřich Mynarz wrote: Hi, I'm wondering why Jena thinks the optimized SPARQL algebras of the following queries are different: # Query 1 PREFIX skos: SELECT * WHERE { ?concept skos:broader [ skos:prefLabel ?broaderLabel ] . } #

Re: Jena generic rules

2016-07-27 Thread Lorenz B.
Please provide a minimal running example that does not work 1) minimal data - in Turtle format 2) the rule that you use 3) the code that performs the rule loading + querying > Sorry but still not working. > > When I query instances of Expert, it shows "Tim" which is fine. When I > query

Re: Setting error handler for WriterGraph/DatasetRIOT

2016-07-27 Thread Martynas Jusevičius
Our use case is round-tripping, so after I solved reading I moved on to writing (and started a new thread). What I probably haven't made clear is that there is no intermediate data structure holding the form data. It is being read directly into a Model just like any other RDF format, using

Re: Jena generic rules

2016-07-27 Thread Dave Reynolds
On 27/07/16 09:54, javed khan wrote: Sorry but still not working. When I query instances of Expert, it shows "Tim" which is fine. When I query instance of Student, it shows "Khan", which is also fine. Even when I query both in one, it shows "Khan" which is also ok because Khan is also Expert

Re: Jena generic rules

2016-07-27 Thread javed khan
Sorry but still not working. When I query instances of Expert, it shows "Tim" which is fine. When I query instance of Student, it shows "Khan", which is also fine. Even when I query both in one, it shows "Khan" which is also ok because Khan is also Expert and Student, but when I try to assign

Re: Jena generic rules

2016-07-27 Thread javed khan
are wrong. Either use the correct URI: or use the prefix form: rdf:type I am sorry due to too many threads, I did not read this reply. Thanks Dave, let me try. On Wed, Jul 27,

Re: Jena generic rules

2016-07-27 Thread Dave Reynolds
See my earlier reply, you had an error in the URLs in your rules. Dave On 27/07/16 09:33, javed khan wrote: If my email (code) is not understandable, I am just explaining in plain text. I have class Expert which have some researches i-e "Tim hasResearch Ontologies". I have another class

Re: Jena generic rules

2016-07-27 Thread javed khan
If my email (code) is not understandable, I am just explaining in plain text. I have class Expert which have some researches i-e "Tim hasResearch Ontologies". I have another class Student (subclasses Master Phd). Khan is instance of Phd class (ultimately of Student class also). Phd student can

Unequal SPARQL algebras

2016-07-27 Thread Jindřich Mynarz
Hi, I'm wondering why Jena thinks the optimized SPARQL algebras of the following queries are different: # Query 1 PREFIX skos: SELECT * WHERE { ?concept skos:broader [ skos:prefLabel ?broaderLabel ] . } # Query 1 algebra (bgp (triple ?concept

Re: Jena generic rules

2016-07-27 Thread javed khan
I am sorry that is just the mistake when I copy code from my IDE to email. In the original code, its written just once. On Wed, Jul 27, 2016 at 1:11 AM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > I'm not an expert, but why do you have each URI twice in the rule? > > > I have rule

Re: Jena generic rules

2016-07-27 Thread Andy Seaborne
On 27/07/16 09:01, javed khan wrote: This is what your email appear like to other people: http://mail-archives.apache.org/mod_mbox/jena-users/201607.mbox/%3CCAJhui%2Bu9YjFjVQ%2BJ43O5zE2D4WxAvRzwpVKHXLbzHHhjum5h1w%40mail.gmail.com%3E I suspect that your mailer has attempted to covert HTML (in

Re: Jena generic rules

2016-07-27 Thread Dave Reynolds
On 27/07/16 09:01, javed khan wrote: I have rule body:I want instance x which are in both classes to assign to another class "StudentExpert" which have no other instances. But does not work. (My Owl inverse property and transitive property rule works but this generic rule does not work) String

Re: Jena generic rules

2016-07-27 Thread Dave Reynolds
On 27/07/16 09:11, Lorenz B. wrote: I'm not an expert, but why do you have each URI twice in the rule? I suspect it's an artefact of the mailer used not of the actual data, otherwise it wouldn't parse. Dave I have rule body:I want instance x which are in both classes to assign to another

Re: Jena generic rules

2016-07-27 Thread Lorenz B.
I'm not an expert, but why do you have each URI twice in the rule? > I have rule body:I want instance x which are in both classes to assign to > another class "StudentExpert" which have no other instances. But does not > work. > (My Owl inverse property and transitive property rule works but this

Re: Jena generic rules

2016-07-27 Thread javed khan
I have rule body:I want instance x which are in both classes to assign to another class "StudentExpert" which have no other instances. But does not work. (My Owl inverse property and transitive property rule works but this generic rule does not work) String rule = "*[rule1:(?x

Re: Setting error handler for WriterGraph/DatasetRIOT

2016-07-27 Thread Andy Seaborne
On 26/07/16 22:06, Martynas Jusevičius wrote: OK. But how do you handle invalid URI input without turning the checking off? That's what ParserProfile is for. It provides the policy for string from the token in parsing to IRI. And without reading and then writing the Model? Where the user