Class ODSLQuery
- All Implemented Interfaces:
com.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
,org.antlr.v4.runtime.tree.ParseTreeVisitor<com.google.gson.JsonElement>
- Direct Known Subclasses:
ODSLAggregation
public class ODSLQuery
extends com.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
-
Constructor Summary
Constructors Constructor Description ODSLQuery(OpenDSLVarVisitor variables)
-
Method Summary
Modifier and Type Method Description com.google.gson.JsonElement
createFilter(List<com.walkfares.odsl.grammar.OpenDSLParser.ConditionContext> logicCondition)
com.google.gson.JsonElement
createObjectFilter(List<com.walkfares.odsl.grammar.OpenDSLParser.ConditionContext> logicCondition)
com.google.gson.JsonElement
parse(String condition)
com.google.gson.JsonElement
visitAddingExpression(com.walkfares.odsl.grammar.OpenDSLParser.AddingExpressionContext ctx)
Visit a parse tree produced byOpenDSLParser.addingExpression()
.com.google.gson.JsonElement
visitArrayexpression(com.walkfares.odsl.grammar.OpenDSLParser.ArrayexpressionContext ctx)
Visit a parse tree produced byOpenDSLParser.arrayexpression()
.com.google.gson.JsonElement
visitArrayindex(com.walkfares.odsl.grammar.OpenDSLParser.ArrayindexContext ctx)
Visit a parse tree produced byOpenDSLParser.arrayindex()
.com.google.gson.JsonElement
visitCondition(com.walkfares.odsl.grammar.OpenDSLParser.ConditionContext ctx)
Visit a parse tree produced byOpenDSLParser.condition()
.com.google.gson.JsonElement
visitFunctioncall(com.walkfares.odsl.grammar.OpenDSLParser.FunctioncallContext ctx)
Visit a parse tree produced byOpenDSLParser.functioncall()
.com.google.gson.JsonElement
visitId(com.walkfares.odsl.grammar.OpenDSLParser.IdContext ctx)
Visit a parse tree produced byOpenDSLParser.id()
.com.google.gson.JsonElement
visitInteger(com.walkfares.odsl.grammar.OpenDSLParser.IntegerContext ctx)
Visit a parse tree produced byOpenDSLParser.integer()
.com.google.gson.JsonElement
visitJsonObject(com.walkfares.odsl.grammar.OpenDSLParser.JsonObjectContext ctx)
Visit a parse tree produced byOpenDSLParser.jsonObject()
.com.google.gson.JsonElement
visitMethod(com.walkfares.odsl.grammar.OpenDSLParser.MethodContext ctx)
Visit a parse tree produced byOpenDSLParser.method()
.com.google.gson.JsonElement
visitMultiplyExpression(com.walkfares.odsl.grammar.OpenDSLParser.MultiplyExpressionContext ctx)
Visit a parse tree produced byOpenDSLParser.multiplyExpression()
.com.google.gson.JsonElement
visitNumber(com.walkfares.odsl.grammar.OpenDSLParser.NumberContext ctx)
Visit a parse tree produced byOpenDSLParser.number()
.com.google.gson.JsonElement
visitRowexpression(com.walkfares.odsl.grammar.OpenDSLParser.RowexpressionContext ctx)
Visit a parse tree produced byOpenDSLParser.rowexpression()
.com.google.gson.JsonElement
visitSingularExpression(com.walkfares.odsl.grammar.OpenDSLParser.SingularExpressionContext ctx)
Visit a parse tree produced byOpenDSLParser.singularExpression()
.com.google.gson.JsonElement
visitString(com.walkfares.odsl.grammar.OpenDSLParser.StringContext ctx)
Visit a parse tree produced byOpenDSLParser.string()
.com.google.gson.JsonElement
visitTf(com.walkfares.odsl.grammar.OpenDSLParser.TfContext ctx)
Visit a parse tree produced byOpenDSLParser.tf()
.com.google.gson.JsonElement
visitUnevaluatedExpression(com.walkfares.odsl.grammar.OpenDSLParser.UnevaluatedExpressionContext ctx)
Visit a parse tree produced byOpenDSLParser.unevaluatedExpression()
.com.google.gson.JsonElement
visitVariable(com.walkfares.odsl.grammar.OpenDSLParser.VariableContext ctx)
Visit a parse tree produced byOpenDSLParser.variable()
.com.google.gson.JsonElement
visitVarname(com.walkfares.odsl.grammar.OpenDSLParser.VarnameContext ctx)
Visit a parse tree produced byOpenDSLParser.varname()
.Methods inherited from class com.walkfares.odsl.grammar.OpenDSLBaseVisitor
visitAbort, visitAction, visitActionExit, visitActionInput, visitActionOutput, visitActivevar, visitAddField, visitAggregate, visitAggregationOptions, visitAggregationPipeline, visitArray, visitArraycondition, visitArrayinitialiser, visitAssign, visitAssignee, visitAvservice, visitBucketOutput, visitComment, visitConditionalExpression, visitControl, visitCreateIndex, visitDate, visitDateexpression, visitDeclaredType, visitDelete, visitDeleteBulk, visitDynamicname, visitErrors, visitErrorText, visitExponentExpression, visitExpression, visitExpressionOrCondition, visitExtract, visitExtractCheck, visitExtractClick, visitExtractFill, visitExtractor, visitExtractParam, visitExtractSelect, visitFacetItem, visitFail, visitFind, visitFoldingrange, visitForeach, visitForstmt, visitFunction, visitFunctionbody, visitFunctionparam, visitGranularity, visitGroupAssign, visitIfstmt, visitImportscript, visitIndexcollation, visitIndexcollationitem, visitIndexfield, visitIndexoptions, visitIndexpartial, visitIndexttl, visitJsonElement, visitLink, visitLinkType, visitLog, visitLogout, visitMethodbody, visitMlVarname, visitNl, visitObjectDeclaration, visitObjectDefinition, visitPhase, visitPipelineAddFields, visitPipelineBucket, visitPipelineBucketauto, visitPipelineCount, visitPipelineDocuments, visitPipelineFacet, visitPipelineGeoNear, visitPipelineGraphLookup, visitPipelineGroup, visitPipelineItem, visitPipelineLimit, visitPipelineLookup, visitPipelineMatch, visitPipelineMerge, visitPipelineOperator, visitPipelineOut, visitPipelineProject, visitPipelineRedact, visitPipelineReplaceRoot, visitPipelineReplaceWith, visitPipelineSample, visitPipelineSkip, visitPipelineSort, visitPipelineSortByCount, visitPipelineUnwind, visitPprojectField, visitPrint, visitProject, visitProjectField, visitProperty, visitPublicvar, visitPublish, visitQualityCheck, visitQualityCheckProfile, visitQualityCheckProfileParams, visitQualityCheckWithChecks, visitRelationalExpression, visitRename, visitReschedule, visitReturnstmt, visitRun, visitSave, visitScalarvar, visitSend, visitSendmail, visitSet, visitSingleLineIfExpression, visitSingleLineIfStatement, visitSortItem, visitStart, visitStatement, visitTagstmt, visitThrowerror, visitTransform, visitTransformClear, visitTransformCreate, visitTransformer, visitTransformFor, visitTransformIf, visitTransformIgnore, visitTransformOptions, visitTransformUnique, visitTrigger, visitTypeBucket, visitTypeConstraint, visitTypeDeclaration, visitTypeDefinition, visitTypeEditor, visitTypeExpression, visitTypeMethod, visitTypeMethodParams, visitTypeProperty, visitTypeSmartData, visitUpdateBulk, visitUpdateOperator, visitUpdateOperatorParam, visitUse, visitVersion, visitWaitcmd, visitWhilestmt, visitWorkflow, visitWorkflowAction, visitWorkflowBody, visitWorkflowEvent, visitWorkflowGateway, visitWorkflowStart, visitWorkflowTransition, visitWorkflowWorkflow
Methods inherited from class org.antlr.v4.runtime.tree.AbstractParseTreeVisitor
visit, visitChildren, visitErrorNode, visitTerminal
-
Constructor Details
-
Method Details
-
parse
-
createFilter
public com.google.gson.JsonElement createFilter(List<com.walkfares.odsl.grammar.OpenDSLParser.ConditionContext> logicCondition) -
createObjectFilter
public com.google.gson.JsonElement createObjectFilter(List<com.walkfares.odsl.grammar.OpenDSLParser.ConditionContext> logicCondition) -
visitAddingExpression
public com.google.gson.JsonElement visitAddingExpression(com.walkfares.odsl.grammar.OpenDSLParser.AddingExpressionContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.addingExpression()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitAddingExpression
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitAddingExpression
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitMultiplyExpression
public com.google.gson.JsonElement visitMultiplyExpression(com.walkfares.odsl.grammar.OpenDSLParser.MultiplyExpressionContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.multiplyExpression()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitMultiplyExpression
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitMultiplyExpression
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitSingularExpression
public com.google.gson.JsonElement visitSingularExpression(com.walkfares.odsl.grammar.OpenDSLParser.SingularExpressionContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.singularExpression()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitSingularExpression
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitSingularExpression
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitCondition
public com.google.gson.JsonElement visitCondition(com.walkfares.odsl.grammar.OpenDSLParser.ConditionContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.condition()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitCondition
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitCondition
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitFunctioncall
public com.google.gson.JsonElement visitFunctioncall(com.walkfares.odsl.grammar.OpenDSLParser.FunctioncallContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.functioncall()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitFunctioncall
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitFunctioncall
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitUnevaluatedExpression
public com.google.gson.JsonElement visitUnevaluatedExpression(com.walkfares.odsl.grammar.OpenDSLParser.UnevaluatedExpressionContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.unevaluatedExpression()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitUnevaluatedExpression
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitUnevaluatedExpression
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitArrayexpression
public com.google.gson.JsonElement visitArrayexpression(com.walkfares.odsl.grammar.OpenDSLParser.ArrayexpressionContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.arrayexpression()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitArrayexpression
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitArrayexpression
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitRowexpression
public com.google.gson.JsonElement visitRowexpression(com.walkfares.odsl.grammar.OpenDSLParser.RowexpressionContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.rowexpression()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitRowexpression
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitRowexpression
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitVariable
public com.google.gson.JsonElement visitVariable(com.walkfares.odsl.grammar.OpenDSLParser.VariableContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.variable()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitVariable
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitVariable
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitVarname
public com.google.gson.JsonElement visitVarname(com.walkfares.odsl.grammar.OpenDSLParser.VarnameContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.varname()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitVarname
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitVarname
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitId
public com.google.gson.JsonElement visitId(com.walkfares.odsl.grammar.OpenDSLParser.IdContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.id()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitId
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitId
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitNumber
public com.google.gson.JsonElement visitNumber(com.walkfares.odsl.grammar.OpenDSLParser.NumberContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.number()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitNumber
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitNumber
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitJsonObject
public com.google.gson.JsonElement visitJsonObject(com.walkfares.odsl.grammar.OpenDSLParser.JsonObjectContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.jsonObject()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitJsonObject
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitJsonObject
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitInteger
public com.google.gson.JsonElement visitInteger(com.walkfares.odsl.grammar.OpenDSLParser.IntegerContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.integer()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitInteger
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitInteger
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitTf
public com.google.gson.JsonElement visitTf(com.walkfares.odsl.grammar.OpenDSLParser.TfContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.tf()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitTf
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitTf
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitString
public com.google.gson.JsonElement visitString(com.walkfares.odsl.grammar.OpenDSLParser.StringContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.string()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitString
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitString
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitMethod
public com.google.gson.JsonElement visitMethod(com.walkfares.odsl.grammar.OpenDSLParser.MethodContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.method()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitMethod
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitMethod
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitArrayindex
public com.google.gson.JsonElement visitArrayindex(com.walkfares.odsl.grammar.OpenDSLParser.ArrayindexContext ctx)Description copied from class:com.walkfares.odsl.grammar.OpenDSLBaseVisitor
Visit a parse tree produced byOpenDSLParser.arrayindex()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitArrayindex
in interfacecom.walkfares.odsl.grammar.OpenDSLVisitor<com.google.gson.JsonElement>
- Overrides:
visitArrayindex
in classcom.walkfares.odsl.grammar.OpenDSLBaseVisitor<com.google.gson.JsonElement>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-