Revision 47652 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/featureset/FilteredIterator.java
FilteredIterator.java | ||
---|---|---|
25 | 25 |
|
26 | 26 |
import java.util.Iterator; |
27 | 27 |
import java.util.NoSuchElementException; |
28 |
import java.util.Objects; |
|
28 | 29 |
import org.gvsig.fmap.dal.exception.DataEvaluatorException; |
29 | 30 |
import org.gvsig.fmap.dal.exception.DataException; |
31 |
import org.gvsig.fmap.dal.feature.FeatureReference; |
|
30 | 32 |
import org.gvsig.fmap.dal.feature.impl.DefaultFeature; |
31 | 33 |
import org.gvsig.fmap.dal.feature.spi.FeatureProvider; |
32 | 34 |
import org.gvsig.tools.evaluator.Evaluator; |
... | ... | |
134 | 136 |
} |
135 | 137 |
} |
136 | 138 |
|
137 |
public boolean match(DefaultFeature feature) throws DataException { |
|
138 |
try { |
|
139 |
if (filter==null) { |
|
140 |
return true; |
|
141 |
} |
|
142 |
Object x = this.filter.evaluate(feature); |
|
143 |
return toBooleanMatch(x); |
|
144 |
} catch (Exception e) { |
|
145 |
throw new DataEvaluatorException(e); |
|
146 |
} |
|
147 |
} |
|
139 |
public boolean match(DefaultFeature feature) throws DataException { |
|
140 |
try { |
|
141 |
if (filter == null) { |
|
142 |
return true; |
|
143 |
} |
|
144 |
Object x = this.filter.evaluate(feature); |
|
145 |
return toBooleanMatch(x); |
|
146 |
} catch (Exception e) { |
|
147 |
FeatureReference ref = null; |
|
148 |
try { |
|
149 |
ref = feature.getReference(); |
|
150 |
} catch (Throwable th) { |
|
151 |
//Do nothing |
|
152 |
} |
|
153 |
throw new DataEvaluatorException(e, Objects.toString(ref)); |
|
154 |
} |
|
155 |
} |
|
148 | 156 |
|
149 | 157 |
@Override |
150 | 158 |
public Object next() { |
Also available in: Unified diff