Package org.exist.storage

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


//                broker.moveResource(transaction, doc, destination, newName);
                {broker.moveResource(transaction, doc, destination, newName);}
            else
// TODO check XML/Binary resource
//                broker.copyResource(transaction, doc, destination, newName);
                {broker.copyResource(transaction, doc, destination, newName);}
            transact.commit(transaction);
//            documentCache.clear();
            return;
        } catch (final LockException e) {
            transact.abort(transaction);
View Full Code Here


            }


            // Perform actial move/copy
            if (mode == Mode.COPY) {
                broker.copyResource(txn, srcDocument, destCollection, newNameUri);

            } else {
                broker.moveResource(txn, srcDocument, destCollection, newNameUri);
            }
View Full Code Here

                throw new EXistException("Destination collection " + destUri + " not found");
            }
            if(move)
                {broker.moveResource(transaction, doc, destination, newName);}
            else
                {broker.copyResource(transaction, doc, destination, newName);}
            transact.commit(transaction);
            return true;
        } catch (final LockException e) {

            transact.abort(transaction);
View Full Code Here

                throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION, "Collection " + destinationPath + " not found");
            }
          if(newName == null) {
            newName = resourcePath.lastSegment();
          }
            broker.copyResource(transaction, doc, destination, newName);
            transact.commit(transaction);
        } catch ( final EXistException e ) {
            transact.abort(transaction);
          e.printStackTrace();
            throw new XMLDBException( ErrorCodes.VENDOR_ERROR,
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.