Re: parse one quad?

2018-03-12 Thread Andy Seaborne
One at a time and performance ... You could create a TokenizerText.makeTokenizerString and simply pull 4 tokens out and then check end of stream or DOT. Do you need the quad immediately or can you create a inout that t=you send the string to and catch it in the StreamRDF, and reuse that

Re: parse one quad?

2018-03-12 Thread ajs6f
org.apache.jena.sparql.core.Quad. That's enough for what I want to do. ajs6f > On Mar 12, 2018, at 4:17 PM, Martynas Jusevičius > wrote: > > So what are you going to parse the quad into, if not Dataset? > > On Mon, Mar 12, 2018 at 9:11 PM, ajs6f

Re: parse one quad?

2018-03-12 Thread Martynas Jusevičius
So what are you going to parse the quad into, if not Dataset? On Mon, Mar 12, 2018 at 9:11 PM, ajs6f wrote: > Thanks, Martynas, but no; I don't have a Dataset (and don't need or want > to build one for a single quad), and no InputStream (although I could get > one from a

Re: parse one quad?

2018-03-12 Thread ajs6f
Thanks, Martynas, but no; I don't have a Dataset (and don't need or want to build one for a single quad), and no InputStream (although I could get one from a String without too much fuss. RDFDataMgr or RDFParser are usually the best tools for parsing, but I'm looking for something a bit

Re: parse one quad?

2018-03-12 Thread Martynas Jusevičius
Maybe this? https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/riot/RDFDataMgr.html#read-org.apache.jena.query.Dataset-java.io.InputStream-org.apache.jena.riot.Lang- On Mon, Mar 12, 2018 at 8:46 PM, ajs6f wrote: > I've got a use case for parsing one quad (in

parse one quad?

2018-03-12 Thread ajs6f
I've got a use case for parsing one quad (in NQuads form) from a String. I've been paging around through RIOT and other parts of Jena, but I just can't seem to find any way to do this without building up a bunch of auxiliary objects (like Readers or StreamRDFs, etc.). Performance is something

Store data with bulk loader via Jena API

2018-03-12 Thread Davide Curcio
I used the bulk loader with Jena API to store data in TDB, but I don't know what is the best way to use it. Because I create statements for each iteration, and I pass data to bulk loader via InputStream. But if I store data after load statements into a model, I have an OutOfMemoryError, but I

Re: Getting Symmetric Concise Bounded Description with Fuseki

2018-03-12 Thread Martynas Jusevičius
I disagree about SCBD as the default. In a Linked Data context, DESCRIBE is usually used to return description of a resource, meaning the resource is in the subject position. And then bnode closure is added, because otherwise there would be no way to reach those bnodes. It's not about exploring

Default DESCRIBE Was: Getting Symmetric Concise Bounded Description with Fuseki

2018-03-12 Thread ajs6f
> On Mar 12, 2018, at 11:40 AM, Reto Gmür wrote: > ... >> -Original Message- >> From: Andy Seaborne >> ... >> The point about DESCRIBE is that the "right" answer is not a fixed data- >> independent algorithm but is best for the data being

Re: Getting Symmetric Concise Bounded Description with Fuseki

2018-03-12 Thread Andy Seaborne
On 12/03/18 15:40, Reto Gmür wrote: Hi Andy -Original Message- From: Andy Seaborne Sent: Saturday, March 10, 2018 3:47 PM To: users@jena.apache.org Subject: Re: Getting Symmetric Concise Bounded Description with Fuseki Hi Reto, The whole DescribeHandler system is

RE: Getting Symmetric Concise Bounded Description with Fuseki

2018-03-12 Thread Reto Gmür
Hi Andy > -Original Message- > From: Andy Seaborne > Sent: Saturday, March 10, 2018 3:47 PM > To: users@jena.apache.org > Subject: Re: Getting Symmetric Concise Bounded Description with Fuseki > > Hi Reto, > > The whole DescribeHandler system is very(, very) old and

Re: FILTER (CONTAINS on a graph name : should order matter ?

2018-03-12 Thread Martynas Jusevičius
?thing is undefined within GRAPH in your second query. On Mon, Mar 12, 2018 at 3:59 PM, Jean-Marc Vanel wrote: > Hi ! > > This works as expected: > > SELECT DISTINCT ?thing > WHERE { >graph ?thing { > [] ?p ?O . >} >

FILTER (CONTAINS on a graph name : should order matter ?

2018-03-12 Thread Jean-Marc Vanel
Hi ! This works as expected: SELECT DISTINCT ?thing WHERE { graph ?thing { [] ?p ?O . } FILTER (CONTAINS( str(?thing),"cartopair")) } but this gives an empty result : SELECT DISTINCT ?thing WHERE { graph ?thing {

Re: Streaming CONSTRUCT/INSERTs in TDB

2018-03-12 Thread Andy Seaborne
On 11/03/18 21:27, Adrian Gschwend wrote: On 10.03.18 00:36, Andy Seaborne wrote: Hi Andy, Executes in 2m 20s (java8) for me (and 1m 49s with java9 which is . Default heap which is IIRC 25% of RAM or 8G. Cold JVM, cold file cache. wow, did you do that with TDB commandline tools? Default

Re: [3.0.1] ResultSetFactory.fromJSON() won't parse ASK JSON result

2018-03-12 Thread Andy Seaborne
JSONInput.make(InputStream) -> SPARQLResult Andy On 12/03/18 10:13, Martynas Jusevičius wrote: Hi Andy, I'm not using QueryExecution here, I'm trying to parse JSON read from HTTP InputStream using ResultSetFactory.fromJSON(). Then I want to carry the result set, maybe do some logic based

Re: [3.0.1] ResultSetFactory.fromJSON() won't parse ASK JSON result

2018-03-12 Thread Martynas Jusevičius
Hi Andy, I'm not using QueryExecution here, I'm trying to parse JSON read from HTTP InputStream using ResultSetFactory.fromJSON(). Then I want to carry the result set, maybe do some logic based on it, and possibly serialize it back using ResultSetFormatter. Is that not possible with ASK result?

Re: Best way to save a large amount of triples in TDB

2018-03-12 Thread Dick Murray
On Mon, 12 Mar 2018, 09:27 Davide Curcio, wrote: > Hi, > I want to store a large amount of data inside the TDB server with the > Quantity or size on disk? Jena API. In my code, I retrieve data for each iteration, and so I need > to store these data in TDB, but if I

Best way to save a large amount of triples in TDB

2018-03-12 Thread Davide Curcio
Hi, I want to store a large amount of data inside the TDB server with the Jena API. In my code, I retrieve data for each iteration, and so I need to store these data in TDB, but if I create all statements with Jena API, for each iteration, before load data in the server, obviously I've

Re: [3.0.1] ResultSetFactory.fromJSON() won't parse ASK JSON result

2018-03-12 Thread Andy Seaborne
On 11/03/18 23:03, Martynas Jusevičius wrote: Hi, I'm getting the following JSON result from an ASK query: { "head": {}, "boolean": true } However, the method that usually works fine, will not parse it from InputStream (Jena 3.0.1):