public class PathSelector<Node> extends Object implements NodeSelector<Node>
Constructor and Description |
---|
PathSelector(NodeSelector<Node> left,
NodeSelector<Node> right) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getName(NodeBackend<Node> nodeRDFBackend)
Return a name for this selector to be used as the name for the whole path if not explicitly
specified.
|
String |
getPathExpression(NodeBackend<Node> backend)
Return the representation of the NodeFunction or NodeSelector in the RDF Path Language
|
int |
hashCode() |
Collection<Node> |
select(RDFBackend<Node> rdfBackend,
Node context,
List<Node> path,
Map<Node,List<Node>> resultPaths)
Apply the selector to the context node passed as argument and return the collection
of selected nodes in appropriate order.
|
public PathSelector(NodeSelector<Node> left, NodeSelector<Node> right)
public Collection<Node> select(RDFBackend<Node> rdfBackend, Node context, List<Node> path, Map<Node,List<Node>> resultPaths)
select
in interface NodeSelector<Node>
context
- the node where to start the selectionpath
- the path leading to and including the context node in the current evaluation of LDPath; may be null,
in which case path tracking is disabledresultPaths
- a map where each of the result nodes maps to a path leading to the result node in the LDPath evaluation;
if null, path tracking is disabled and the path argument is ignoredpublic String getPathExpression(NodeBackend<Node> backend)
LDPathConstruct
getPathExpression
in interface LDPathConstruct<Node>
public String getName(NodeBackend<Node> nodeRDFBackend)
getName
in interface NodeSelector<Node>
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.