On 2013-09-11 23:15, Chris_Dollin wrote:
On Wednesday, September 11, 2013 07:28:33 PM [email protected] wrote:
Is there a Jena stmt/triple iterator feeding items in order ?
I looked around the Jena API list to find, but no luck. However,
the 'Model.write(outputStream, lang)' method produces triple
listing in hierarchy with indentation - wonder how the method
produces such listing.
Is Model.listStatements() what you're looking for?
[Note: there is no "in order"; the statements come out in some
unspecified implementation-specific order.]
Chris
What I'm looking for is another iterator (or a Jena utility ?)
which can order the triples in hierarchy - not in random sequence
from 'listStatements()'. I just need to traverse a resource from
the top to the bottom, and it'd be nice to have an iterator to feed
the triples that way. The model.write() produces triples in sequence
and I just want to utilize that ordering mechanism.
Chan