public interface LDPathService
Modifier and Type | Method and Description |
---|---|
Set<SelectorFunction<org.openrdf.model.Value>> |
getFunctions()
List all selector functions that are currently registered with LDPath.
|
Set<String> |
getTransformableTypes()
List all types that have a transformer registered.
|
Collection<org.openrdf.model.Value> |
pathQuery(org.openrdf.model.Value context,
String path,
Map<String,String> namespaces)
Run a path query starting from the given context node and return the result as a collection of KiWiNodes.
|
Map<org.openrdf.model.Value,Map<String,Collection<?>>> |
programQuery(String program)
Run a path program over all resources in the triplestore matching the program's filter and return the result for
each respurce.
|
Map<String,Collection<?>> |
programQuery(org.openrdf.model.Value context,
String program)
Run a path program starting from the given context node and return the result as a collection of KiWiNodes for
each field occurring in the path progrm.
|
void |
registerFunction(SelectorFunction<org.openrdf.model.Value> function)
Register an LDPath function in this LDPath service.
|
void |
registerTransformer(String typeUri,
NodeTransformer<?,org.openrdf.model.Value> transformer)
Register a result transformer for a type URI.
|
void registerFunction(SelectorFunction<org.openrdf.model.Value> function)
function
- SelectorFunction
to register.Set<SelectorFunction<org.openrdf.model.Value>> getFunctions()
Collection<org.openrdf.model.Value> pathQuery(org.openrdf.model.Value context, String path, Map<String,String> namespaces) throws LDPathParseException
context
- the context node where to start with the path querypath
- the path query to evaluate starting from the context nodenamespaces
- optional map from namespace prefixes to namespace URIsLDPathParseException
- when the path passed as argument could not be parsedMap<String,Collection<?>> programQuery(org.openrdf.model.Value context, String program) throws LDPathParseException
context
- the context node where to start with the path queryprogram
- the path program to evaluate starting from the context nodeLDPathParseException
- when the path passed as argument could not be parsedMap<org.openrdf.model.Value,Map<String,Collection<?>>> programQuery(String program) throws LDPathParseException
program
- LDPathParseException
void registerTransformer(String typeUri, NodeTransformer<?,org.openrdf.model.Value> transformer)
typeUri
- a URI identifying the type for which to use this transformer; can be specified
in path programstransformer
- instance of a node transformerCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.