public class TripleRelation extends NodeRelation
Relation to a
database, and applying NodeMakers for subject, predicate and object
to each result row. This is implemented as a stateless wrapper around a
NodeRelation.| Modifier and Type | Field and Description |
|---|---|
static Var |
OBJECT |
static Var |
PREDICATE |
static Var |
SUBJECT |
TRUE| Constructor and Description |
|---|
TripleRelation(Relation baseRelation,
NodeMaker subjectMaker,
NodeMaker predicateMaker,
NodeMaker objectMaker) |
| Modifier and Type | Method and Description |
|---|---|
TripleRelation |
limit(int limit) |
TripleRelation |
orderBy(Var variable,
boolean ascending) |
TripleRelation |
selectTriple(Triple t) |
TripleRelation |
selectWithVariables(Triple t)
Creates a
NodeRelation by applying a triple pattern
to the TripleRelation. |
baseRelation, empty, extendWith, nodeMaker, renameSingleRelation, select, toString, variables, withPrefixpublic static final Var SUBJECT
public static final Var PREDICATE
public static final Var OBJECT
public TripleRelation orderBy(Var variable, boolean ascending)
orderBy in class NodeRelationpublic TripleRelation limit(int limit)
limit in class NodeRelationpublic TripleRelation selectTriple(Triple t)
public TripleRelation selectWithVariables(Triple t)
NodeRelation by applying a triple pattern
to the TripleRelation. If the triple contains variables, then
the variables will be bound to the corresponding values
in the resulting NodeRelation. Node.ANY will be
converted to a variable "subject", "predicate", "object"
depending on its position in the triple pattern.
For example, selecting (?x :name ?name) would produce a
NodeRelation with ?x bound to the subjects and ?name bound to the
objects of this TripleRelation.
TODO This is never called at the moment. Why!?t - A triple pattern involving variables