org.openrdf.repository.object.managers.converters
Class ValueOfMarshall<T>

java.lang.Object
  extended by org.openrdf.repository.object.managers.converters.ValueOfMarshall<T>
All Implemented Interfaces:
Marshall<T>

public class ValueOfMarshall<T>
extends Object
implements Marshall<T>

Converts objects with a valueOf method to and from Literal.

Author:
James Leigh

Constructor Summary
ValueOfMarshall(ValueFactory vf, Class<T> type)
           
 
Method Summary
 T deserialize(Literal literal)
           
 URI getDatatype()
           
 String getJavaClassName()
           
 Literal serialize(T object)
           
 void setDatatype(URI datatype)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueOfMarshall

public ValueOfMarshall(ValueFactory vf,
                       Class<T> type)
                throws NoSuchMethodException
Throws:
NoSuchMethodException
Method Detail

getJavaClassName

public String getJavaClassName()
Specified by:
getJavaClassName in interface Marshall<T>

getDatatype

public URI getDatatype()
Specified by:
getDatatype in interface Marshall<T>

setDatatype

public void setDatatype(URI datatype)
Specified by:
setDatatype in interface Marshall<T>

deserialize

public T deserialize(Literal literal)
Specified by:
deserialize in interface Marshall<T>

serialize

public Literal serialize(T object)
Specified by:
serialize in interface Marshall<T>


Copyright © 2004-2011 James Leigh Services Inc.. All Rights Reserved.