[ https://issues.apache.org/jira/browse/JENA-1390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16152860#comment-16152860 ]
Andy Seaborne commented on JENA-1390: ------------------------------------- Looks like a good idea to me. +1 > 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 > Labels: easytask > > 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. > {noformat} > /** > 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; > } > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)