[
https://issues.apache.org/jira/browse/JENA-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13177725#comment-13177725
]
Andy Seaborne commented on JENA-182:
------------------------------------
If it's to reduce size, then you can do only partial "pretty" trig and gat much
if not all of the advantage.
The RDF-WG hasn't defined TriG yet som thing may chnage - I'm arguing there for
no restriction of using a graph name once per file. Instead, I argue, multiple
named blocks of triples that all go in the same graph is better as sometimes
quads don't arrive in perfect G-sorted order.
I have some less-than-half finished code for a TriG writer. Well, it's a new
Turtle writer that can be called from inside a TriG writer.
https://svn.apache.org/repos/asf/incubator/jena/Scratch/AFS/Dev/trunk/src/main/java/riot/
TriGWriter.java
TurtleWriter2.java
TurtleWriterBlocks.java
TurtleWriterFlat.java
The current Jena Turtle writer is very old code and it shows. It can't easily
be made to work embedded so I was rewriting it. TurtleWriter2 is not complete
- it does not have list handling, sorted predicates or object lists (although
personally I don't like object lists much).
And datasets don't have prefixes (yet).
And there's no writer architecture.
I have been assuming the model.write() style is wrong - it needs to be
WriterThing.write(OutputStream, syntax, model)
WriterThing.write(OutputStream, syntax, dataset)
and have one system wide WriterThing. Only RDF/XML needs very specialised
setup and we shouldn't distort things just for RDF/XML.
The code really is the easier part of the problem I put together and never
completed. It's only just been put into SVN during some local cleaning.
Nice output is hard; there are many aspects of the current Turtle writer that
aren't in the new one. Some people care greatly about consistence of output -
they store RDF data in version control.
Hope this helps, but ignore it if not.
> Add TriG support to RiotWriter
> ------------------------------
>
> Key: JENA-182
> URL: https://issues.apache.org/jira/browse/JENA-182
> Project: Jena
> Issue Type: New Feature
> Components: RIOT
> Reporter: Paolo Castagna
> Priority: Minor
> Labels: trig
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> RIOT has the ability to parse TriG
> (http://www4.wiwiss.fu-berlin.de/bizer/TriG/) files but not to serialize RDF
> datasets in that format.
> When working with named graphs people would probably find it easier to look
> at TriG files rather than N-Quads (same as Turtle and N-Triples).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira