Package org.exist.storage

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


        DBBroker broker = null;
        Collection col1 = null;
        try {
            broker = pool.get(pool.getSecurityManager().getSystemSubject());
            col1 = broker.openCollection(col1uri, Lock.WRITE_LOCK);

            DocumentImpl doc2 = col1.getDocument(broker, doc2uri.lastSegment());

        //add first key-value
        doc1Metadata.put(KEY1, doc2);
View Full Code Here


        //add some test key-values to metadata of doc1
        DBBroker broker = null;
        Collection col1 = null;
        try {
            broker = pool.get(pool.getSecurityManager().getSystemSubject());
            col1 = broker.openCollection(col1uri, Lock.WRITE_LOCK);

            final DocumentImpl doc2 = col1.getDocument(broker, doc2uri.lastSegment());

            //add first key-value
            doc1Metadata.put(KEY1, doc2);
View Full Code Here

        final Txn transaction = transact.beginTransaction();
        DBBroker broker = null;
        org.exist.collections.Collection collection = null;
        try {
            broker = brokerPool.get(user);
            collection = broker.openCollection(collName, Lock.WRITE_LOCK);
            if(collection == null) {
                transact.abort(transaction);
              throw new XMLDBException(ErrorCodes.INVALID_COLLECTION,
                  "Collection " + collName + " not found");
            }
View Full Code Here

        DBBroker broker = null;
        org.exist.collections.Collection collection = null;
        org.exist.collections.Collection destination = null;
        try {
            broker = brokerPool.get(user);
            collection = broker.openCollection(collectionPath, Lock.WRITE_LOCK);
            if(collection == null) {
                transact.abort(transaction);
                throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION, "Collection " + collectionPath + " not found");
            }
            destination = broker.openCollection(destinationPath, Lock.WRITE_LOCK);
View Full Code Here

            collection = broker.openCollection(collectionPath, Lock.WRITE_LOCK);
            if(collection == null) {
                transact.abort(transaction);
                throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION, "Collection " + collectionPath + " not found");
            }
            destination = broker.openCollection(destinationPath, Lock.WRITE_LOCK);
            if(destination == null) {
                transact.abort(transaction);
                throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION, "Collection " + destinationPath + " not found");
            }
            if (newName == null)
View Full Code Here

        DBBroker broker = null;
        org.exist.collections.Collection destination = null;
        org.exist.collections.Collection source = null;
        try {
            broker = brokerPool.get(user);
         source = broker.openCollection(resourcePath.removeLastSegment(), Lock.WRITE_LOCK);
        if(source == null) {
                transact.abort(transaction);
          throw new XMLDBException(ErrorCodes.INVALID_COLLECTION, "Collection " + resourcePath.removeLastSegment() + " not found");
            }
        final DocumentImpl doc = source.getDocument(broker, resourcePath.lastSegment());
View Full Code Here

        final DocumentImpl doc = source.getDocument(broker, resourcePath.lastSegment());
            if(doc == null) {
                transact.abort(transaction);
                throw new XMLDBException(ErrorCodes.NO_SUCH_RESOURCE, "Resource " + resourcePath + " not found");
            }
            destination = broker.openCollection(destinationPath, Lock.WRITE_LOCK);
            if(destination == null) {
                transact.abort(transaction);
                throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION, "Collection " + destinationPath + " not found");
            }
            if (newName == null)
View Full Code Here

        DBBroker broker = null;
        org.exist.collections.Collection collection = null;
        org.exist.collections.Collection destination = null;
        try {
            broker = brokerPool.get(user);
            collection = broker.openCollection(collectionPath, Lock.READ_LOCK);
            if(collection == null) {
                transact.abort(transaction);
                throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION, "Collection '" + collectionPath + "' not found");
            }
            destination = broker.openCollection(destinationPath, Lock.WRITE_LOCK);
View Full Code Here

            collection = broker.openCollection(collectionPath, Lock.READ_LOCK);
            if(collection == null) {
                transact.abort(transaction);
                throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION, "Collection '" + collectionPath + "' not found");
            }
            destination = broker.openCollection(destinationPath, Lock.WRITE_LOCK);
            if(destination == null) {
                transact.abort(transaction);
                throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION, "Collection '" + destinationPath + "' not found");
            }
      if (newName == null) {
View Full Code Here

        DBBroker broker = null;
        org.exist.collections.Collection destination = null;
        org.exist.collections.Collection source = null;
        try {
            broker = brokerPool.get(user);
         source = broker.openCollection(resourcePath.removeLastSegment(), Lock.WRITE_LOCK);
        if(source == null) {
                transact.abort(transaction);
          throw new XMLDBException(ErrorCodes.INVALID_COLLECTION, "Collection " + resourcePath.removeLastSegment() + " not found");
            }
        final DocumentImpl doc = source.getDocument(broker, resourcePath.lastSegment());
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.