Adam Jacobs created JENA-1390: --------------------------------- Summary: Add toModel() method in StmtIterator Key: JENA-1390 URL: https://issues.apache.org/jira/browse/JENA-1390 Project: Apache Jena Issue Type: Improvement Components: Core Affects Versions: Jena 3.4.0 Reporter: Adam Jacobs Priority: Trivial
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; } -- This message was sent by Atlassian JIRA (v6.4.14#64029)