Package org.apache.jackrabbit.oak.kernel

Examples of org.apache.jackrabbit.oak.kernel.KernelNodeState$KernelChildNodeEntry


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

        f.setPath("/");
        List<String> paths = new ArrayList<String>();
        Cursor c = t.query(f, new KernelNodeState(store, "/", head, cache));
        while (c.hasNext()) {
            paths.add(c.next().getPath());
        }
        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.hasNext());
        // endure it stays false
        assertFalse(c.hasNext());

        f.setPath("/nowhere");
        c = t.query(f, new KernelNodeState(store, "/", head, cache));
        assertFalse(c.hasNext());
        // endure it stays false
        assertFalse(c.hasNext());
    }
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, null);

        f.setPath("/");
        List<String> paths = new ArrayList<String>();
        Cursor c = t.query(f, new KernelNodeState(mk, "/", head, cache));
        while (c.hasNext()) {
            paths.add(c.next().getPath());
        }
        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.hasNext());
        // endure it stays false
        assertFalse(c.hasNext());

        f.setPath("/nowhere");
        c = t.query(f, new KernelNodeState(mk, "/", head, cache));
        assertFalse(c.hasNext());
        // endure it stays false
        assertFalse(c.hasNext());
    }
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, new KernelNodeState(mk, "/", head, cache));
        while (c.next()) {
            paths.add(c.currentRow().getPath());
        }
        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, new KernelNodeState(mk, "/", head, cache));
        assertFalse(c.next());
        // endure it stays false
        assertFalse(c.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();

        f.setPath("/");
        List<String> paths = new ArrayList<String>();
        Cursor c = t.query(f, new KernelNodeState(mk, "/", head, cache));
        while (c.hasNext()) {
            paths.add(c.next().getPath());
        }
        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.hasNext());
        // endure it stays false
        assertFalse(c.hasNext());

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

TOP

Related Classes of org.apache.jackrabbit.oak.kernel.KernelNodeState$KernelChildNodeEntry

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.