Revision 21688

View differences:

branches/Mobile_Compatible_Hito_1/libFMap_data/src/org/gvsig/data/vectorial/FeatureID.java
1 1
package org.gvsig.data.vectorial;
2 2

  
3
import java.util.HashMap;
4

  
3 5
import org.gvsig.data.ReadException;
4 6

  
5 7

  
6 8
public interface FeatureID {
7 9

  
8 10
	public Feature getFeature(FeatureType featureType) throws ReadException;
11
	
12
	/**
13
	 * Key: the property name 
14
	 * value: the value of the property
15
	 * It is useful to have a standard way of asking for
16
	 * information about the id 
17
	 * In example a FilterToSQL needs to know this to 
18
	 * serialize the id
19
	 * @return
20
	 */
21
	public HashMap toHashMap();
9 22
}
branches/Mobile_Compatible_Hito_1/libFMap_data/src/org/gvsig/data/vectorial/MemoryFeatureID.java
1 1
package org.gvsig.data.vectorial;
2 2

  
3
import java.util.HashMap;
3 4

  
5

  
4 6
public class MemoryFeatureID implements FeatureID{
5 7
	private Feature feature;
6 8
	public MemoryFeatureID(Feature feature){
......
29 31
		strBuffer.append(this.feature.hashCode());
30 32
		return strBuffer.toString().hashCode();
31 33
	}
34
	public HashMap toHashMap() {
35
		HashMap result = new HashMap();
36
		result.put("hashCode", new Integer(this.feature.hashCode()));
37
		return result;
38
	}
39
	
40
	
32 41

  
33 42
}

Also available in: Unified diff