Package org.exist.collections

Examples of org.exist.collections.CollectionConfigurationManager.addConfiguration()


            Collection root = broker.getOrCreateCollection(transaction, TestConstants.TEST_COLLECTION_URI);
            assertNotNull(root);
            broker.saveCollection(transaction, root);

            CollectionConfigurationManager mgr = pool.getConfigurationManager();
            mgr.addConfiguration(transaction, broker, root, COLLECTION_CONFIG);

            docs = new DefaultDocumentSet();

            IndexInfo info = root.validateXMLResource(transaction, broker, XmldbURI.create("test_string.xml"), XML);
            assertNotNull(info);
View Full Code Here


        final TransactionManager transact = pool.getTransactionManager();
        final Txn txn = transact.beginTransaction();
        try {
            broker = pool.get(user);
            final CollectionConfigurationManager mgr = pool.getConfigurationManager();
            mgr.addConfiguration(txn, broker, parent.getCollection(), configData);
            transact.commit(txn);
            System.out.println("Configured '" + parent.getCollection().getURI() + "'");
        } catch (final CollectionConfigurationException e) {
            transact.abort(txn);
      throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(), e);
View Full Code Here

                                pool.initCollectionConfigurationManager(this);
                                collectionConfigurationManager = pool.getConfigurationManager();
                            }

                            if(collectionConfigurationManager != null) {
                                collectionConfigurationManager.addConfiguration(transaction, this, current, initCollectionConfig);
                            }
                        }
                    } catch(final CollectionConfigurationException cce) {
                        LOG.error("Could not load initial collection configuration for /db: " + cce.getMessage(), cce);
                    }
View Full Code Here

            Collection root = broker.getOrCreateCollection(transaction, col1uri);
            assertNotNull(root);
            broker.saveCollection(transaction, root);

            CollectionConfigurationManager mgr = pool.getConfigurationManager();
            mgr.addConfiguration(transaction, broker, root, COLLECTION_CONFIG);

            System.out.println("store "+doc1uri);
            IndexInfo info = root.validateXMLResource(transaction, broker, doc1uri.lastSegment(), XML);
            assertNotNull(info);
            root.store(transaction, broker, info, XML, false);
View Full Code Here

            final Collection root = broker.getOrCreateCollection(txn, col1uri);
            assertNotNull(root);
            broker.saveCollection(txn, root);

            final CollectionConfigurationManager mgr = pool.getConfigurationManager();
            mgr.addConfiguration(txn, broker, root, COLLECTION_CONFIG);

            //store test data
            IndexInfo info = root.validateXMLResource(txn, broker, doc1uri.lastSegment(), XML1);
            root.store(txn, broker, info, XML1, false);
            info = root.validateXMLResource(txn, broker, doc2uri.lastSegment(), XML2);
View Full Code Here

            Collection root = broker.getOrCreateCollection(txn, col1uri);
            assertNotNull(root);
            broker.saveCollection(txn, root);

            CollectionConfigurationManager mgr = pool.getConfigurationManager();
            mgr.addConfiguration(txn, broker, root, COLLECTION_CONFIG);

            System.out.println("STORING DOCUMENT....");
            IndexInfo info = root.validateXMLResource(txn, broker, doc1uri.lastSegment(), XML1);
            assertNotNull(info);
            System.out.println("STORING DOCUMENT....SECOND ROUND....");
View Full Code Here

              root = broker.getOrCreateCollection(txn, col1uri);
              assertNotNull(root);
              broker.saveCollection(txn, root);
 
              CollectionConfigurationManager mgr = pool.getConfigurationManager();
              mgr.addConfiguration(txn, broker, root, COLLECTION_CONFIG);
 
              System.out.println("store "+doc1uri);
              IndexInfo info = root.validateXMLResource(txn, broker, doc1uri.lastSegment(), XML1);
              assertNotNull(info);
              root.store(txn, broker, info, XML1, false);
View Full Code Here

              root = broker.getOrCreateCollection(txn, col1uri);
              assertNotNull(root);
              broker.saveCollection(txn, root);
 
              CollectionConfigurationManager mgr = pool.getConfigurationManager();
              mgr.addConfiguration(txn, broker, root, COLLECTION_CONFIG);
 
              System.out.println("store "+doc1uri);
              IndexInfo info = root.validateXMLResource(txn, broker, doc1uri.lastSegment(), wrongXML);
              assertNotNull(info);
              root.store(txn, broker, info, wrongXML, false);
View Full Code Here

            Collection test2 = broker.getOrCreateCollection(txn, col2uri);
            assertNotNull(test2);
            broker.saveCollection(txn, test2);

            CollectionConfigurationManager mgr = pool.getConfigurationManager();
            mgr.addConfiguration(txn, broker, root, COLLECTION_CONFIG);

            doc1 = storeDocument(txn, broker, root, doc1uri, XML1);
            doc2 = storeDocument(txn, broker, root, doc2uri, XML2);

            System.out.println("store "+doc5uri);
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.