Examples of openCollection()


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

        DBBroker broker = null;
        Collection collection = null;
        try {
            // Try to read as specified subject
            broker = brokerPool.get(subject);
            collection = broker.openCollection(xmldbUri, Lock.READ_LOCK);

            // Get all documents
            Iterator<DocumentImpl> documents = collection.iteratorNoLock(broker); // QQ: use 'iterator'
            while (documents.hasNext()) {
                documentURIs.add(documents.next().getURI());
View Full Code Here

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

        try {
            broker = brokerPool.get(subject);


            // Open collection if possible, else abort
            collection = broker.openCollection(xmldbUri, Lock.WRITE_LOCK);
            if (collection == null) {
                txnManager.abort(txn);
                return;
            }
View Full Code Here

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

        try {
            broker = brokerPool.get(subject);

            // Check if collection exists. not likely to happen since availability is
            // checked by ResourceFactory
            collection = broker.openCollection(newCollection, Lock.WRITE_LOCK);
            if (collection != null) {
                final String msg = "Collection already exists";

                LOG.debug(msg);
               
View Full Code Here

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

        try {
            broker = brokerPool.get(subject);

            // Check if collection exists. not likely to happen since availability is checked
            // by ResourceFactory
            collection = broker.openCollection(xmldbUri, Lock.WRITE_LOCK);
            if (collection == null) {
                LOG.debug(String.format("Collection %s does not exist", xmldbUri));
                txnManager.abort(txn);
                throw new CollectionDoesNotExistException(xmldbUri + "");
            }
View Full Code Here

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

            // This class contains already the URI of the resource that shall be moved/copied
            XmldbURI srcCollectionUri = xmldbUri;

            // Open collection if possible, else abort
            srcCollection = broker.openCollection(srcCollectionUri, Lock.WRITE_LOCK);
            if (srcCollection == null) {
                txnManager.abort(txn);
                return; // TODO throw
            }
View Full Code Here

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

                return; // TODO throw
            }


            // Open collection if possible, else abort
            destCollection = broker.openCollection(destCollectionUri, Lock.WRITE_LOCK);
            if (destCollection == null) {
                LOG.debug(String.format("Destination collection %s does not exist.", xmldbUri));
                txnManager.abort(txn);
                return; // TODO throw?
            }
View Full Code Here

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

            // Need to split path into collection and document name
            XmldbURI collName = xmldbUri.removeLastSegment();
            XmldbURI docName = xmldbUri.lastSegment();

            // Open collection if possible, else abort
            collection = broker.openCollection(collName, Lock.WRITE_LOCK);
            if (collection == null) {
                LOG.debug("Collection does not exist");
                txnManager.abort(txn);
                return;
            }
View Full Code Here

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

            // Need to split path into collection and document name
            XmldbURI srcCollectionUri = xmldbUri.removeLastSegment();
            XmldbURI srdDocumentUri = xmldbUri.lastSegment();

            // Open collection if possible, else abort
            srcCollection = broker.openCollection(srcCollectionUri, Lock.WRITE_LOCK);
            if (srcCollection == null) {
                txnManager.abort(txn);
                return; // TODO throw
            }
View Full Code Here

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

                txnManager.abort(txn);
                return;
            }

            // Open collection if possible, else abort
            destCollection = broker.openCollection(destCollectionUri, Lock.WRITE_LOCK);
            if (destCollection == null) {
                LOG.debug(String.format("Destination collection %s does not exist.", xmldbUri));
                txnManager.abort(txn);
                return;
            }
View Full Code Here

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

        final TransactionManager transact = factory.getBrokerPool().getTransactionManager();
        final Txn transaction = transact.beginTransaction();
        try {
            broker = factory.getBrokerPool().get(user);
            try {
              collection = broker.openCollection(collUri, Lock.READ_LOCK);
              if (collection == null) {
                  transact.abort(transaction);
                  throw new EXistException("collection " + collUri + " not found!");
              }
            } finally {
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.