Revision 21687
branches/Mobile_Compatible_Hito_1/libFMap_dataFile/src-test/org/gvsig/data/datastores/vectorial/FilterTest.java | ||
---|---|---|
4 | 4 |
package org.gvsig.data.datastores.vectorial; |
5 | 5 |
|
6 | 6 |
import java.io.File; |
7 |
import java.io.StringWriter; |
|
7 | 8 |
import java.util.HashSet; |
8 | 9 |
import java.util.Iterator; |
9 | 10 |
import java.util.Set; |
... | ... | |
25 | 26 |
import org.gvsig.data.vectorial.FeatureCollection; |
26 | 27 |
import org.gvsig.data.vectorial.FeatureType; |
27 | 28 |
import org.gvsig.data.vectorial.filter.FilterFactory2Impl; |
29 |
import org.gvsig.data.vectorial.filter.FilterToSQL; |
|
30 |
import org.gvsig.data.vectorial.filter.FilterToSQLException; |
|
28 | 31 |
import org.opengis.filter.Filter; |
29 | 32 |
import org.opengis.filter.FilterFactory2; |
30 | 33 |
import org.opengis.filter.expression.Expression; |
... | ... | |
316 | 319 |
FeatureType ft=store.getDefaultFeatureType(); |
317 | 320 |
FeatureCollection featureCollection=null; |
318 | 321 |
|
322 |
try{ |
|
323 |
StringWriter out = new StringWriter(); |
|
324 |
FilterToSQL converter = new FilterToSQL(out); |
|
325 |
converter.encode(filter); |
|
326 |
System.out.println(out.toString()); |
|
327 |
} catch (FilterToSQLException e){ |
|
328 |
e.printStackTrace(); |
|
329 |
} |
|
330 |
|
|
319 | 331 |
try { |
320 | 332 |
featureCollection = (FeatureCollection)store.getDataCollection(ft,filter,order); |
321 | 333 |
} catch (ReadException e1) { |
branches/Mobile_Compatible_Hito_1/libFMap_dataFile/src/org/gvsig/data/datastores/vectorial/file/dbf/DBFFeatureID.java | ||
---|---|---|
1 | 1 |
package org.gvsig.data.datastores.vectorial.file.dbf; |
2 | 2 |
|
3 |
import java.util.HashMap; |
|
4 |
|
|
3 | 5 |
import org.gvsig.data.ReadException; |
4 | 6 |
import org.gvsig.data.vectorial.Feature; |
5 | 7 |
import org.gvsig.data.vectorial.FeatureID; |
... | ... | |
37 | 39 |
strBuffer.append("]"); |
38 | 40 |
return strBuffer.toString().hashCode(); |
39 | 41 |
} |
42 |
public HashMap toHashMap() { |
|
43 |
HashMap result = new HashMap(); |
|
44 |
result.put("featureIndex", new Long(featureIndex)); |
|
45 |
return result; |
|
46 |
} |
|
40 | 47 |
|
41 | 48 |
} |
Also available in: Unified diff