Revision 20419 trunk/libraries/libDataSource/src/org/gvsig/data/vectorial/MemoryFeature.java
MemoryFeature.java | ||
---|---|---|
1 | 1 |
package org.gvsig.data.vectorial; |
2 | 2 |
|
3 | 3 |
import java.text.ParseException; |
4 |
import java.util.Date; |
|
4 | 5 |
import java.util.Iterator; |
5 | 6 |
import java.util.List; |
6 | 7 |
|
... | ... | |
32 | 33 |
|
33 | 34 |
} |
34 | 35 |
|
35 |
public MemoryFeature(IFeatureType type,boolean defaultValues) throws NumberFormatException, IsNotFeatureSettingException {
|
|
36 |
public MemoryFeature(IFeatureType type,boolean defaultValues) { |
|
36 | 37 |
super(type); |
37 | 38 |
if (defaultValues){ |
38 | 39 |
Iterator iterator=type.iterator(); |
... | ... | |
44 | 45 |
|
45 | 46 |
Object defaultValue=featureAttribute.getDefaultValue(); |
46 | 47 |
if (attributeType.equals(IFeatureAttributeDescriptor.TYPE_BYTE)){ |
47 |
set(i,Byte.parseByte((String)defaultValue)); |
|
48 |
try { |
|
49 |
set(i,Byte.parseByte((String)defaultValue)); |
|
50 |
} catch (IsNotFeatureSettingException e) { |
|
51 |
e.printStackTrace(); |
|
52 |
} |
|
48 | 53 |
}else if (attributeType.equals(IFeatureAttributeDescriptor.TYPE_DATE)){ |
49 | 54 |
try { |
50 | 55 |
set(i,type.getDateFormat().parse((String)defaultValue)); |
... | ... | |
93 | 98 |
// TODO Auto-generated method stub |
94 | 99 |
return null; |
95 | 100 |
} |
96 |
|
|
97 | 101 |
} |
Also available in: Unified diff