Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.io.gml.internal.simpletype
Class SimpleTypeUtil

java.lang.Object
  extended by 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

Constructor Summary
SimpleTypeUtil()
           
 
Method Summary
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.
static
<T> String
convertToXml(T value, TypeDefinition type)
          Convert a simple type value to a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTypeUtil

public SimpleTypeUtil()
Method Detail

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 value
type - 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 value
type - the type definition
Returns:
null if the string was null, the converted object with the binding type if possible, otherwise the original string

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d