Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Done
-
Jena 3.4.0
Description
Add direct conversion of org.apache.jena.rdf.model.StmtIterator to Model.
This would align with the toList() and toSet() functionality of ExtendedIterator.
The following method may be added to the StmtIterator interface.
/** Answer a Model of the [remaining] Statements of this iterator, consuming this iterator. */ public default Model toModel() { Model m = ModelFactory.createDefaultModel(); this.forEachRemaining(m::add); return m; }