Examples of ChildNode


Examples of javax.jcr.query.qom.ChildNode

            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;
            return getDescendantNodeQuery(dn, searcher);
        } else {
            throw new UnsupportedRepositoryOperationException(
View Full Code Here

Examples of javax.jcr.query.qom.ChildNode

        assertEquals("$bindVariableName", b.toString());
    }

    @Test
    public void childNode() throws RepositoryException {
        ChildNode cn = f.childNode("selectorName", "parentPath");
        assertEquals("selectorName", cn.getSelectorName());
        assertEquals("parentPath", cn.getParentPath());
        assertEquals("ISCHILDNODE([selectorName], [parentPath])", cn.toString());
       
        assertEquals("ISCHILDNODE([p])", f.childNode(null, "p").toString());
    }
View Full Code Here

Examples of javax.jcr.query.qom.ChildNode

            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;
            return getDescendantNodeQuery(dn, searcher);
        } else {
            throw new UnsupportedRepositoryOperationException(
View Full Code Here

Examples of javax.jcr.query.qom.ChildNode

            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;
            return getDescendantNodeQuery(dn, searcher);
        } else {
            throw new UnsupportedRepositoryOperationException(
View Full Code Here

Examples of javax.jcr.query.qom.ChildNode

            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;
            return Collections.singleton(dn.getSelectorName());
        } else {
            throw new UnsupportedRepositoryOperationException(
View Full Code Here

Examples of javax.jcr.query.qom.ChildNode

            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;
            return getDescendantNodeQuery(dn, searcher);
        } else {
            throw new UnsupportedRepositoryOperationException(
View Full Code Here

Examples of javax.jcr.query.qom.ChildNode

    @Test
    public void shouldAllowQomUseOfIsChildNodeInWhereClause() throws RepositoryException {
        QueryObjectModelFactory qomFactory = session.getWorkspace().getQueryManager().getQOMFactory();

        Selector selector = qomFactory.selector("nt:base", "category");
        ChildNode childNodeConstraint = qomFactory.childNode("category", "/Cars");
        Constraint constraint = childNodeConstraint;
        Column[] columns = new Column[0];
        Ordering[] orderings = null;

        // Build and execute the query ...
View Full Code Here

Examples of javax.jcr.query.qom.ChildNode

        assertEquals("$bindVariableName", b.toString());
    }

    @Test
    public void childNode() throws RepositoryException {
        ChildNode cn = f.childNode("selectorName", "parentPath");
        assertEquals("selectorName", cn.getSelectorName());
        assertEquals("parentPath", cn.getParentPath());
        assertEquals("ISCHILDNODE([selectorName], [parentPath])", cn.toString());
       
        assertEquals("ISCHILDNODE([p])", f.childNode(null, "p").toString());
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.query.jsr283.qom.ChildNode

    /**
     * Test case for {@link QueryObjectModelFactory#childNode(String)}
     */
    public void testChildNode() throws RepositoryException {
        ChildNode childNode = qomFactory.childNode(testRootNode.getPath());
        assertEquals("Wrong path", testRootNode.getPath(), childNode.getPath());
        assertNull("Selector must be null", childNode.getSelectorName());
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.query.jsr283.qom.ChildNode

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