You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Martynas Jusevičius <ma...@atomgraph.com> on 2018/08/21 12:11:26 UTC
Creating AWriter for StreamRDF
Hi,
I'm extending WriterStreamRDFPlain to implement a streaming CSV
parser. Its constructor [1] states:
Output tuples, using UTF8 output See
StreamRDFLib.writer(java.io.OutputStream) for ways to create a AWriter
object.
Then I'm looking at StreamRDFLib, but there are no methods that create
AWriter [2]. Only methods that create Stream RDF.
What am I missing?
[1] https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/riot/writer/WriterStreamRDFPlain.html#WriterStreamRDFPlain-org.apache.jena.atlas.io.AWriter-
[2] https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/riot/system/StreamRDFLib.html
Martynas
Re: Creating AWriter for StreamRDF
Posted by Andy Seaborne <an...@apache.org>.
IO.wrap (various)
Andy
On 21/08/18 13:11, Martynas Jusevičius wrote:
> Hi,
>
> I'm extending WriterStreamRDFPlain to implement a streaming CSV
> parser. Its constructor [1] states:
>
> Output tuples, using UTF8 output See
> StreamRDFLib.writer(java.io.OutputStream) for ways to create a AWriter
> object.
>
> Then I'm looking at StreamRDFLib, but there are no methods that create
> AWriter [2]. Only methods that create Stream RDF.
>
> What am I missing?
>
> [1] https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/riot/writer/WriterStreamRDFPlain.html#WriterStreamRDFPlain-org.apache.jena.atlas.io.AWriter-
> [2] https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/riot/system/StreamRDFLib.html
>
> Martynas
>
Re: Creating AWriter for StreamRDF
Posted by Andy Seaborne <an...@apache.org>.
Or WriterStreamRDFBlocks.
WriterStreamRDFPlain - output is n-quads like (no prefixes use to
shorten, no numbers as numbers)
It's the N-triples/quads writer.
WriterStreamRDFFlat - output is Turtle abbreviated.
(it's RDFFormat.TURTLE_FLAT)
WriterStreamRDFBlocks - output is subject then the predicate/objects
(it's RDFFormat.TURTLE_BLOCKS).
Andy
On 21/08/18 22:38, Martynas Jusevičius wrote:
> Or should I use WriterStreamRDFFlat instead of WriterStreamRDFPlain?
> Can't really understand the difference, except that they extend
> different classes...
>
> On Tue, Aug 21, 2018 at 2:11 PM, Martynas Jusevičius
> <ma...@atomgraph.com> wrote:
>> Hi,
>>
>> I'm extending WriterStreamRDFPlain to implement a streaming CSV
>> parser. Its constructor [1] states:
>>
>> Output tuples, using UTF8 output See
>> StreamRDFLib.writer(java.io.OutputStream) for ways to create a AWriter
>> object.
>>
>> Then I'm looking at StreamRDFLib, but there are no methods that create
>> AWriter [2]. Only methods that create Stream RDF.
>>
>> What am I missing?
>>
>> [1] https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/riot/writer/WriterStreamRDFPlain.html#WriterStreamRDFPlain-org.apache.jena.atlas.io.AWriter-
>> [2] https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/riot/system/StreamRDFLib.html
>>
>> Martynas
Re: Creating AWriter for StreamRDF
Posted by Martynas Jusevičius <ma...@atomgraph.com>.
Or should I use WriterStreamRDFFlat instead of WriterStreamRDFPlain?
Can't really understand the difference, except that they extend
different classes...
On Tue, Aug 21, 2018 at 2:11 PM, Martynas Jusevičius
<ma...@atomgraph.com> wrote:
> Hi,
>
> I'm extending WriterStreamRDFPlain to implement a streaming CSV
> parser. Its constructor [1] states:
>
> Output tuples, using UTF8 output See
> StreamRDFLib.writer(java.io.OutputStream) for ways to create a AWriter
> object.
>
> Then I'm looking at StreamRDFLib, but there are no methods that create
> AWriter [2]. Only methods that create Stream RDF.
>
> What am I missing?
>
> [1] https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/riot/writer/WriterStreamRDFPlain.html#WriterStreamRDFPlain-org.apache.jena.atlas.io.AWriter-
> [2] https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/riot/system/StreamRDFLib.html
>
> Martynas