Examples of PathExpression


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

        return new PathExpression(true, steps, null);
    }

    protected PathExpression relativePathExpr( List<StepExpression> steps,
                                               OrderBy orderBy ) {
        return new PathExpression(true, steps, orderBy);
    }
View Full Code Here

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

    protected PathExpression pathExpr( StepExpression... steps ) {
        return pathExpr(Arrays.asList(steps));
    }

    protected PathExpression pathExpr( List<StepExpression> steps ) {
        return new PathExpression(false, steps, null);
    }
View Full Code Here

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

        return new PathExpression(false, steps, null);
    }

    protected PathExpression pathExpr( List<StepExpression> steps,
                                       OrderBy orderBy ) {
        return new PathExpression(false, steps, orderBy);
    }
View Full Code Here

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

    protected PathExpression relativePathExpr( StepExpression... steps ) {
        return relativePathExpr(Arrays.asList(steps));
    }

    protected PathExpression relativePathExpr( List<StepExpression> steps ) {
        return new PathExpression(true, steps, null);
    }
View Full Code Here

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

        return new PathExpression(true, steps, null);
    }

    protected PathExpression relativePathExpr( List<StepExpression> steps,
                                               OrderBy orderBy ) {
        return new PathExpression(true, steps, orderBy);
    }
View Full Code Here

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

                }
                prependDependentOrSelf = true;
            }
            relative = false;
        }
        PathExpression relativeExpr = parseRelativePathExpr(tokens);
        PathExpression result = new PathExpression(relative, relativeExpr.getSteps(), relativeExpr.getOrderBy());
        if (prependDependentOrSelf) {
            result.getSteps().add(0, new DescendantOrSelf());
        }
        return result;
    }
View Full Code Here

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

            if (tokens.hasNext()) {
                steps.add(parseStepExpr(tokens));
            }
        }
        OrderBy orderBy = parseOrderBy(tokens); // may be null
        return new PathExpression(true, steps, orderBy);
    }
View Full Code Here

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

            if (tokens.canConsume("ascending")) order = Order.ASCENDING;
            else if (tokens.canConsume("descending")) order = Order.DESCENDING;
            return new OrderBySpec(order, scoreFunction);
        }

        PathExpression path = this.parsePathExpr(tokens);

        if (!path.isRelative()) {
            throw new ParsingException(tokens.nextPosition(),
                    "Expected either 'jcr:score(tableName)', '@<propertyName>', "
                    + "or '<childName>/@<propertyOnChild>' but absolute path was found "
                    + tokens.consume());
        }

        List<StepExpression> steps = path.getSteps();
        if (steps.size() != 2) {
            throw new ParsingException(tokens.nextPosition(),
                    "Expected either 'jcr:score(tableName)', '@<propertyName>', "
                    + "or '<childName>/@<propertyOnChild>' but was found "
                    + tokens.consume());
View Full Code Here

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

                            nameOfTableToScore = tableNameTest.toString();
                        }
                    }
                    operandBuilder.fullTextSearchScore(nameOfTableToScore);
                } else {
                    PathExpression axes = spec.getPath();
                    List<StepExpression> axesSteps = axes.getSteps();

                    if (axesSteps.size() != 2) {
                        throw new InvalidQueryException("Only child axis supported in ORDER BY clause");
                    }
View Full Code Here

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

            if (!nodeName.isWildcard()) {
                where.nodeName(alias).isEqualTo(nameFrom(nodeName));
            }
        } else {
            // Must be just a bunch of descendant-or-self, axis and filter steps ...
            translatePathExpressionConstraint(new PathExpression(true, path, null), where, alias);
        }
        return tableName;
    }
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.