Package org.apache.lenya.xml

Examples of org.apache.lenya.xml.NamespaceHelper.save()


            int revision = getRevision(repoNode) + 1;
            helper.getDocument().getDocumentElement().setAttribute("revision",
                    Integer.toString(revision));

            saveNodes(getRoot(), helper, helper.getDocument().getDocumentElement());
            helper.save(repoNode.getOutputStream());
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new RepositoryException(e);
        }
View Full Code Here


            int revision = getRevision(repoNode) + 1;
            helper.getDocument().getDocumentElement().setAttribute("revision",
                    Integer.toString(revision));

            saveNodes(getRoot(), helper, helper.getDocument().getDocumentElement());
            helper.save(repoNode.getOutputStream());
            this.lastModified = repoNode.getLastModified();
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new RepositoryException(e);
View Full Code Here

    protected void testChanged(Document doc, TestListener listener) throws Exception {
        listener.reset();
        org.w3c.dom.Document oldXml = DocumentHelper.readDocument(doc.getInputStream());
        NamespaceHelper xml = new NamespaceHelper("http://apache.org/lenya/test", "", "test");
        xml.save(doc.getOutputStream());
        DocumentHelper.writeDocument(oldXml, doc.getOutputStream());
       
        assertFalse(listener.wasChanged());
        doc.getRepositoryNode().getSession().commit();
        Thread.currentThread().sleep(100);
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.