use of org.wso2.siddhi.query.api.execution.query.input.stream.StateInputStream in project siddhi by wso2.
the class SiddhiQLBaseVisitorImpl method visitSequence_stream.
/**
* {@inheritDoc}
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*
* @param ctx
*/
@Override
public StateInputStream visitSequence_stream(@NotNull SiddhiQLParser.Sequence_streamContext ctx) {
// ;
if (ctx.every_sequence_source_chain() != null) {
StateInputStream stateInputStream = (StateInputStream) visitEvery_sequence_source_chain(ctx.every_sequence_source_chain());
populateQueryContext(stateInputStream, ctx);
return stateInputStream;
} else {
StateInputStream stateInputStream = (StateInputStream) visitEvery_absent_sequence_source_chain(ctx.every_absent_sequence_source_chain());
populateQueryContext(stateInputStream, ctx);
return stateInputStream;
}
}
use of org.wso2.siddhi.query.api.execution.query.input.stream.StateInputStream in project siddhi by wso2.
the class SiddhiQLBaseVisitorImpl method visitPattern_stream.
/**
* {@inheritDoc}
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*
* @param ctx
*/
@Override
public Object visitPattern_stream(@NotNull SiddhiQLParser.Pattern_streamContext ctx) {
// pattern_stream
// : every_pattern_source_chain
// | every_absent_pattern_source_chain
// ;
StateElement stateElement;
if (ctx.every_pattern_source_chain() != null) {
stateElement = ((StateElement) visit(ctx.every_pattern_source_chain()));
} else {
stateElement = ((StateElement) visit(ctx.absent_pattern_source_chain()));
}
StateInputStream stateInputStream = new StateInputStream(StateInputStream.Type.PATTERN, stateElement);
populateQueryContext(stateInputStream, ctx);
return stateInputStream;
}
Aggregations