Examples of addPathStep()


Examples of org.apache.jackrabbit.core.query.PathQueryNode.addPathStep()

        pathNode.setAbsolute(true);
        if (pathConstraints.size() == 0) {
            LocationStepQueryNode step = factory.createLocationStepQueryNode(pathNode);
            step.setNameTest(null);
            step.setIncludeDescendants(true);
            pathNode.addPathStep(step);
        } else {
            try {
                while (pathConstraints.size() > 1) {
                    // merge path nodes
                    MergingPathQueryNode path = null;
View Full Code Here

Examples of org.apache.jackrabbit.core.query.PathQueryNode.addPathStep()

            for (int i = 0; i < steps.length; i++) {
                LocationStepQueryNode step = factory.createLocationStepQueryNode(pathNode);
                step.setNameTest(steps[i].getNameTest());
                step.setIncludeDescendants(steps[i].getIncludeDescendants());
                step.setIndex(steps[i].getIndex());
                pathNode.addPathStep(step);
            }
        }

        if (constraintNode.getNumOperands() == 1) {
            // attach operand to last path step
View Full Code Here

Examples of org.apache.jackrabbit.core.query.PathQueryNode.addPathStep()

                                descendant = (c.getId() == JJTSLASHSLASH
                                        || c.getId() == JJTROOTDESCENDANTS);
                            }
                        }
                        derefNode.setIncludeDescendants(descendant);
                        pathNode.addPathStep(derefNode);
                    } else {
                        exceptions.add(new InvalidQueryException("Unsupported location for jcr:deref()"));
                    }
                }
            } else if (NameFormat.format(JCR_SCORE, resolver).equals(fName)) {
View Full Code Here

Examples of org.apache.jackrabbit.core.query.PathQueryNode.addPathStep()

        // use //* if no path has been set
        PathQueryNode pathNode = root.getLocationNode();
        pathNode.setAbsolute(true);
        if (pathConstraints.size() == 0) {
            pathNode.addPathStep(new LocationStepQueryNode(pathNode, null, true));
        } else {
            try {
                while (pathConstraints.size() > 1) {
                    // merge path nodes
                    MergingPathQueryNode path = null;
View Full Code Here

Examples of org.apache.jackrabbit.core.query.PathQueryNode.addPathStep()

            MergingPathQueryNode path = (MergingPathQueryNode) pathConstraints.get(0);
            LocationStepQueryNode[] steps = path.getPathSteps();
            for (int i = 0; i < steps.length; i++) {
                LocationStepQueryNode step = new LocationStepQueryNode(pathNode, steps[i].getNameTest(), steps[i].getIncludeDescendants());
                step.setIndex(steps[i].getIndex());
                pathNode.addPathStep(step);
            }
        }

        if (constraintNode.getNumOperands() == 1) {
            // attach operand to last path step
View Full Code Here

Examples of org.apache.jackrabbit.core.query.PathQueryNode.addPathStep()

        QueryRootNode allNodesQueryNode = factory.createQueryRootNode();
        PathQueryNode pathNode = factory.createPathQueryNode(allNodesQueryNode);
        LocationStepQueryNode lsNode = factory.createLocationStepQueryNode(pathNode);
        lsNode.setNameTest(null);
        lsNode.setIncludeDescendants(true);
        pathNode.addPathStep(lsNode);
        pathNode.setAbsolute(true);
        allNodesQueryNode.setLocationNode(pathNode);
        return allNodesQueryNode;
    }
}
View Full Code Here

Examples of org.apache.jackrabbit.core.query.PathQueryNode.addPathStep()

                                descendant = (c.getId() == JJTSLASHSLASH
                                        || c.getId() == JJTROOTDESCENDANTS);
                            }
                        }
                        derefNode.setIncludeDescendants(descendant);
                        pathNode.addPathStep(derefNode);
                    } else {
                        exceptions.add(new InvalidQueryException("Unsupported location for jcr:deref()"));
                    }
                }
            } else if (JCR_SCORE.equals(funName)) {
View Full Code Here

Examples of org.apache.jackrabbit.core.query.PathQueryNode.addPathStep()

        // use //* if no path has been set
        PathQueryNode pathNode = root.getLocationNode();
        pathNode.setAbsolute(true);
        if (pathConstraints.size() == 0) {
            pathNode.addPathStep(new LocationStepQueryNode(pathNode, null, true));
        } else {
            try {
                while (pathConstraints.size() > 1) {
                    // merge path nodes
                    MergingPathQueryNode path = null;
View Full Code Here

Examples of org.apache.jackrabbit.core.query.PathQueryNode.addPathStep()

            MergingPathQueryNode path = (MergingPathQueryNode) pathConstraints.get(0);
            LocationStepQueryNode[] steps = path.getPathSteps();
            for (int i = 0; i < steps.length; i++) {
                LocationStepQueryNode step = new LocationStepQueryNode(pathNode, steps[i].getNameTest(), steps[i].getIncludeDescendants());
                step.setIndex(steps[i].getIndex());
                pathNode.addPathStep(step);
            }
        }

        if (constraintNode.getNumOperands() > 0) {
            // attach constraint to last path step
View Full Code Here

Examples of org.apache.jackrabbit.core.query.PathQueryNode.addPathStep()

                                descendant = (c.getId() == JJTSLASHSLASH
                                        || c.getId() == JJTROOTDESCENDANTS);
                            }
                        }
                        derefNode.setIncludeDescendants(descendant);
                        pathNode.addPathStep(derefNode);
                    } else {
                        exceptions.add(new InvalidQueryException("Unsupported location for jcr:deref()"));
                    }
                }
            } else if (JCR_SCORE.toJCRName(resolver).equals(fName)) {
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.