Revision 23677 branches/v2_0_0_prep/libraries/libFMap_dataFile/src/org/gvsig/fmap/data/feature/file/dbf/DBFFeatureCollection.java
DBFFeatureCollection.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.data.feature.file.dbf; |
2 | 2 |
|
3 |
import java.util.ArrayList; |
|
4 |
import java.util.Collection; |
|
5 |
import java.util.Iterator; |
|
6 |
import java.util.NoSuchElementException; |
|
3 |
import java.util.*; |
|
7 | 4 |
|
8 | 5 |
import org.gvsig.fmap.data.DataManager; |
9 | 6 |
import org.gvsig.fmap.data.DataStore; |
10 | 7 |
import org.gvsig.fmap.data.ReadException; |
11 |
import org.gvsig.fmap.data.feature.AbstractFeatureCollection; |
|
12 |
import org.gvsig.fmap.data.feature.Feature; |
|
13 |
import org.gvsig.fmap.data.feature.FeatureID; |
|
14 |
import org.gvsig.fmap.data.feature.FeatureManager; |
|
15 |
import org.gvsig.fmap.data.feature.FeatureStore; |
|
16 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
8 |
import org.gvsig.fmap.data.feature.*; |
|
17 | 9 |
import org.gvsig.fmap.data.feature.expressionevaluator.Filter; |
18 | 10 |
import org.gvsig.tools.observer.DefaultObservable; |
19 | 11 |
|
... | ... | |
76 | 68 |
} |
77 | 69 |
return false; |
78 | 70 |
} |
71 |
|
|
72 |
protected Iterator internalIterator(int index) { |
|
73 |
this.checkModified(); |
|
74 |
DBFIterator dbfIter = new DBFIterator(this.featureType, index); |
|
75 |
return dbfIter; |
|
76 |
} |
|
79 | 77 |
|
80 |
public Iterator iterator() { |
|
81 |
this.checkModified(); |
|
82 |
DBFIterator dbfIter=new DBFIterator(this.featureType); |
|
83 |
return dbfIter; |
|
84 |
} |
|
85 |
|
|
86 | 78 |
public Object[] toArray() { |
87 | 79 |
this.checkModified(); |
88 | 80 |
ArrayList features= new ArrayList(); |
... | ... | |
149 | 141 |
private FeatureType featureType; |
150 | 142 |
|
151 | 143 |
public DBFIterator(FeatureType featureType){ |
152 |
this.featureType=featureType; |
|
153 |
position=0; |
|
144 |
this(featureType, 0); |
|
154 | 145 |
} |
155 | 146 |
|
147 |
/** |
|
148 |
* Creates a new DBFIterator starting at the given position |
|
149 |
* |
|
150 |
* @param featureType |
|
151 |
* the type of the features to iterate on |
|
152 |
* @param position |
|
153 |
* the position of the first feature to iterate on |
|
154 |
*/ |
|
155 |
public DBFIterator(FeatureType featureType, int position) { |
|
156 |
this.featureType = featureType; |
|
157 |
this.position = position; |
|
158 |
} |
|
156 | 159 |
|
157 | 160 |
protected FeatureID createCurrentFeatureID(long pos){ |
158 | 161 |
if (pos<driverFeatureCount){ |
Also available in: Unified diff