Examples of exportSystemView()


Examples of javax.jcr.Session.exportSystemView()

        tmpFile.deleteOnExit();

        // export system view of /a1/b1
        OutputStream out = new FileOutputStream(tmpFile);
        try {
            session.exportSystemView(b1.getPath(), out, false, false);
        } finally {
            out.close();
        }

        // and import again underneath /a3
View Full Code Here

Examples of javax.jcr.Session.exportSystemView()

        tmpFile.deleteOnExit();

        // export system view of /a1/b1
        OutputStream out = new FileOutputStream(tmpFile);
        try {
            session.exportSystemView(b1.getPath(), out, false, false);
        } finally {
            out.close();
        }

        // and import again underneath /a3
View Full Code Here

Examples of javax.jcr.Session.exportSystemView()

        Node node = session.getRootNode().addNode("node");
        node.addMixin("mix:referenceable");
        session.save();
        String uuid = node.getIdentifier();
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        session.exportSystemView("/node", out, true, false);
        node.remove();
        session.save();
        session.importXML("/", new ByteArrayInputStream(out.toByteArray()),
                ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
        session.save();
View Full Code Here

Examples of javax.jcr.Session.exportSystemView()

         Session session = sp.getSession(workspaceName(repoPath), repo);

         bos = new ByteArrayOutputStream();
         if (viewType != null && (viewType.equalsIgnoreCase("system") || viewType.equalsIgnoreCase("sys")))
            session.exportSystemView(path(repoPath), bos, false, false);
         else
            session.exportDocumentView(path(repoPath), bos, false, false);

      }
      catch (LoginException e)
View Full Code Here

Examples of javax.jcr.Session.exportSystemView()

        Session thisSession = session;
        if (workSpace) {
            thisSession = workspace.getSession();
        }
        try {
            thisSession.exportSystemView(testPath, os, false, false);
            SysViewParser parser = new SysViewParser(testPath, thisSession, SAVEBINARY, RECURSE);
            parser.parse(file);
        } catch (RepositoryException re) {
            fail("Could not initialize the contenthandler due to: " + re.toString());
        } finally {
View Full Code Here

Examples of javax.jcr.Session.exportSystemView()

        Node node = session.getRootNode().addNode("node");
        node.addMixin("mix:referenceable");
        session.save();
        String uuid = node.getIdentifier();
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        session.exportSystemView("/node", out, true, false);
        node.remove();
        session.save();
        session.importXML("/", new ByteArrayInputStream(out.toByteArray()),
                ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
        session.save();
View Full Code Here

Examples of javax.jcr.Session.exportSystemView()

            random.nextBytes(data);
            ValueFactory vf = session.getValueFactory();
            test.setProperty("data", vf.createBinary(new ByteArrayInputStream(data)));
            session.save();
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            session.exportSystemView("/testBinary", out, false, false);
            byte[] output = out.toByteArray();
            Node test2 = root.addNode("testBinary2");
            Node test3 = root.addNode("testBinary3");
            session.save();
            session.importXML("/testBinary2", new ByteArrayInputStream(output), ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
View Full Code Here

Examples of javax.jcr.Session.exportSystemView()

            session.save();
            String s = new String(chars);
            test.setProperty("text", s);
            session.save();
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            session.exportSystemView("/testText", out, false, false);
            byte[] output = out.toByteArray();
            Node test2 = root.addNode("testText2");
            Node test3 = root.addNode("testText3");
            session.save();
            session.importXML("/testText2", new ByteArrayInputStream(output), ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
View Full Code Here

Examples of javax.jcr.Session.exportSystemView()

        tmpFile.deleteOnExit();

        // export system view of /p
        OutputStream out = new FileOutputStream(tmpFile);
        try {
            session.exportSystemView(p.getPath(), out, false, false);
        } finally {
            out.close();
        }

        // delete p and save
View Full Code Here

Examples of javax.jcr.Session.exportSystemView()

        tmpFile.deleteOnExit();

        // export system view of /a1/b1
        OutputStream out = new FileOutputStream(tmpFile);
        try {
            session.exportSystemView(b1.getPath(), out, false, false);
        } finally {
            out.close();
        }

        // and import again underneath /a3
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.