svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / main / java / org / gvsig / fmap / dal / DataTypeUtils.java @ 46277
History | View | Annotate | Download (796 Bytes)
1 |
package org.gvsig.fmap.dal; |
---|---|
2 |
|
3 |
import org.cresques.cts.IProjection; |
4 |
import org.gvsig.fmap.geom.Geometry; |
5 |
import org.gvsig.timesupport.Interval; |
6 |
import static org.gvsig.tools.dataTypes.DataTypeUtils.coerce; |
7 |
|
8 |
/**
|
9 |
*
|
10 |
* @author jjdelcerro
|
11 |
*/
|
12 |
public class DataTypeUtils extends org.gvsig.tools.dataTypes.DataTypeUtils { |
13 |
|
14 |
public static IProjection toProjection(Object value, String defaultValue) { |
15 |
return (IProjection) coerce(DataTypes.CRS, value, defaultValue);
|
16 |
} |
17 |
|
18 |
public static Interval toInterval(Object value, String defaultValue) { |
19 |
return (Interval) coerce(DataTypes.INTERVAL, value, defaultValue);
|
20 |
} |
21 |
|
22 |
public static Geometry toGeometry(Object value, String defaultValue) { |
23 |
return (Geometry) coerce(DataTypes.GEOMETRY, value, defaultValue);
|
24 |
} |
25 |
|
26 |
} |