public abstract class BaseTupleExprRenderer extends AbstractQueryModelVisitor<Exception>
Base class for rendering RDF4J query API objects into strings.
| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | mDistinctWhether or not the query is distinct | 
| protected Map<String,ValueExpr> | mExtensionsA map of the extensions specified in the query. | 
| protected long | mLimitThe limit of results for the query, or -1 for no limit | 
| protected long | mOffsetThe query offset, or -1 for no offset | 
| protected List<OrderElem> | mOrderingThe elements specified in the order by clause of the query | 
| protected List<ProjectionElemList> | mProjectionThe list of elements include in the projection of the query | 
| protected boolean | mReducedWhether or not the query is reduced | 
| Constructor and Description | 
|---|
| BaseTupleExprRenderer() | 
| Modifier and Type | Method and Description | 
|---|---|
| Map<String,ValueExpr> | getExtensions() | 
| long | getLimit() | 
| long | getOffset() | 
| List<OrderElem> | getOrdering() | 
| List<ProjectionElemList> | getProjection() | 
| boolean | isDistinct() | 
| boolean | isReduced() | 
| protected boolean | isSelect()Returns whether or not the results of scanning the query model indicates that this represents a select query | 
| static boolean | isSPOElemList(ProjectionElemList theList)Return whether or not this projection looks like an spo binding for a construct query | 
| void | meet(Distinct theDistinct) | 
| void | meet(ExtensionElem theExtensionElem) | 
| void | meet(OrderElem theOrderElem) | 
| void | meet(ProjectionElemList theProjectionElemList) | 
| void | meet(Reduced theReduced) | 
| void | meet(Slice theSlice) | 
| void | meet(StatementPattern theStatementPattern) | 
| String | render(ParsedQuery theQuery)Render the ParsedQuery as a query string | 
| abstract String | render(TupleExpr theExpr)Render the TupleExpr as a query or query fragment depending on what kind of TupleExpr it is | 
| protected abstract String | renderValueExpr(ValueExpr theExpr)Render the given ValueExpr | 
| void | reset()Reset the state of the renderer | 
| static String | scrubVarName(String theName)Scrub any illegal characters out of the variable name | 
| StatementPattern | toStatementPattern(ProjectionElemList theList)Turn a ProjectionElemList for a construct query projection (three elements aliased as 'subject', 'predicate' and
 'object' in that order) into a StatementPattern. | 
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, 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, meetUpdateExprprotected Map<String,ValueExpr> mExtensions
protected List<ProjectionElemList> mProjection
protected List<OrderElem> mOrdering
protected boolean mDistinct
protected boolean mReduced
protected long mLimit
protected long mOffset
public void reset()
public List<ProjectionElemList> getProjection()
public boolean isDistinct()
public boolean isReduced()
public long getLimit()
public long getOffset()
public String render(ParsedQuery theQuery) throws Exception
theQuery - the parsed query to renderException - if there is an error while renderingpublic abstract String render(TupleExpr theExpr) throws Exception
theExpr - the expression to renderException - if there is an error while renderingprotected abstract String renderValueExpr(ValueExpr theExpr) throws Exception
theExpr - the expr to renderException - if there is an error while renderingpublic StatementPattern toStatementPattern(ProjectionElemList theList) throws Exception
theList - the elem list to renderException - if there is an exception while renderingpublic static String scrubVarName(String theName)
theName - the potential variable nameprotected boolean isSelect()
public static boolean isSPOElemList(ProjectionElemList theList)
theList - the projection element list to inspectpublic void meet(StatementPattern theStatementPattern) throws Exception
meet in interface QueryModelVisitor<Exception>meet in class AbstractQueryModelVisitor<Exception>Exceptionpublic void meet(Slice theSlice) throws Exception
meet in interface QueryModelVisitor<Exception>meet in class AbstractQueryModelVisitor<Exception>Exceptionpublic void meet(ExtensionElem theExtensionElem) throws Exception
meet in interface QueryModelVisitor<Exception>meet in class AbstractQueryModelVisitor<Exception>Exceptionpublic void meet(ProjectionElemList theProjectionElemList) throws Exception
meet in interface QueryModelVisitor<Exception>meet in class AbstractQueryModelVisitor<Exception>Exceptionpublic void meet(OrderElem theOrderElem) throws Exception
meet in interface QueryModelVisitor<Exception>meet in class AbstractQueryModelVisitor<Exception>Exceptionpublic void meet(Distinct theDistinct) throws Exception
meet in interface QueryModelVisitor<Exception>meet in class AbstractQueryModelVisitor<Exception>Exceptionpublic void meet(Reduced theReduced) throws Exception
meet in interface QueryModelVisitor<Exception>meet in class AbstractQueryModelVisitor<Exception>ExceptionCopyright © 2015-2020 Eclipse Foundation. All Rights Reserved.