Package org.aksw.jenax.arq.util.triple
Interface TripleConstraint
- All Superinterfaces:
Predicate<org.apache.jena.graph.Triple>
- All Known Implementing Classes:
TripleConstraintImpl
This class captures a single triple pattern with a filter expression
which in algebraic terms corresponds to OpFilter(OpTriple(?s ?p ?o), expr).
The expression may only refer to variables mentioned in the pattern.
The pattern may make use of variables and concrete rdf terms. Hence, semantically equivalent constraints
can be expressed in different ways - e.g. { ?s ?p ?o . FILTER (?p = CONST) } == { ?s CONST ?o }
This class can act as a predicate that can be evaluated for given individual
(concrete) triples.
The sparql expression allows obtaining the set of matching triples
for any a local or remote RDF graph.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.jena.sparql.expr.ExprgetExpr()An expression which only allows a subset of the variables ?s ?p and ?oorg.apache.jena.graph.TripleA possibly (less selective) representation of the constraint as a match triple suitable for pre-filtering usingGraph.find(Triple)Must never return null.booleanTrue ifgetMatchTriple()matches the same set of triples asgetExpr().
-
Method Details
-
getMatchTriple
org.apache.jena.graph.Triple getMatchTriple()A possibly (less selective) representation of the constraint as a match triple suitable for pre-filtering usingGraph.find(Triple)Must never return null. The most unselective triple pattern is Triple.createMatch(null, null, null).- Returns:
-
isMatchTripleExhaustive
boolean isMatchTripleExhaustive()True ifgetMatchTriple()matches the same set of triples asgetExpr(). -
getExpr
org.apache.jena.sparql.expr.Expr getExpr()An expression which only allows a subset of the variables ?s ?p and ?o
-