Hi Jorge,
On 17/05/11 17:09, Jorge Christodoulou wrote:
> Hi, the ResultSet man again :)Is it possible to remove a "row" from a
> com.hp.hpl.jena.query.ResultSet during a for loop? I tried: for(;
> rSet.hasNext() ;){
> if(listCSD.contains(rSet.nextSolution().get(commonVars.get(0)).toString()))
> rSet.remove(); } but it throws this
> exception:java.lang.UnsupportedOperationException: ResultSetMem:
> Attempt to remove an element
What would it mean to remove a row from a ResultSet? It's a set of
bindings, not a construct in the underlying database. You don't have to
process that row if you don't want to. If you want to avoid any similar
row in future, add the row to a HashSet of ignorable solutions.
Ian
--
____________________________________________________________
Ian Dickinson Epimorphics Ltd, Bristol, UK
mailto:[email protected] http://www.epimorphics.com
cell: +44-7786-850536 landline: +44-1275-399069
------------------------------------------------------------
Epimorphics Ltd. is a limited company registered in England
(no. 7016688). Registered address: Court Lodge, 105 High St,
Portishead, Bristol BS20 6PT, UK