[ 
https://issues.apache.org/jira/browse/JENA-701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Natanael Arndt updated JENA-701:
--------------------------------

    Description: 
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

  was:
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 
implementation 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


> 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