org.apache.clerezza.rdf.core.impl
Class SimpleLiteralFactory
java.lang.Object
org.apache.clerezza.rdf.core.LiteralFactory
org.apache.clerezza.rdf.core.impl.SimpleLiteralFactory
public class SimpleLiteralFactory
- extends LiteralFactory
An implementation of literal factory currently supporting only
byte[]/base64Binary and Java.util.Date/date
- Author:
- reto
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleLiteralFactory
public SimpleLiteralFactory()
createTypedLiteral
public TypedLiteral createTypedLiteral(Object value)
throws NoConvertorException
- Description copied from class:
LiteralFactory
- Create a typed literal for the specified object
- Specified by:
createTypedLiteral in class LiteralFactory
- Parameters:
value - the value of the literal to be created
- Returns:
- a TypedLiteral representing the value
- Throws:
NoConvertorException - thrown if value is of an invalid type
createObject
public <T> T createObject(Class<T> type,
TypedLiteral literal)
throws NoConvertorException,
InvalidLiteralTypeException
- Description copied from class:
LiteralFactory
- Converts a literal to an instance of the specified class
- Specified by:
createObject in class LiteralFactory
- Parameters:
type - the Class of the returned objectliteral - the literal to be converted
- Returns:
- a java object representing the value of the literal
- Throws:
NoConvertorException - thrown if type is unsupported
InvalidLiteralTypeException - if the literal type doesn't match the requested java type
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.