Package org.exist.storage

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


            assertNotNull(transaction);
            System.out.println("Transaction started ...");

            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 "+doc01uri);
View Full Code Here


            //TODO : unlock the collection here ?
            collection.store(null, broker, info, XML, false);
            @SuppressWarnings("unused")
      org.exist.dom.DocumentImpl doc = info.getDocument();
            broker.flush();
            broker.saveCollection(null, collection);
        } finally {
            if (pool != null) {
                pool.release(broker);
            }
        }
View Full Code Here

    File thumbDir = null;
    if (isSaveToDataBase) {
      try {
        thumbCollection = dbbroker.getOrCreateCollection(transaction,
            thumbPath.toXmldbURI());
        dbbroker.saveCollection(transaction, thumbCollection);
      } catch (Exception e) {
        throw new XPathException(this, e.getMessage());
      }
    } else {
      thumbDir = new File(thumbPath.toString());
View Full Code Here

            //TODO : register a lock (wich one ?) within the transaction ?
            if (created != null)
                {current.setCreationTime( created.getTime());}
            LOG.debug("creating collection " + collUri);
           
            broker.saveCollection(transaction, current);
            transact.commit(transaction);
            broker.flush();
           
            //broker.sync();
            LOG.info("collection " + collUri + " has been created");
View Full Code Here

      assertNotNull(transact);
      transaction = transact.beginTransaction();
      Collection root = broker.getOrCreateCollection(transaction,
          XmldbURI.ROOT_COLLECTION_URI);
      assertNotNull(root);
      broker.saveCollection(transaction, root);

      Collection test = broker.getOrCreateCollection(transaction,
          TestConstants.TEST_COLLECTION_URI);
      assertNotNull(test);
      broker.saveCollection(transaction, test);
View Full Code Here

      broker.saveCollection(transaction, root);

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

      CollectionConfigurationManager mgr = pool.getConfigurationManager();
            mgr.addConfiguration(transaction, broker, test, COLLECTION_CONFIG);
           
      InputSource is = new InputSource(new File(
View Full Code Here

                    transaction = transact.beginTransaction();
                    coll = broker.getOrCreateCollection(transaction,
              TestConstants.TEST_COLLECTION_URI.append(Integer
                  .toString(i)));
          assertNotNull(coll);
          broker.saveCollection(transaction, coll);
                    transact.commit(transaction);

                    transaction = transact.beginTransaction();
                    System.out.println("Generating " + docCount + " files...");
          File[] files = generator.generate(broker, coll, generateXQ);
View Full Code Here

            System.out.println("Transaction started ...");
           
            Collection collection = broker
                    .getOrCreateCollection(transaction, TestConstants.TEST_COLLECTION_URI);
           
            broker.saveCollection(transaction, collection);
           
            @SuppressWarnings("unused")
      BinaryDocument doc =
                    collection.addBinaryResource(transaction, broker,
                    DOCUMENT_NAME_URI , EMPTY_BINARY_FILE.getBytes(), "text/text");
View Full Code Here

            assertNotNull(transaction);           
            System.out.println("NodeTest#setUp ...");
           
            root = broker.getOrCreateCollection(transaction, XmldbURI.create(XmldbURI.ROOT_COLLECTION + "/test"));
            assertNotNull(root);
            broker.saveCollection(transaction, root);
           
            IndexInfo info = root.validateXMLResource(transaction, broker, XmldbURI.create("test.xml"), XML);
            //TODO : unlock the collection here ?
            assertNotNull(info);
            root.store(transaction, broker, info, XML, false);
View Full Code Here

            assertNotNull(transaction);           
            System.out.println("NodeTest#setUp ...");
           
            root = broker.getOrCreateCollection(transaction, XmldbURI.create(XmldbURI.ROOT_COLLECTION + "/test"));
            assertNotNull(root);
            broker.saveCollection(transaction, root);
           
            IndexInfo info = root.validateXMLResource(transaction, broker, XmldbURI.create("test.xml"), XML);
            //TODO : unlock the collection here ?
            assertNotNull(info);
            root.store(transaction, broker, info, XML, false);
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.