Revision 30079 branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/impl/DefaultFeatureAttributeDescriptor.java

View differences:

DefaultFeatureAttributeDescriptor.java
1 1
package org.gvsig.fmap.dal.feature.impl;
2 2

  
3
import java.io.File;
4 3
import java.text.DateFormat;
5
import java.util.Date;
6 4
import java.util.HashMap;
7 5
import java.util.Iterator;
8 6
import java.util.Map;
......
10 8

  
11 9
import org.cresques.cts.IProjection;
12 10
import org.gvsig.fmap.dal.DataTypes;
13
import org.gvsig.fmap.dal.feature.Feature;
14 11
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
15 12
import org.gvsig.fmap.dal.feature.exception.UnsupportedDataTypeException;
16 13
import org.gvsig.fmap.geom.Geometry;
......
40 37
	protected boolean isAutomatic;
41 38

  
42 39

  
43
    private static final Class TYPE_CLASS[] = new Class[] {
44
    	null,
45
    	Boolean.class,
46
    	Byte.class, // keep for formatting
47
        Character.class,
48
        Integer.class,
49
        Long.class,
50
        Float.class,
51
        Double.class,
52
        String.class,
53
        Date.class,
54
        Date.class,
55
        Date.class,
56
        Geometry.class,
57
        Object.class, //
58
        Feature.class,
59
        IProjection.class,
60
        File.class,
61
        new byte[] {}.getClass()
62

  
63
    };
64

  
65 40
	protected DefaultFeatureAttributeDescriptor() {
66 41
		this.allowNull = true;
67 42
		this.dataType = DataTypes.UNKNOWN;
......
175 150
	}
176 151

  
177 152
	public Class getObjectClass() {
178
		if (this.dataType > TYPE_CLASS.length || this.dataType < 0) {
153
		if (this.dataType > DataTypes.TYPE_CLASS.length || this.dataType < 0) {
179 154
			throw new UnsupportedDataTypeException(this.name, this.dataType);
180 155
		}
181
		return TYPE_CLASS[this.dataType];
156
		return DataTypes.TYPE_CLASS[this.dataType];
182 157
	}
183 158

  
184 159
	public int getPrecision() {

Also available in: Unified diff