org.openanzo.glitter.rdf.datatype
Class TypedValueMapper

java.lang.Object
  extended by org.openanzo.glitter.rdf.datatype.TypedValueMapper

public final class TypedValueMapper
extends java.lang.Object

The typed value mapper uses a series of ITypeMaps to convert between lexical forms of literal values and native Java values.

Author:
Lee

Constructor Summary
TypedValueMapper()
           
 
Method Summary
static java.lang.String getLexicalValue(java.lang.Object o)
          Returns the lexical form of the given native value, as informed by the type of the value.
static java.lang.Object getNativeObject(java.lang.String value, java.net.URI datatype)
          Converts the lexical form of a value to a native Java value using the given XML schema type to inform the conversion.
static java.net.URI getXSDatatype(java.lang.Object o)
          Get the XML Schema type corresponding to the class of the native Java object given
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypedValueMapper

public TypedValueMapper()
Method Detail

getNativeObject

public static java.lang.Object getNativeObject(java.lang.String value,
                                               java.net.URI datatype)
Converts the lexical form of a value to a native Java value using the given XML schema type to inform the conversion.

Parameters:
value - value to convert
datatype - XML schema type of value
Returns:
the native object value for the given XML schema type

getLexicalValue

public static java.lang.String getLexicalValue(java.lang.Object o)
Returns the lexical form of the given native value, as informed by the type of the value.

Parameters:
o - native object to convert
Returns:
the lexical form of the given native value

getXSDatatype

public static java.net.URI getXSDatatype(java.lang.Object o)
Get the XML Schema type corresponding to the class of the native Java object given

Parameters:
o - datatype to convert
Returns:
The XML Schema type corresponding to the class of the native Java object given


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.