Class SparqlTupleExprRenderer
java.lang.Object
org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor<Exception>
org.eclipse.rdf4j.queryrender.BaseTupleExprRenderer
org.eclipse.rdf4j.queryrender.sparql.SparqlTupleExprRenderer
- All Implemented Interfaces:
QueryModelVisitor<Exception>
Extends the BaseTupleExprRenderer to provide support for rendering tuple expressions as SPARQL queries.
- Author:
- Michael Grove
-
Field Summary
Fields inherited from class BaseTupleExprRenderer
mDistinct, mExtensions, mLimit, mOffset, mOrdering, mProjection, mReducedModifier and TypeFieldDescriptionprotected booleanWhether or not the query is distinctA map of the extensions specified in the query.protected longThe limit of results for the query, or -1 for no limitprotected longThe query offset, or -1 for no offsetThe elements specified in the order by clause of the queryprotected List<ProjectionElemList> The list of elements include in the projection of the queryprotected booleanWhether or not the query is reduced -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidmeet(AggregateFunctionCall node) voidvoidmeet(ArbitraryLengthPath node) voidvoidvoidvoidmeet(Difference theOp) voidvoidmeet(ExtensionElem node) voidvoidmeet(FunctionCall node) voidvoidvoidmeet(Intersection theOp) voidmeet(IRIFunction node) voidvoidvoidvoidvoidvoidvoidmeet(LangMatches node) voidvoidvoidvoidvoidmeet(StatementPattern thePattern) voidvoidvoidmeet(ValueConstant node) voidRender the TupleExpr as a query or query fragment depending on what kind of TupleExpr it isprotected StringrenderValueExpr(ValueExpr theExpr) Render the given ValueExprvoidreset()Reset the state of the rendererMethods inherited from class BaseTupleExprRenderer
getExtensions, getLimit, getOffset, getOrdering, getProjection, isDistinct, isReduced, isSelect, isSPOElemList, meet, meet, meet, meet, meet, render, scrubVarName, toStatementPatternModifier and TypeMethodDescriptionlonggetLimit()longbooleanbooleanprotected booleanisSelect()Returns whether or not the results of scanning the query model indicates that this represents a select querystatic booleanisSPOElemList(ProjectionElemList theList) Return whether or not this projection looks like an spo binding for a construct queryvoidvoidvoidmeet(ProjectionElemList theProjectionElemList) voidvoidrender(ParsedQuery theQuery) Render the ParsedQuery as a query stringstatic StringscrubVarName(String theName) Scrub any illegal characters out of the variable nametoStatementPattern(ProjectionElemList theList) Turn a ProjectionElemList for a construct query projection (three elements aliased as 'subject', 'predicate' and 'object' in that order) into a StatementPattern.Methods inherited from class 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, meetBinaryTupleOperator, meetBinaryValueOperator, meetCompareSubQueryValueOperator, meetNAryValueOperator, meetNode, meetOther, meetSubQueryValueOperator, meetUnaryTupleOperator, meetUnaryValueOperator, meetUpdateExprModifier and TypeMethodDescriptionvoidvoidvoidmeet(BindingSetAssignment node) voidmeet(BNodeGenerator node) voidvoidvoidmeet(CompareAll node) voidmeet(CompareAny node) voidvoidvoidvoidmeet(DeleteData node) voidmeet(DescribeOperator node) voidvoidvoidvoidmeet(GroupConcat node) voidvoidmeet(InsertData node) voidmeet(IsResource node) voidvoidmeet(ListMemberOperator node) voidvoidvoidvoidvoidvoidvoidvoidmeet(MultiProjection node) voidvoidvoidvoidmeet(Projection node) voidmeet(ProjectionElem node) voidvoidvoidvoidmeet(SingletonSet node) voidvoidvoidmeet(ValueExprTripleRef node) voidmeet(ZeroLengthPath node) protected voidMethod called by all meet methods with aBinaryTupleOperatornode as argument.protected voidMethod called by all meet methods with aBinaryValueOperatornode as argument.protected voidMethod called by all meet methods with aCompareSubQueryValueOperatornode as argument.protected voidMethod called by all meet methods with aNAryValueOperatornode as argument.protected voidmeetNode(QueryModelNode node) Method called by all of the other meet methods that are not overridden in subclasses.voidmeetOther(QueryModelNode node) protected voidMethod called by all meet methods with aSubQueryValueOperatornode as argument.protected voidMethod called by all meet methods with aUnaryTupleOperatornode as argument.protected voidMethod called by all meet methods with aUnaryValueOperatornode as argument.protected voidmeetUpdateExpr(UpdateExpr node) Method called by all meet methods with aUpdateExprnode as argument.
-
Constructor Details
-
SparqlTupleExprRenderer
public SparqlTupleExprRenderer()
-
-
Method Details
-
reset
-
render
Render the TupleExpr as a query or query fragment depending on what kind of TupleExpr it is- Specified by:
renderin classBaseTupleExprRenderer- Parameters:
theExpr- the expression to render- Returns:
- the TupleExpr rendered in the query language syntax
- Throws:
Exception- if there is an error while rendering
-
renderValueExpr
Render the given ValueExpr- Specified by:
renderValueExprin classBaseTupleExprRenderer- Parameters:
theExpr- the expr to render- Returns:
- the rendered expression
- Throws:
Exception- if there is an error while rendering
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classBaseTupleExprRenderer- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classBaseTupleExprRenderer- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>
-