public class ScanRecognizerSyntaxTreeAssembler extends DefaultBinaryExprTreeAssembler
visits
(traverses) the given predicate expression syntax tree depth-first using an
adapted shunting-yard algorithm and assembles a resulting binary tree
structure with expression nodes specific for detecting i.e. recognizing one
or more partial, fuzzy and other
and other scan constructs. These are collected within the specific evaluation
context passed to the assembled syntax tree.
The adapted shunting-yard algorithm in general uses a stack of operators and operands, and as new binary tree nodes are detected and created they are pushed onto the operand stack based on operator precedence. The resulting binary expression tree reflects the syntax of the underlying query expression including the precedence of its operators.
ExprAssembler,
DefaultBinaryExprTreeAssembler,
ScanRecognizerContext| Modifier and Type | Field and Description |
|---|---|
protected DataGraphMapping |
graphConfig |
protected StoreMappingContext |
mappingContext |
contextExpression, contextProperty, contextQueryProperty, contextType, predicates, rootType| Constructor and Description |
|---|
ScanRecognizerSyntaxTreeAssembler(org.plasma.query.model.Where predicate,
org.plasma.sdo.PlasmaType rootType,
StoreMappingContext mappingContext)
Constructs an assembler based on the given predicate data graph
configuration and graph root type.
|
| Modifier and Type | Method and Description |
|---|---|
LogicalBinaryExpr |
createLogicalBinaryExpr(Expr left,
Expr right,
org.plasma.query.model.LogicalOperator operator)
Creates and returns a logical binary expression based on the given terms
and logical operator.
|
RelationalBinaryExpr |
createRelationalBinaryExpr(org.plasma.query.model.Property property,
org.plasma.query.model.Literal literal,
org.plasma.query.model.RelationalOperator operator)
Creates and returns a relational binary expression based on the given terms
and relational operator.
|
createPredicateBinaryExpr, end, end, getResult, log, serialize, traversegetChildExpressionCount, getChildExpressions, getLogicalOperatorCount, hasChildExpressions, hasWildcardend, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, getContext, start, start, start, start, start, start, start, start, start, start, start, start, start, start, start, start, start, start, start, start, start, start, start, start, startprotected DataGraphMapping graphConfig
protected StoreMappingContext mappingContext
public ScanRecognizerSyntaxTreeAssembler(org.plasma.query.model.Where predicate,
org.plasma.sdo.PlasmaType rootType,
StoreMappingContext mappingContext)
predicate - the predicaterootType - the graph root typepublic RelationalBinaryExpr createRelationalBinaryExpr(org.plasma.query.model.Property property, org.plasma.query.model.Literal literal, org.plasma.query.model.RelationalOperator operator)
createRelationalBinaryExpr in interface ExprAssemblercreateRelationalBinaryExpr in class DefaultBinaryExprTreeAssemblerproperty - the property termliteral - the literal termoperator - the relational operatorpublic LogicalBinaryExpr createLogicalBinaryExpr(Expr left, Expr right, org.plasma.query.model.LogicalOperator operator)
createLogicalBinaryExpr in interface ExprAssemblercreateLogicalBinaryExpr in class DefaultBinaryExprTreeAssemblerproperty - the property termliteral - the literal termoperator - the logical operatorCopyright © 2021. All Rights Reserved.