Examples of DescendantNode


Examples of javax.jcr.query.qom.DescendantNode

    /**
     * Test case for {@link QueryObjectModelFactory#descendantNode(String, String)}
     */
    public void testDescendantNode() throws RepositoryException {
        DescendantNode descNode = qf.descendantNode(SELECTOR_NAME1, testRootNode.getPath());
        assertEquals("Wrong selector", SELECTOR_NAME1, descNode.getSelectorName());
        assertEquals("Wrong path", testRootNode.getPath(), descNode.getAncestorPath());
    }
View Full Code Here

Examples of javax.jcr.query.qom.DescendantNode

    /**
     * Test case for {@link QueryObjectModelFactory#descendantNode(String, String)}
     */
    public void testDescendantNodeWithSelector() throws RepositoryException {
        DescendantNode descNode = qf.descendantNode(SELECTOR_NAME1, testRootNode.getPath());
        assertEquals("Wrong selector name", SELECTOR_NAME1, descNode.getSelectorName());
        assertEquals("Wrong path", testRootNode.getPath(), descNode.getAncestorPath());
    }
View Full Code Here

Examples of javax.jcr.query.qom.DescendantNode

            return Collections.singleton(sn.getSelectorName());
        } else if (constraint instanceof ChildNode) {
            ChildNode cn = (ChildNode) constraint;
            return Collections.singleton(cn.getSelectorName());
        } else if (constraint instanceof DescendantNode) {
            DescendantNode dn = (DescendantNode) constraint;
            return Collections.singleton(dn.getSelectorName());
        } else if (constraint instanceof FullTextSearch) {
            FullTextSearch fts = (FullTextSearch) constraint;
            return Collections.singleton(fts.getSelectorName());
        } else {
            throw new UnsupportedRepositoryOperationException(
View Full Code Here

Examples of javax.jcr.query.qom.DescendantNode

    /**
     * Test case for {@link QueryObjectModelFactory#descendantNode(String, String)}
     */
    public void testDescendantNode() throws RepositoryException {
        DescendantNode descNode = qf.descendantNode(SELECTOR_NAME1, testRootNode.getPath());
        assertEquals("Wrong selector", SELECTOR_NAME1, descNode.getSelectorName());
        assertEquals("Wrong path", testRootNode.getPath(), descNode.getAncestorPath());
    }
View Full Code Here

Examples of javax.jcr.query.qom.DescendantNode

    /**
     * Test case for {@link QueryObjectModelFactory#descendantNode(String, String)}
     */
    public void testDescendantNodeWithSelector() throws RepositoryException {
        DescendantNode descNode = qf.descendantNode(SELECTOR_NAME1, testRootNode.getPath());
        assertEquals("Wrong selector name", SELECTOR_NAME1, descNode.getSelectorName());
        assertEquals("Wrong path", testRootNode.getPath(), descNode.getAncestorPath());
    }
View Full Code Here

Examples of javax.jcr.query.qom.DescendantNode

                Query cq = getComparisonQuery(
                        left, transform.transform, operator, right, selectorMap);
                query.subQuery.add(cq, MUST);
            }
        } else if (constraint instanceof DescendantNode) {
            final DescendantNode descendantNode = (DescendantNode) constraint;
            Query context = getNodeIdQuery(UUID, descendantNode.getAncestorPath());
            query.mainQuery = new DescendantSelfAxisQuery(context, query.subQuery, false);
        } else {
            query.subQuery.add(create(constraint, selectorMap, searcher), MUST);
        }
        return filter;
View Full Code Here

Examples of javax.jcr.query.qom.DescendantNode

            return getNodeIdQuery(UUID, sn.getPath());
        } else if (constraint instanceof ChildNode) {
            ChildNode cn = (ChildNode) constraint;
            return getNodeIdQuery(PARENT, cn.getParentPath());
        } else if (constraint instanceof DescendantNode) {
            DescendantNode dn = (DescendantNode) constraint;
            return getDescendantNodeQuery(dn, searcher);
        } else {
            throw new UnsupportedRepositoryOperationException(
                    "Unknown constraint type: " + constraint);
        }
View Full Code Here

Examples of javax.jcr.query.qom.DescendantNode

                Query cq = getComparisonQuery(
                        left, transform.transform, operator, right, selectorMap);
                query.subQuery.add(cq, MUST);
            }
        } else if (constraint instanceof DescendantNode) {
            final DescendantNode descendantNode = (DescendantNode) constraint;
            Query context = getNodeIdQuery(UUID, descendantNode.getAncestorPath());
            query.mainQuery = new DescendantSelfAxisQuery(context, query.subQuery, false);
        } else {
            query.subQuery.add(create(constraint, selectorMap, searcher), MUST);
        }
        return filter;
View Full Code Here

Examples of javax.jcr.query.qom.DescendantNode

            return getNodeIdQuery(UUID, sn.getPath());
        } else if (constraint instanceof ChildNode) {
            ChildNode cn = (ChildNode) constraint;
            return getNodeIdQuery(PARENT, cn.getParentPath());
        } else if (constraint instanceof DescendantNode) {
            DescendantNode dn = (DescendantNode) constraint;
            return getDescendantNodeQuery(dn, searcher);
        } else {
            throw new UnsupportedRepositoryOperationException(
                    "Unknown constraint type: " + constraint);
        }
View Full Code Here

Examples of javax.jcr.query.qom.DescendantNode

        assertEquals("[selectorName].[propertyName] = 1", c.toString());
    }

    @Test
    public void descendantNode() throws RepositoryException {
        DescendantNode d = f.descendantNode("selectorName", "path");
        assertEquals("selectorName", d.getSelectorName());
        assertEquals("path", d.getAncestorPath());
        assertEquals("ISDESCENDANTNODE([selectorName], [path])", d.toString());
       
        assertEquals("ISDESCENDANTNODE([p])",
                f.descendantNode(null, "p").toString());
    }
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.