public class MatchAlgorithmCompiler extends Object implements IMatchAlgorithmCompiler
| Modifier and Type | Field and Description |
|---|---|
protected static List<ColumnDefinition> |
MATCH_COLUMN_DEFINITION |
static String |
NAMES |
static String |
OPERATION |
static String |
VALUES |
| Constructor and Description |
|---|
MatchAlgorithmCompiler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assignExecutor(ColumnMatch columnMatch) |
protected MatchNode |
buildTree(List<TableRow> rows,
MatchNode[] nodes)
Builds tree based on indentation of each row.
|
protected void |
checkRowName(TableRow row,
String expectedName) |
protected void |
checkSpecialRows(ColumnMatch columnMatch) |
void |
compile(IBindingContext bindingContext,
ColumnMatch columnMatch) |
protected List<ColumnDefinition> |
getColumnDefinition() |
protected int |
getSpecialRowCount() |
protected void |
parseCheckValues(IBindingContext bindingContext,
ColumnMatch columnMatch,
TableRow row,
MatchNode node,
int retValuesCount)
Parses CheckValues for node(row).
|
protected void |
parseSpecialRows(IBindingContext bindingContext,
ColumnMatch columnMatch)
Compiles (parses) return values based on return type.
|
protected Object[] |
parseValues(IBindingContext bindingContext,
ColumnMatch columnMatch,
TableRow row,
IOpenClass openClass) |
protected MatchNode[] |
prepareNodes(IBindingContext bindingContext,
ColumnMatch columnMatch,
ArgumentsHelper argumentsHelper,
int retValuesCount)
Prepares Nodes.
|
protected void |
setMetaInfoForConstant(IBindingContext bindingContext,
ColumnMatch columnMatch,
SubValue sv,
String s,
ConstantOpenField constantOpenField) |
protected void |
validateTree(MatchNode rootNode,
List<TableRow> rows,
MatchNode[] nodes)
Checks that tree is consistent.
|
public static final String NAMES
public static final String OPERATION
public static final String VALUES
protected static final List<ColumnDefinition> MATCH_COLUMN_DEFINITION
protected void assignExecutor(ColumnMatch columnMatch)
protected MatchNode buildTree(List<TableRow> rows, MatchNode[] nodes) throws SyntaxNodeException
nodes - (special rows must be null)SyntaxNodeExceptionprotected void checkRowName(TableRow row, String expectedName) throws SyntaxNodeException
SyntaxNodeExceptionprotected void checkSpecialRows(ColumnMatch columnMatch) throws SyntaxNodeException
SyntaxNodeExceptionpublic void compile(IBindingContext bindingContext, ColumnMatch columnMatch) throws SyntaxNodeException
compile in interface IMatchAlgorithmCompilerSyntaxNodeExceptionprotected List<ColumnDefinition> getColumnDefinition()
protected int getSpecialRowCount()
protected void parseCheckValues(IBindingContext bindingContext, ColumnMatch columnMatch, TableRow row, MatchNode node, int retValuesCount)
protected void parseSpecialRows(IBindingContext bindingContext, ColumnMatch columnMatch) throws SyntaxNodeException
SyntaxNodeExceptionprotected Object[] parseValues(IBindingContext bindingContext, ColumnMatch columnMatch, TableRow row, IOpenClass openClass) throws SyntaxNodeException
SyntaxNodeExceptionprotected void setMetaInfoForConstant(IBindingContext bindingContext, ColumnMatch columnMatch, SubValue sv, String s, ConstantOpenField constantOpenField)
protected MatchNode[] prepareNodes(IBindingContext bindingContext, ColumnMatch columnMatch, ArgumentsHelper argumentsHelper, int retValuesCount) throws SyntaxNodeException
Special rows are ignored. That is why first n elements in return array is always null.
SyntaxNodeExceptionprotected void validateTree(MatchNode rootNode, List<TableRow> rows, MatchNode[] nodes) throws SyntaxNodeException
rootNode - root of treerows - rows to point out errorsSyntaxNodeExceptionCopyright © 2004–2019 OpenL Tablets. All rights reserved.