Package org.exist.storage

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


           
            resource = broker.getXMLResource(path, Lock.READ_LOCK);
           
            if(resource == null) {
                // Test for collection
                collection = broker.openCollection(path, Lock.READ_LOCK);
                if(collection == null){
                    // No collection, no document
                    throw new IOException("Resource "+xmldbURL.getPath()+" not found.");
                   
                } else {
View Full Code Here


        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
        doc3Metadata.put(KEY1, doc2);
        doc3Metadata.put(KEY2, VALUE1);
View Full Code Here

        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
        doc3Metadata.put(KEY1, doc2);
View Full Code Here

        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
        doc3Metadata.put(KEY1, doc2);
View Full Code Here

        try {
            broker = pool.get(pool.getSecurityManager().getSystemSubject());
            txnManager = pool.getTransactionManager();
            txn = txnManager.beginTransaction();

            col1 = broker.openCollection(col1uri, Lock.WRITE_LOCK);
            if(col1 != null) {
              broker.removeCollection(txn, col1);
            }

            col2 = broker.openCollection(col2uri, Lock.WRITE_LOCK);
View Full Code Here

            col1 = broker.openCollection(col1uri, Lock.WRITE_LOCK);
            if(col1 != null) {
              broker.removeCollection(txn, col1);
            }

            col2 = broker.openCollection(col2uri, Lock.WRITE_LOCK);
            if(col2 != null) {
              broker.removeCollection(txn, col2);
            }

          txnManager.commit(txn);
View Full Code Here

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

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

        //add metas for XML document
        doc1Metadata.put(KEY1, doc2);
View Full Code Here

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

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

        //add metas for XML document
View Full Code Here

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

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

        //add metas for XML document
        doc1Metadata.put(KEY1, doc2);
View Full Code Here

        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

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.