Revision 46419 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/dataprofile/DataProfileText.java
DataProfileText.java | ||
---|---|---|
20 | 20 |
} |
21 | 21 |
|
22 | 22 |
@Override |
23 |
public Object createData(Object data, Tags tags) { |
|
24 |
return Objects.toString(data, null); |
|
23 |
protected Object doCreateData(Object data, Tags tags) { |
|
24 |
try { |
|
25 |
return Objects.toString(data, null); |
|
26 |
} catch (Exception ex) { |
|
27 |
LOGGER.debug("Can't create text", ex); |
|
28 |
} |
|
29 |
return null; |
|
30 |
|
|
25 | 31 |
} |
26 | 32 |
|
27 | 33 |
@Override |
28 |
public Object coerce(DataType dataType, Object data, Tags tags) throws CoercionException {
|
|
34 |
protected Object doCoerce(DataType dataType, Object data, Tags tags) throws CoercionException {
|
|
29 | 35 |
String s = Objects.toString(data, null); |
30 | 36 |
if( s == null ) { |
31 | 37 |
return null; |
... | ... | |
34 | 40 |
data = dataType.coerce(s); |
35 | 41 |
return data; |
36 | 42 |
} catch(Exception ex) { |
37 |
throw new CoercionException("Can't convert String to "+dataType.getName(), ex);
|
|
43 |
LOGGER.debug("Can't coerce text", ex);
|
|
38 | 44 |
} |
45 |
return null; |
|
39 | 46 |
} |
40 | 47 |
|
41 | 48 |
public static void selfRegister() { |
Also available in: Unified diff