Examples of openCollection()


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

 
          org.exist.collections.Collection destination = null;
          org.exist.collections.Collection source = null;
          XmldbURI newName;
      try {
           source = broker.openCollection(uri.removeLastSegment(), Lock.WRITE_LOCK);
          if(source == null) {
            return false;
              }
          final DocumentImpl doc = source.getDocument(broker, uri.lastSegment());
              if(doc == null) {
View Full Code Here

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

              }
          final DocumentImpl doc = source.getDocument(broker, uri.lastSegment());
              if(doc == null) {
                  return false;
              }
              destination = broker.openCollection(destinationPath.removeLastSegment(), Lock.WRITE_LOCK);
              if(destination == null) {
                  return false;
              }
             
              newName = destinationPath.lastSegment();
View Full Code Here

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

   
            org.exist.collections.Collection destination = null;
            org.exist.collections.Collection source = null;
            XmldbURI newName;
            try {
                source = broker.openCollection(uri.removeLastSegment(), Lock.WRITE_LOCK);
                if(source == null) {
                    return false;
                }
                final DocumentImpl doc = source.getDocument(broker, uri.lastSegment());
                if(doc == null) {
View Full Code Here

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

                }
                final DocumentImpl doc = source.getDocument(broker, uri.lastSegment());
                if(doc == null) {
                    return false;
                }
                destination = broker.openCollection(destinationPath.removeLastSegment(), Lock.WRITE_LOCK);
                if(destination == null) {
                    return false;
                }
               
                newName = destinationPath.lastSegment();
View Full Code Here

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

      }
 
      tm = db.getTransactionManager();
          Txn txn = null;
          try {
              collection = broker.openCollection(uri.removeLastSegment(), Lock.NO_LOCK);
              if (collection == null) {
                  return false;
              }
              // keep the write lock in the transaction
              //transaction.registerLock(collection.getLock(), Lock.WRITE_LOCK);
View Full Code Here

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

            final XmldbURI docUri = path.lastSegment();
            if (collectionUri==null || docUri==null) {
                transact.abort(txn);
                throw new EXistException("Illegal document path");
            }
            collection = broker.openCollection(collectionUri, Lock.WRITE_LOCK);
            if (collection == null)
                {throw new EXistException("Collection " + collectionUri
                        + " not found");}
            if (!replace) {
                final DocumentImpl old = collection.getDocument(broker, docUri);
View Full Code Here

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

        try {
            broker = pool.get(session.getUser());
            if (collectionName == null)
                {collectionName = XmldbURI.ROOT_COLLECTION_URI;}
           
            collection = broker.openCollection(collectionName, Lock.READ_LOCK);
            if (collection == null)
                {throw new EXistException("collection " + collectionName
                        + " not found!");}
            final CollectionDesc desc = new CollectionDesc();
            final List<DocumentDesc> docs = new ArrayList<DocumentDesc>();
View Full Code Here

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

        final TransactionManager transact = pool.getTransactionManager();
        final Txn transaction = transact.beginTransaction();
        try {
            broker = pool.get(session.getUser());
            final org.exist.security.SecurityManager manager = pool.getSecurityManager();
            collection = broker.openCollection(resource, Lock.WRITE_LOCK);
            if (collection == null) {
                // TODO check XML/Binary resource
                doc = broker.getXMLResource(resource, Lock.WRITE_LOCK);
                if (doc == null)
                    {throw new RemoteException("document or collection "
View Full Code Here

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

            final XmldbURI docUri = docPath.lastSegment();
            if (collectionUri==null || docUri==null) {
                transact.abort(transaction);
                throw new EXistException("Illegal document path");
            }
            collection = broker.openCollection(collectionUri, move ? Lock.WRITE_LOCK : Lock.READ_LOCK);
            if (collection == null) {
                transact.abort(transaction);
                throw new RemoteException("Collection " + collectionUri
                        + " not found");
            }
View Full Code Here

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

                transact.abort(transaction);
                throw new RemoteException("Document " + docUri + " not found");
            }
           
            // get destination collection
            destination = broker.openCollection(destinationPath, Lock.WRITE_LOCK);
            if(destination == null) {
                transact.abort(transaction);
                throw new RemoteException("Destination collection " + destinationPath + " not found");
            }
            if(move)
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.