Package org.apache.jackrabbit.oak.api

Examples of org.apache.jackrabbit.oak.api.Tree.addChild()


        root1.rebase();
        checkEqual(root1.getTree("/"), (root2.getTree("/")));

        Tree one = root2.getTree("/one");
        one.getChild("two").remove();
        one.addChild("four");
        root2.commit();

        root1.rebase();
        checkEqual(root1.getTree("/"), (root2.getTree("/")));
    }
View Full Code Here


    @Test
    public void oak962() throws CommitFailedException {
        Root root = session.getLatestRoot();
        Tree r = root.getTree("/").addChild("root");
        r.addChild("N3");
        r.addChild("N6");
        r.getChild("N6").addChild("N7");
        root.commit();
        root.move("/root/N6/N7", "/root/N3/N12");
        r.getChild("N3").getChild("N12").remove();
View Full Code Here

    @Test
    public void oak962() throws CommitFailedException {
        Root root = session.getLatestRoot();
        Tree r = root.getTree("/").addChild("root");
        r.addChild("N3");
        r.addChild("N6");
        r.getChild("N6").addChild("N7");
        root.commit();
        root.move("/root/N6/N7", "/root/N3/N12");
        r.getChild("N3").getChild("N12").remove();
        r.getChild("N6").remove();
View Full Code Here

    }

    @Test
    public void query() throws Exception {
        Tree t = root.getTree("/");
        t.addChild("a").addChild("n").setProperty("myProp", "foo");
        t.addChild("b").addChild("n").setProperty("myProp", "bar");
        t.addChild("c").addChild("x").setProperty("myProp", "foo");
        t.setProperty("myProp", "foo");
        root.commit();
        setTravesalFallback(false);
View Full Code Here

    @Test
    public void query() throws Exception {
        Tree t = root.getTree("/");
        t.addChild("a").addChild("n").setProperty("myProp", "foo");
        t.addChild("b").addChild("n").setProperty("myProp", "bar");
        t.addChild("c").addChild("x").setProperty("myProp", "foo");
        t.setProperty("myProp", "foo");
        root.commit();
        setTravesalFallback(false);
        assertQuery("select [jcr:path] from [nt:base] where [n/myProp] is not null",
View Full Code Here

    @Test
    public void query() throws Exception {
        Tree t = root.getTree("/");
        t.addChild("a").addChild("n").setProperty("myProp", "foo");
        t.addChild("b").addChild("n").setProperty("myProp", "bar");
        t.addChild("c").addChild("x").setProperty("myProp", "foo");
        t.setProperty("myProp", "foo");
        root.commit();
        setTravesalFallback(false);
        assertQuery("select [jcr:path] from [nt:base] where [n/myProp] is not null",
                ImmutableList.of("/a", "/b"));
View Full Code Here

    @Test
    public void query() throws Exception {

        Tree t = root.getTree("/");
        t.setProperty("pid", "foo");
        t.addChild("a").setProperty("pid", "foo");
        t.addChild("b").setProperty("pid", "bar");
        t.addChild("c").setProperty("pid", "foo");
        t.addChild("d").setProperty("cid", "foo");

        Tree content = t.addChild("content");
View Full Code Here

    public void query() throws Exception {

        Tree t = root.getTree("/");
        t.setProperty("pid", "foo");
        t.addChild("a").setProperty("pid", "foo");
        t.addChild("b").setProperty("pid", "bar");
        t.addChild("c").setProperty("pid", "foo");
        t.addChild("d").setProperty("cid", "foo");

        Tree content = t.addChild("content");
        content.addChild("x").setProperty("pid", "foo");
View Full Code Here

        Tree t = root.getTree("/");
        t.setProperty("pid", "foo");
        t.addChild("a").setProperty("pid", "foo");
        t.addChild("b").setProperty("pid", "bar");
        t.addChild("c").setProperty("pid", "foo");
        t.addChild("d").setProperty("cid", "foo");

        Tree content = t.addChild("content");
        content.addChild("x").setProperty("pid", "foo");
        content.addChild("y").setProperty("pid", "baz");
View Full Code Here

        Tree t = root.getTree("/");
        t.setProperty("pid", "foo");
        t.addChild("a").setProperty("pid", "foo");
        t.addChild("b").setProperty("pid", "bar");
        t.addChild("c").setProperty("pid", "foo");
        t.addChild("d").setProperty("cid", "foo");

        Tree content = t.addChild("content");
        content.addChild("x").setProperty("pid", "foo");
        content.addChild("y").setProperty("pid", "baz");
        content.addChild("z").setProperty("pid", "bar");
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.