Well, this probably requires some generic method(s) in Dataset/Model as well, something like:
T apply(Function<Dataset, T> f); This would allow nice chaining of multiple queries, e.g DESCRIBE and SELECT: ResultSet results = dataset.apply(describe).apply(select); Seems more elegant to me than all the QueryExecution boilerplate. On Mon, Dec 12, 2016 at 9:00 PM, A. Soroka <aj...@virginia.edu> wrote: > What are the kinds of usages to which you are imagining these kind of types > being put? > > --- > A. Soroka > The University of Virginia Library > >> On Dec 12, 2016, at 2:03 PM, Martynas Jusevičius <marty...@graphity.org> >> wrote: >> >> Hey, >> >> has Jena considered taking advantage of the functional features in Java 8? >> >> What I have in mind is interfaces like: >> >> Construct extends Query implements Function<Dataset, Model> >> >> Describe extends Query implements Function<Dataset, Model> >> >> Select extends Query implements Function<Dataset, ResultSet> >> >> Ask extends Query implements Function<Dataset, ResultSet> >> >> >> Martynas >> atomgraph.com >