Class SparqlValueExprRenderer
- java.lang.Object
-
- org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor<java.lang.Exception>
-
- org.eclipse.rdf4j.queryrender.sparql.SparqlValueExprRenderer
-
- All Implemented Interfaces:
QueryModelVisitor<java.lang.Exception>
final class SparqlValueExprRenderer extends AbstractQueryModelVisitor<java.lang.Exception>
Renders a
ValueExpr
into SPARQL syntax.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringBuffer
mBuffer
The current rendered value
-
Constructor Summary
Constructors Constructor Description SparqlValueExprRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
binaryMeet(java.lang.String theOpStr, BinaryValueOperator theOp)
private java.lang.String
knownFunctionsUriReduction(java.lang.String functionUri)
void
meet(And theAnd)
void
meet(BNodeGenerator theGen)
void
meet(Bound theOp)
void
meet(Compare theOp)
void
meet(CompareAll theOp)
void
meet(CompareAny theOp)
void
meet(Count theOp)
void
meet(Datatype theOp)
void
meet(Exists theOp)
void
meet(FunctionCall theOp)
void
meet(In theOp)
void
meet(IRIFunction theOp)
void
meet(IsBNode theOp)
void
meet(IsLiteral theOp)
void
meet(IsNumeric theOp)
void
meet(IsResource theOp)
void
meet(IsURI theOp)
void
meet(Label theOp)
void
meet(Lang theOp)
void
meet(LangMatches theOp)
void
meet(LocalName theOp)
void
meet(MathExpr theOp)
void
meet(Max theOp)
void
meet(Min theOp)
void
meet(Namespace theOp)
void
meet(Not theNot)
void
meet(Or theOr)
void
meet(Regex theOp)
void
meet(SameTerm theOp)
void
meet(Str theOp)
void
meet(ValueConstant theVal)
void
meet(Var theVar)
java.lang.String
render(ValueExpr theExpr)
Return the rendering of the ValueExpr objectprivate java.lang.String
renderTupleExpr(TupleExpr theExpr)
Renders the tuple expression as a query string.void
reset()
Reset the state of this rendererprivate void
unaryMeet(java.lang.String theOpStr, UnaryValueOperator theOp)
-
Methods inherited from class org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor
meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meetBinaryTupleOperator, meetBinaryValueOperator, meetCompareSubQueryValueOperator, meetNAryValueOperator, meetNode, meetOther, meetSubQueryValueOperator, meetUnaryTupleOperator, meetUnaryValueOperator, meetUpdateExpr
-
-
-
-
Method Detail
-
reset
public void reset()
Reset the state of this renderer
-
render
public java.lang.String render(ValueExpr theExpr) throws java.lang.Exception
Return the rendering of the ValueExpr object- Parameters:
theExpr
- the expression to render- Returns:
- the rendering
- Throws:
java.lang.Exception
- if there is an error while rendering
-
meet
public void meet(Bound theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Var theVar) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(BNodeGenerator theGen) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(MathExpr theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Compare theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Exists theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(In theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
renderTupleExpr
private java.lang.String renderTupleExpr(TupleExpr theExpr) throws java.lang.Exception
Renders the tuple expression as a query string.- Parameters:
theExpr
- the expr to render- Returns:
- the rendered expression
- Throws:
java.lang.Exception
- if there is an error while rendering
-
meet
public void meet(CompareAll theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(ValueConstant theVal) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(FunctionCall theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(CompareAny theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Regex theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(LangMatches theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(SameTerm theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(And theAnd) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Or theOr) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Not theNot) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Count theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Datatype theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(IsBNode theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(IsLiteral theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(IsNumeric theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(IsResource theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(IsURI theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(IRIFunction theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Label theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Lang theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(LocalName theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Min theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Max theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Namespace theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
meet
public void meet(Str theOp) throws java.lang.Exception
- Specified by:
meet
in interfaceQueryModelVisitor<java.lang.Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<java.lang.Exception>
- Throws:
java.lang.Exception
-
binaryMeet
private void binaryMeet(java.lang.String theOpStr, BinaryValueOperator theOp) throws java.lang.Exception
- Throws:
java.lang.Exception
-
unaryMeet
private void unaryMeet(java.lang.String theOpStr, UnaryValueOperator theOp) throws java.lang.Exception
- Throws:
java.lang.Exception
-
knownFunctionsUriReduction
private java.lang.String knownFunctionsUriReduction(java.lang.String functionUri)
-
-