@@ -0,0 +1,1904 @@
+/*%0A * Portions Copyright (c) 2011 Talis Inc, Some Rights Reserved%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A *%0A */%0A%0Apackage org.callimachusproject.stream;%0A%0Aimport java.util.List;%0A%0Aimport org.openrdf.query.BindingSet;%0Aimport org.openrdf.query.QueryEvaluationException;%0Aimport org.openrdf.query.TupleQueryResult;%0A%0A%0A/**%0A * Remove contiguous duplicates and empty results from a result set %0A * %0A * @author Steve Battle%0A */%0A%0Apublic class DeDupedResultSet implements TupleQueryResult %7B%0A%09TupleQueryResult results;%0A%09BindingSet next;%0A%0A%09public DeDupedResultSet(TupleQueryResult results) %0A%09throws QueryEvaluationException %7B%0A%09%09super();%0A%09%09this.results = results;%0A%09%09next = more();%0A%09%7D%0A%0A%09@Override%0A%09public void close() throws QueryEvaluationException %7B%0A%09%09results.close();%0A%09%7D%0A%0A%09@Override%0A%09public boolean hasNext() throws QueryEvaluationException %7B%0A%09%09return next!=null;%0A%09%7D%0A%0A%09@Override%0A%09public BindingSet next() throws QueryEvaluationException %7B%0A%09%09BindingSet next = this.next;%0A%09%09do %7B%0A%09%09%09this.next = more();%0A%09%09%7D while (this.next!=null && (this.next.equals(next) %7C%7C this.next.size()==0));%0A%09%09return next;%0A%09%7D%0A%09%0A%09private BindingSet more() throws QueryEvaluationException %7B%0A%09%09if (results.hasNext())%0A%09%09%09return results.next();%0A%09%09else return null;%0A%09%7D%0A%0A%09@Override%0A%09public void remove() throws QueryEvaluationException %7B%0A%09%7D%0A%0A%09@Override%0A%09public List%3CString%3E getBindingNames() %7B%0A%09%09return results.getBindingNames();%0A%09%7D%0A%0A%7D%0A

Add missing class DeDupedResultSet