public class RDFReactorRuntime extends Object
Constructor and Description |
---|
RDFReactorRuntime() |
Modifier and Type | Method and Description |
---|---|
static Resource |
genericResource2RDF2Goresource(Model model,
Resource o)
Work around a nasty issue in openrdf RepositoryModel: One cannot add a
generic Resource to anything It must specifically either be a BlankNode
OR a URI.
|
static INodeConverter<?> |
getConverter(Class<?> type) |
static Node |
java2node(Model model,
Object reactorValue) |
static Object |
node2javatype(Model model,
Node n,
Class<?> returnType)
Convert RDF entities to ReactorBaseNamed and primitive java values.
|
static void |
registerConverter(Class<?> type,
INodeConverter<?> converter) |
static Object |
resource2reactorbase(Model model,
Node node,
Class<?> targetType)
Convert an RDF2Go resource to the target type, which must be a subclass
of ReactorBase.
|
public static void registerConverter(Class<?> type, INodeConverter<?> converter)
public static INodeConverter<?> getConverter(Class<?> type)
public static Object node2javatype(Model model, Node n, Class<?> returnType) throws ModelRuntimeException
model
- - the underlying RDF2Go modeln
- - convert this object. type may be: URI, BlankNode,
LanguageTagLiteral, DatatypeLiteral, StringreturnType
- - n is converted to this type, if it implements the
needed constructorModelRuntimeException
public static Object resource2reactorbase(Model model, Node node, Class<?> targetType)
model
- - the underlying RDF2Go modelnode
- - convert this object, can be a URI or a BlankNodetargetType
- - used to find constructor for creating the returned
object. has to implement the following constructor c: public static Resource genericResource2RDF2Goresource(Model model, Resource o)
model
- o
- Copyright © 2005–2019 IT-Consulting Dr. Max Völkel | Project started at FZI Forschungszentrum Informatik, www.fzi.de. All rights reserved.