Examples of SameNode


Examples of javax.jcr.query.qom.SameNode

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

Examples of javax.jcr.query.qom.SameNode

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

Examples of javax.jcr.query.qom.SameNode

            return Collections.singleton(pe.getSelectorName());
        } else if (constraint instanceof Comparison) {
            Comparison c = (Comparison) constraint;
            return Collections.singleton(getSelectorName(c.getOperand1()));
        } else if (constraint instanceof SameNode) {
            SameNode sn = (SameNode) constraint;
            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;
View Full Code Here

Examples of javax.jcr.query.qom.SameNode

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

Examples of javax.jcr.query.qom.SameNode

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

Examples of javax.jcr.query.qom.SameNode

                    left.operand, left.transform, c.getOperator(),
                    c.getOperand2(), selectorMap);
        } else if (constraint instanceof FullTextSearch) {
            return getFullTextSearchQuery((FullTextSearch) constraint);
        } else if (constraint instanceof SameNode) {
            SameNode sn = (SameNode) constraint;
            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;
View Full Code Here

Examples of javax.jcr.query.qom.SameNode

                    left.operand, left.transform, c.getOperator(),
                    c.getOperand2(), selectorMap);
        } else if (constraint instanceof FullTextSearch) {
            return getFullTextSearchQuery((FullTextSearch) constraint);
        } else if (constraint instanceof SameNode) {
            SameNode sn = (SameNode) constraint;
            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;
View Full Code Here

Examples of javax.jcr.query.qom.SameNode

        assertEquals("[s].[p]", f.propertyValue("s", "p").toString());
    }

    @Test
    public void sameNode() throws RepositoryException {
        SameNode s = f.sameNode("selectorName", "path");
        assertEquals("selectorName", s.getSelectorName());
        assertEquals("path", s.getPath());
        assertEquals("ISSAMENODE([selectorName], [path])", s.toString());
       
        assertEquals("ISSAMENODE([path])", f.sameNode(null, "path").toString());
        assertEquals("ISSAMENODE([s], [path])", f.sameNode("s", "path").toString());

    }
View Full Code Here

Examples of javax.jcr.query.qom.SameNode

        assertEquals("propertyName", pv.getPropertyName());
    }

    @Test
    public void sameNode() throws RepositoryException {
        SameNode s = f.sameNode("selectorName", "path");
        assertEquals("selectorName", s.getSelectorName());
        assertEquals("path", s.getPath());
    }
View Full Code Here

Examples of javax.jcr.query.qom.SameNode

    /**
     * Test case for {@link QueryObjectModelFactory#sameNode(String, String)}
     */
    public void testSameNode() throws RepositoryException {
        SameNode sameNode = qf.sameNode(SELECTOR_NAME1, testRootNode.getPath());
        assertEquals("Wrong selector name", SELECTOR_NAME1, sameNode.getSelectorName());
        assertEquals("Wrong path", testRootNode.getPath(), sameNode.getPath());
    }
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.