jena icon indicating copy to clipboard operation
jena copied to clipboard

Add support for configurable indentation length in turtle serialization

Open dgrtner-ecc opened this issue 1 year ago • 3 comments

Version

5.0.0

Feature

Hi I would like to ask for an extension of the configuration regarding serialization of Turtle (possibly including Trig) s. https://jena.apache.org/documentation/io/rdf-output.html#opt-turtle-trig

The configuration option I propose is the number of characters for the indentation which is currently a constant in WriterConst. It is set to 8 and we would like to configure the serialization (of pretty turtle) to have another indentation.

Thanks, Denis

Are you interested in contributing a solution yourself?

Perhaps?

dgrtner-ecc avatar Sep 11 '24 09:09 dgrtner-ecc

Hi @dgrtner-ecc ,

That would be good to have; both pretty styles ("wide", the default, and "long" where indent is 2) would benefit with being able to tweak the layout.

"long" style sets it to 2 in Turtle.ShellGraphLong (which really ought to be in WriterConst).

Have you tried it out and got generally reasonable changed output?

afs avatar Sep 15 '24 16:09 afs

Hi @afs,

yes it is definitely a big difference. This a very low priority issue so depending on your time and mine I could do it myself some time and provide a PR.

dgrtner-ecc avatar Oct 01 '24 09:10 dgrtner-ecc

I quite unlikely to get round to it anytime soon.

afs avatar Oct 01 '24 17:10 afs