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
ValueExprinto SPARQL syntax.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringBuffermBufferThe current rendered value
-
Constructor Summary
Constructors Constructor Description SparqlValueExprRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidbinaryMeet(java.lang.String theOpStr, BinaryValueOperator theOp)private java.lang.StringknownFunctionsUriReduction(java.lang.String functionUri)voidmeet(And theAnd)voidmeet(BNodeGenerator theGen)voidmeet(Bound theOp)voidmeet(Compare theOp)voidmeet(CompareAll theOp)voidmeet(CompareAny theOp)voidmeet(Count theOp)voidmeet(Datatype theOp)voidmeet(Exists theOp)voidmeet(FunctionCall theOp)voidmeet(In theOp)voidmeet(IRIFunction theOp)voidmeet(IsBNode theOp)voidmeet(IsLiteral theOp)voidmeet(IsNumeric theOp)voidmeet(IsResource theOp)voidmeet(IsURI theOp)voidmeet(Label theOp)voidmeet(Lang theOp)voidmeet(LangMatches theOp)voidmeet(LocalName theOp)voidmeet(MathExpr theOp)voidmeet(Max theOp)voidmeet(Min theOp)voidmeet(Namespace theOp)voidmeet(Not theNot)voidmeet(Or theOr)voidmeet(Regex theOp)voidmeet(SameTerm theOp)voidmeet(Str theOp)voidmeet(ValueConstant theVal)voidmeet(Var theVar)java.lang.Stringrender(ValueExpr theExpr)Return the rendering of the ValueExpr objectprivate java.lang.StringrenderTupleExpr(TupleExpr theExpr)Renders the tuple expression as a query string.voidreset()Reset the state of this rendererprivate voidunaryMeet(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:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Var theVar) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(BNodeGenerator theGen) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(MathExpr theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Compare theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Exists theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(In theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin 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:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(ValueConstant theVal) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(FunctionCall theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(CompareAny theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Regex theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(LangMatches theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(SameTerm theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(And theAnd) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Or theOr) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Not theNot) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Count theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Datatype theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(IsBNode theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(IsLiteral theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(IsNumeric theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(IsResource theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(IsURI theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(IRIFunction theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Label theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Lang theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(LocalName theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Min theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Max theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Namespace theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin classAbstractQueryModelVisitor<java.lang.Exception>- Throws:
java.lang.Exception
-
meet
public void meet(Str theOp) throws java.lang.Exception
- Specified by:
meetin interfaceQueryModelVisitor<java.lang.Exception>- Overrides:
meetin 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)
-
-