[ 
https://issues.apache.org/jira/browse/JENA-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14003973#comment-14003973
 ] 

Andy Seaborne commented on JENA-701:
------------------------------------

Both {{NTripleWriter}} and {{N3JenaWriterCommon}} are legacy, left in place for 
maximum compatibility only. They are not used by {{model.write}} anymore if 
RIOT is on the classpath.

The new writers are in RIOT (in the jena-arq code base -- they deal with 
datasets as well as graphs).  The best way to read/write is to use 
{{RDFDataMgr}}.

In RIOT, you will find {{NodeFmtLib}} and {{NodeFormatter}}. SPARQL writing has 
{{FmtUtils}} (older than {{NodeFmtLib}}).

> formatNTriples method for RDFNode
> ---------------------------------
>
>                 Key: JENA-701
>                 URL: https://issues.apache.org/jira/browse/JENA-701
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: Jena
>            Reporter: Natanael Arndt
>
> I suggest that jena should have a method e.g. {{formatNTriples}} for the 
> {{RDFNode}} interface which will output the N-Triples representation of this 
> node. This can be helpful for generating SPARQL query strings and can unify 
> code of {{NTripleWriter}} [1] and {{N3JenaWriterCommon}} [2].
> Currently {{NTripleWriter}} and {{N3JenaWriterCommon}} have their own 
> implementations {{writeNode}} resp. {{formatNode}} for generating the correct 
> String representation.
> [1] 
> https://github.com/apache/jena/blob/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/NTripleWriter.java#L208
> [2] 
> https://github.com/apache/jena/blob/trunk/jena-core/src/main/java/com/hp/hpl/jena/n3/N3JenaWriterCommon.java#L463



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to