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 framework across quad parsing?


On 12/03/18 20:18, ajs6f wrote:
org.apache.jena.sparql.core.Quad. That's enough for what I want to do.


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 <> 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 String without too much fuss.

RDFDataMgr or RDFParser are usually the best tools for parsing, but I'm
looking for something a bit lighter-weight.


On Mar 12, 2018, at 4:07 PM, Martynas Jusevičius <>

Maybe this?

On Mon, Mar 12, 2018 at 8:46 PM, ajs6f <> wrote:

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 of a concern, so I'd rather not build up any more than I have

Am I missing something, or do we just not expose that functionality?
inclined to bet that we _have_ to have impled it somewhere, just for our
own sanity, but maybe not!)


Reply via email to