net.java.rdf.sommer
Class JavaInstanceMapper
java.lang.Object
net.java.rdf.sommer.JavaInstanceMapper
public abstract class JavaInstanceMapper
- extends java.lang.Object
a class whose instances specialise in mapping particular java objects to rdf objects, such as Literals or Resources.
This is needed since many java objects cannot be annotated. It makes the framework more flexible.
- Author:
- Henry Story
Method Summary |
protected RDFFactory |
getFactory()
|
(package private) java.lang.Class |
getObjClass()
|
(package private) abstract java.lang.Object |
java2rdf(java.lang.Object litObj)
Abstract methods that knows how to turn a java object into a rdf equivalent. |
(package private) abstract java.lang.Object |
rdf2java(java.lang.Object rdfObj)
Abstract methods that knows how to turn an rdf object into a java equivalent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
slf
RDFFactory slf
clazz
private java.lang.Class clazz
JavaInstanceMapper
JavaInstanceMapper(RDFFactory slf,
java.lang.Class clazz)
getFactory
protected RDFFactory getFactory()
getObjClass
final java.lang.Class getObjClass()
java2rdf
abstract java.lang.Object java2rdf(java.lang.Object litObj)
- Abstract methods that knows how to turn a java object into a rdf equivalent.
This methods has to call the interface RDFFactory.createLiteral(...) methods
to return a literal of the correct type for the background framework in question .
- Parameters:
litObj
- an plain object that is mapped to a literal
- Returns:
- a Literal in the object model of the implementing framework.
rdf2java
abstract java.lang.Object rdf2java(java.lang.Object rdfObj)
- Abstract methods that knows how to turn an rdf object into a java equivalent.
This methods has to call the interface RDFFactory.createLiteral(...) methods
to return a literal of the correct type for the background framework in question .
- Parameters:
rdfObj
- an plain object that is mapped to a literal
- Returns:
- a Literal in the object model of the implementing framework.