Examples of FilterStep


Examples of com.tinkerpop.gremlin.process.graph.step.filter.FilterStep

    @Test
    public void shouldChainTogetherStepsWithNextPreviousInALinkedListStructure() {
        Traversal traversal = new DefaultTraversal<>();
        traversal.addStep(new IdentityStep(traversal));
        traversal.addStep(new HasStep(traversal, null));
        traversal.addStep(new FilterStep(traversal));
        validateToyTraversal(traversal);
    }
View Full Code Here

Examples of com.tinkerpop.gremlin.process.graph.step.filter.FilterStep

    }

    @Test
    public void shouldInsertCorrectly() {
        Traversal traversal = new DefaultTraversal<>();
        TraversalHelper.insertStep(new FilterStep(traversal), 0, traversal);
        TraversalHelper.insertStep(new HasStep(traversal, null), 0, traversal);
        TraversalHelper.insertStep(new IdentityStep(traversal), 0, traversal);
        validateToyTraversal(traversal);

        traversal = new DefaultTraversal<>();
        TraversalHelper.insertStep(new IdentityStep(traversal), 0, traversal);
        TraversalHelper.insertStep(new HasStep(traversal, null), 1, traversal);
        TraversalHelper.insertStep(new FilterStep(traversal), 2, traversal);
        validateToyTraversal(traversal);
    }
View Full Code Here

Examples of com.tinkerpop.gremlin.process.graph.step.filter.FilterStep

    @Test
    public void shouldRemovesCorrectly() {
        Traversal traversal = new DefaultTraversal<>();
        traversal.addStep(new IdentityStep(traversal));
        traversal.addStep(new HasStep(traversal, null));
        traversal.addStep(new FilterStep(traversal));

        traversal.addStep(new PropertiesStep(traversal, PropertyType.VALUE, "marko"));
        TraversalHelper.removeStep(3, traversal);
        validateToyTraversal(traversal);
View Full Code Here

Examples of org.jboss.dna.jcr.xpath.XPath.FilterStep

    }

    protected FilterStep parseFilterExpr( TokenStream tokens ) {
        Component primaryExpr = parsePrimaryExpr(tokens);
        List<Component> predicates = parsePredicates(tokens);
        return new FilterStep(primaryExpr, predicates);
    }
View Full Code Here

Examples of org.jboss.dna.jcr.xpath.XPath.FilterStep

                    builder.select(nameFrom(attributeName.getNameTest()));
                } else {
                    throw new InvalidQueryException(query, "The '" + step + "' step is not supported");
                }
            } else if (step instanceof FilterStep) {
                FilterStep filter = (FilterStep)step;
                Component primary = filter.getPrimaryExpression();
                List<Component> predicates = filter.getPredicates();
                if (primary instanceof ContextItem) {
                    if (appliesToPathConstraint(predicates)) {
                        // Can ignore the '.' ...
                    } else {
                        // The constraints are more complicated, so we need to define a new source/table ...
View Full Code Here

Examples of org.jboss.dna.jcr.xpath.XPath.FilterStep

                            builder.append('[').append(((Literal)predicate).getValue()).append(']');
                        }
                    }
                }
            } else if (step instanceof FilterStep) {
                FilterStep filter = (FilterStep)step;
                Component primary = filter.getPrimaryExpression();
                if (primary instanceof ContextItem) {
                    continue; // ignore this '.'
                } else if (primary instanceof ParenthesizedExpression) {
                    ParenthesizedExpression paren = (ParenthesizedExpression)primary;
                    Component wrapped = paren.getWrapped().collapse();
View Full Code Here

Examples of org.jboss.dna.jcr.xpath.XPath.FilterStep

        return new AxisStep(nodeTest, predicates(predicates));
    }

    protected FilterStep filterStep( Component primaryExpression,
                                     Component... predicates ) {
        return new FilterStep(primaryExpression, predicates(predicates));
    }
View Full Code Here

Examples of org.modeshape.jcr.query.xpath.XPath.FilterStep

        return new AxisStep(nodeTest, predicates(predicates));
    }

    protected FilterStep filterStep( Component primaryExpression,
                                     Component... predicates ) {
        return new FilterStep(primaryExpression, predicates(predicates));
    }
View Full Code Here

Examples of org.modeshape.jcr.query.xpath.XPath.FilterStep

                    }
                } else {
                    throw new InvalidQueryException(query, "The '" + step + "' step is not supported");
                }
            } else if (step instanceof FilterStep) {
                FilterStep filter = (FilterStep)step;
                Component primary = filter.getPrimaryExpression();
                List<Component> predicates = filter.getPredicates();
                if (primary instanceof ContextItem) {
                    if (appliesToPathConstraint(predicates)) {
                        // Can ignore the '.' ...
                    } else {
                        // The constraints are more complicated, so we need to define a new source/table ...
View Full Code Here

Examples of org.modeshape.jcr.query.xpath.XPath.FilterStep

    }

    protected FilterStep parseFilterExpr( TokenStream tokens ) {
        Component primaryExpr = parsePrimaryExpr(tokens);
        List<Component> predicates = parsePredicates(tokens);
        return new FilterStep(primaryExpr, predicates);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.