Package org.apache.jackrabbit.oak.spi

Examples of org.apache.jackrabbit.oak.spi.Cursor


        filter.restrictPath("/", Filter.PathRestriction.EXACT);
        filter.restrictProperty(
                "foo",
                Operator.EQUAL,
                MemoryValueFactory.INSTANCE.createValue("bar"));
        Cursor cursor = index.query(filter, null);
        assertTrue(cursor.next());
        assertEquals("/", cursor.currentPath());
        assertFalse(cursor.next());
    }
View Full Code Here


        head = mk.commit("/", "+ \"children\": { \"c1\": {\"p\": \"1\"}, \"c2\": {\"p\": \"1\"}, \"c3\": {\"p\": \"2\"}, \"c4\": {\"p\": \"3\"}}", head, "");
        FilterImpl f = new FilterImpl(null);

        f.setPath("/");
        List<String> paths = new ArrayList<String>();
        Cursor c = t.query(f, head);
        while (c.next()) {
            paths.add(c.currentPath());
        }
        Collections.sort(paths);
        assertEquals(Arrays.asList(
                "/", "/children", "/children/c1", "/children/c2",
                "/children/c3", "/children/c4", "/parents",
                "/parents/p0", "/parents/p1""/parents/p2"),
                paths);
        assertFalse(c.next());
        // endure it stays false
        assertFalse(c.next());

        f.setPath("/nowhere");
        c = t.query(f, head);
        assertFalse(c.next());
        // endure it stays false
        assertFalse(c.next());
    }
View Full Code Here

        filter.restrictPath("/", Filter.PathRestriction.EXACT);
        filter.restrictProperty(
                "foo",
                Operator.EQUAL,
                MemoryValueFactory.INSTANCE.createValue("bar"));
        Cursor cursor = index.query(filter, null);
        assertTrue(cursor.next());
        assertEquals("/", cursor.currentPath());
        assertFalse(cursor.next());
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.Cursor

Copyright © 2018 www.massapicom. 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.