use of org.sirix.service.xml.xpath.expr.IfAxis in project sirix by sirixdb.
the class PipelineBuilder method addIfExpression.
/**
* Adds a if expression to the pipeline.
*
* @param mTransaction Transaction to operate with.
*/
public void addIfExpression(final XdmNodeReadTrx mTransaction) {
assert getPipeStack().size() >= 3;
final XdmNodeReadTrx rtx = mTransaction;
final Axis elseExpr = getPipeStack().pop().getExpr();
final Axis thenExpr = getPipeStack().pop().getExpr();
final Axis ifExpr = getPipeStack().pop().getExpr();
if (getPipeStack().empty() || getExpression().getSize() != 0) {
addExpressionSingle();
}
getExpression().add(new IfAxis(rtx, ifExpr, thenExpr, elseExpr));
}
Aggregations