private ExpressionOperator selectionToExpression(final FindMetaCriteria criteria,
                                                     final Selection<Long> selection) {
//        final ExpressionOperator.Builder builder = ExpressionOperator.builder();
        // First make sure there is some sort of selection, either
        // individual streams have been selected or all streams have been
        // selected.
        if (selection.isMatchAll()) {
            if (criteria != null && criteria.getExpression() != null) {
//                builder.addOperator(criteria.getExpression());
                return ExpressionUtil.copyOperator(criteria.getExpression());
            }

        } else if (selection.size() > 0) {
            // If we aren't matching all then create a criteria that
            // only includes the selected streams.
            return MetaExpressionUtil
                    .createDataIdSetExpression(selection.getSet());

        }
//        else {
        return null;
//        }
//
//        return builder;
    }
@return The effective criteria taking into account the active filter and any
row selections.
stroom-core-client/src/main/java/stroom/data/client/presenter/AbstractMetaListPresenter.java