Examples of saveCollection()


Examples of org.exist.storage.DBBroker.saveCollection()

          tm = db.getTransactionManager();
      final Txn transaction = tm.beginTransaction();
     
      try {
        final Collection child = broker.getOrCreateCollection(transaction, uri.toCollectionPathURI());
        broker.saveCollection(transaction, child);
        tm.commit(transaction);
      } catch (final Exception e) {
          tm.abort(transaction);
        return false;
      } finally {
View Full Code Here

Examples of org.exist.storage.DBBroker.saveCollection()

      tm = db.getTransactionManager();
      final Txn transaction = tm.beginTransaction();
     
      try {
        final Collection child = broker.getOrCreateCollection(transaction, uri.toCollectionPathURI());
        broker.saveCollection(transaction, child);
        tm.commit(transaction);
      } catch (final Exception e) {
          tm.abort(transaction);
        return false;
      } finally {
View Full Code Here

Examples of org.exist.storage.DBBroker.saveCollection()

            assertNotNull(transact);
            transaction = transact.beginTransaction();
            assertNotNull(transaction);

            Collection root = broker.getOrCreateCollection(transaction, TestConstants.TEST_COLLECTION_URI);
        broker.saveCollection(transaction, root);
            assertNotNull(root);

            root.addBinaryResource(transaction, broker, XmldbURI.create(name), data.getBytes(), "application/xquery");

            transact.commit(transaction);
View Full Code Here

Examples of org.exist.storage.DBBroker.saveCollection()

            }
           
            txn = tm.beginTransaction();

            method.modify(collection);
            broker.saveCollection(txn, collection);
           
            tm.commit(txn);

          } else {
            collection = resource.getCollection();
View Full Code Here

Examples of org.exist.storage.DBBroker.saveCollection()

                    broker.getOrCreateCollection(txn, path);
            if (coll == null) {
                LOG.debug("failed to create collection");
                return false;
            }
            broker.saveCollection(txn, coll);
            transact.commit(txn);
            broker.flush();
            broker.sync(Sync.MINOR_SYNC);
            return true;
        } catch (final Exception e) {
View Full Code Here

Examples of org.exist.storage.DBBroker.saveCollection()

                if (owner != null) {
                    perm.setOwner(owner);
                    perm.setGroup(ownerGroup);
                }
                transaction.registerLock(collection.getLock(), Lock.WRITE_LOCK);
                broker.saveCollection(transaction, collection);
                transact.commit(transaction);
                broker.flush();
                return;
            }
            transact.abort(transaction);
View Full Code Here

Examples of org.exist.storage.DBBroker.saveCollection()

            System.out.println("Removing collection");
            broker.removeCollection(transaction, root);

            root = broker.getOrCreateCollection(transaction, TestConstants.TEST_COLLECTION_URI);
            assertNotNull(root);
            broker.saveCollection(transaction, root);
           
            transact.commit(transaction);

            root = null;
           
View Full Code Here

Examples of org.exist.storage.DBBroker.saveCollection()

            transaction = transact.beginTransaction();
            assertNotNull(transaction);

            root = broker.getOrCreateCollection(transaction, TestConstants.TEST_COLLECTION_URI);
            assertNotNull(root);
            broker.saveCollection(transaction, root);

            transact.commit(transaction);

            Configuration config = BrokerPool.getInstance().getConfiguration();
            savedConfig = (Boolean) config.getProperty(Indexer.PROPERTY_PRESERVE_WS_MIXED_CONTENT);
View Full Code Here

Examples of org.exist.storage.DBBroker.saveCollection()

            assertNotNull(transaction);
            System.out.println("Transaction started ...");

            Collection root = broker.getOrCreateCollection(transaction, TestConstants.TEST_COLLECTION_URI);
            assertNotNull(root);
            broker.saveCollection(transaction, root);

            transact.commit(transaction);
        } catch (Exception e) {
          transact.abort(transaction);
            e.printStackTrace();
View Full Code Here

Examples of org.exist.storage.DBBroker.saveCollection()

            assertNotNull(root);
            for (Iterator<DocumentImpl> i = root.iterator(broker); i.hasNext(); ) {
                DocumentImpl doc = i.next();
                root.removeXMLResource(transaction, broker, doc.getURI().lastSegment());
            }
            broker.saveCollection(transaction, root);
            for (Iterator<XmldbURI> i = root.collectionIterator(broker); i.hasNext(); ) {
                XmldbURI childName = i.next();
                if (childName.equals("system"))
                    continue;
                Collection childColl = broker.getOrCreateCollection(transaction, XmldbURI.ROOT_COLLECTION_URI.append(childName));
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.