Revision 27525 branches/v2_0_0_prep/libraries/libDielmoOpenLiDAR/src/org/gvsig/fmap/dal/store/lidar/LiDARSetProvider.java
LiDARSetProvider.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.dal.store.lidar; |
2 | 2 |
|
3 |
import java.util.Iterator; |
|
4 | 3 |
import java.util.NoSuchElementException; |
5 | 4 |
|
6 | 5 |
import org.gvsig.fmap.dal.exception.DataException; |
7 | 6 |
import org.gvsig.fmap.dal.exception.ReadRuntimeException; |
7 |
import org.gvsig.fmap.dal.feature.DisposableIterator; |
|
8 | 8 |
import org.gvsig.fmap.dal.feature.Feature; |
9 | 9 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
10 | 10 |
import org.gvsig.fmap.dal.feature.FeatureType; |
... | ... | |
39 | 39 |
return false; |
40 | 40 |
} |
41 | 41 |
|
42 |
public Iterator fastIterator(long index) throws DataException { |
|
42 |
public DisposableIterator fastIterator(long index) throws DataException {
|
|
43 | 43 |
return new FastLiDARIterator(this.store, this.featureType, |
44 | 44 |
index); |
45 | 45 |
} |
46 | 46 |
|
47 |
public Iterator fastIterator() throws DataException { |
|
47 |
public DisposableIterator fastIterator() throws DataException {
|
|
48 | 48 |
return this.fastIterator(0); |
49 | 49 |
} |
50 | 50 |
|
... | ... | |
56 | 56 |
return this.store.getFeatureCount() > 0; |
57 | 57 |
} |
58 | 58 |
|
59 |
public Iterator iterator() throws DataException { |
|
59 |
public DisposableIterator iterator() throws DataException {
|
|
60 | 60 |
return this.iterator(0); |
61 | 61 |
} |
62 | 62 |
|
63 |
public Iterator iterator(long index) throws DataException { |
|
63 |
public DisposableIterator iterator(long index) throws DataException {
|
|
64 | 64 |
return new LiDARIteratorScale(this.store, this.query, |
65 | 65 |
this.featureType, |
66 | 66 |
index); |
67 | 67 |
} |
68 | 68 |
|
69 | 69 |
|
70 |
private class LiDARIteratorScale implements Iterator { |
|
70 |
private class LiDARIteratorScale implements DisposableIterator {
|
|
71 | 71 |
protected long curIndex; |
72 | 72 |
protected LiDARStoreProvider store; |
73 | 73 |
protected FeatureType featureType; |
... | ... | |
158 | 158 |
return this.store.getFeatureDataByIndex(curIndex, featureType); |
159 | 159 |
} |
160 | 160 |
|
161 |
public void dispose() { |
|
162 |
// TODO Auto-generated method stub |
|
163 |
|
|
164 |
} |
|
165 |
|
|
161 | 166 |
} |
162 | 167 |
|
163 | 168 |
|
164 | 169 |
|
165 |
private class LiDARIterator implements Iterator { |
|
170 |
private class LiDARIterator implements DisposableIterator {
|
|
166 | 171 |
protected long curIndex; |
167 | 172 |
protected LiDARStoreProvider store; |
168 | 173 |
protected FeatureType featureType; |
... | ... | |
205 | 210 |
return this.store.getFeatureDataByIndex(curIndex, featureType); |
206 | 211 |
} |
207 | 212 |
|
213 |
public void dispose() { |
|
214 |
// TODO Auto-generated method stub |
|
215 |
|
|
216 |
} |
|
217 |
|
|
208 | 218 |
} |
209 | 219 |
|
210 | 220 |
private class FastLiDARIterator extends LiDARIterator { |
Also available in: Unified diff