eu.esdihumboldt.hale.io.gml.internal.simpletype
Class SimpleTypeUtil
java.lang.Object
eu.esdihumboldt.hale.io.gml.internal.simpletype.SimpleTypeUtil
public class SimpleTypeUtil
- extends Object
Utility methods used for simple type conversion
- Author:
- Simon Templer
- Partner:
- 01 / Fraunhofer Institute for Computer Graphics Research
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleTypeUtil
public SimpleTypeUtil()
convertToXml
public static <T> String convertToXml(T value,
TypeDefinition type)
- Convert a simple type value to a string
- Type Parameters:
T
- the type of the value- Parameters:
value
- the valuetype
- the type definition of the simple type
- Returns:
- the string representation of the value or
null
if
the value is null
convertFromXml
public static Object convertFromXml(String value,
TypeDefinition type)
- Convert a string belonging to a XML simple type to the binding specified
by the given type definition.
- Parameters:
value
- the string valuetype
- the type definition
- Returns:
null
if the string was null
, the
converted object with the binding type if possible, otherwise the
original string
Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d