Package org.exist.xupdate

Examples of org.exist.xupdate.XUpdateProcessor.reset()


                proc.setBroker(broker);
                proc.setDocumentSet(docs);
                modifications = proc.parse(new InputSource(new StringReader(xupdate)));
                assertNotNull(modifications);
                modifications[0].process(transaction);
                proc.reset();
            }
           
//          Don't commit...           
            pool.getTransactionManager().getJournal().flushToLog(true);
            System.out.println("Transaction interrupted ...");
View Full Code Here


                proc.setBroker(broker);
                proc.setDocumentSet(docs);
                modifications = proc.parse(new InputSource(new StringReader(xupdate)));
                assertNotNull(modifications);
                modifications[0].process(transaction);
                proc.reset();
            }
           
            System.out.println("Adding attributes  ...");
            // add attribute
            for (int i = 1; i <= 200; i++) {
View Full Code Here

              proc.setBroker(broker);
              proc.setDocumentSet(docs);
              modifications = proc.parse(new InputSource(new StringReader(xupdate)));
              assertNotNull(modifications);
              modifications[0].process(transaction);
              proc.reset();
          }
           
            System.out.println("Replacing elements  ...");
            // replace some
            for (int i = 1; i <= 100; i++) {
View Full Code Here

              proc.setDocumentSet(docs);
              modifications = proc.parse(new InputSource(new StringReader(xupdate)));
              assertNotNull(modifications);
              long mods = modifications[0].process(transaction);
              System.out.println("Modifications: " + mods);
              proc.reset();
          }
               
            System.out.println("Removing some elements ...");
            // remove some
            for (int i = 1; i <= 100; i++) {
View Full Code Here

                proc.setBroker(broker);
                proc.setDocumentSet(docs);
                modifications = proc.parse(new InputSource(new StringReader(xupdate)));
                assertNotNull(modifications);
                modifications[0].process(transaction);
                proc.reset();
            }
           
            System.out.println("Appending some elements ...");
            for (int i = 1; i <= 100; i++) {
                xupdate =
View Full Code Here

                proc.setBroker(broker);
                proc.setDocumentSet(docs);
                modifications = proc.parse(new InputSource(new StringReader(xupdate)));
                assertNotNull(modifications);
                modifications[0].process(transaction);
                proc.reset();
            }
           
            System.out.println("Renaming elements  ...");
            // rename element "description" to "descript"
            xupdate =
View Full Code Here

            proc.setBroker(broker);
            proc.setDocumentSet(docs);
            modifications = proc.parse(new InputSource(new StringReader(xupdate)));
            assertNotNull(modifications);
            modifications[0].process(transaction);
            proc.reset();
           
            System.out.println("Updating attribute values ...");
            // update attribute values
            for (int i = 1; i <= 200; i++) {
                xupdate =
View Full Code Here

                proc.setDocumentSet(docs);
                modifications = proc.parse(new InputSource(new StringReader(xupdate)));
                assertNotNull(modifications);
                long mods = modifications[0].process(transaction);
                System.out.println(mods + " records modified.");
                proc.reset();
            }
            System.out.println("Append new element to each item ...");
            // append new element to records
            for (int i = 1; i <= 200; i++) {
                xupdate =
View Full Code Here

                proc.setBroker(broker);
                proc.setDocumentSet(docs);
                modifications = proc.parse(new InputSource(new StringReader(xupdate)));
                assertNotNull(modifications);
                modifications[0].process(transaction);
                proc.reset();
            }
           
            System.out.println("Updating element content ...");
            // update element content
            for (int i = 1; i <= 200; i++) {
View Full Code Here

                proc.setDocumentSet(docs);
                modifications = proc.parse(new InputSource(new StringReader(xupdate)));
                assertNotNull(modifications);
                long mods = modifications[0].process(transaction);
                System.out.println(mods + " records modified.");
                proc.reset();
            }          

            transact.commit(transaction);
            System.out.println("Transaction commited ...");           
          
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.