Package org.exist.collections

Examples of org.exist.collections.IndexInfo


           
            File files[] = dir.listFiles();
            assertNotNull(files);
           
            File f;
            IndexInfo info;
           
            // store some documents.
            for (int i = 0; i < files.length && i < RESOURCE_COUNT; i++) {
                f = files[i];
                assertNotNull(f);
View Full Code Here


           
            File files[] = dir.listFiles();
            assertNotNull(files);
           
            File f;
            IndexInfo info;
           
            // store some documents.
            for (int i = 0; i < files.length && i < RESOURCE_COUNT; i++) {
                f = files[i];
                assertNotNull(f);
View Full Code Here

          pool = startDB();
            broker = pool.get(pool.getSecurityManager().getSystemSubject());
           
            TransactionManager mgr = pool.getTransactionManager();
           
            IndexInfo info = init(broker, mgr);
            MutableDocumentSet docs = new DefaultDocumentSet();
            docs.add(info.getDocument());
            XUpdateProcessor proc = new XUpdateProcessor(broker, docs, AccessContext.TEST);
           
            Txn transaction = mgr.beginTransaction();
           
            String xupdate;
View Full Code Here

            mgr.addConfiguration(transaction, broker, test, COLLECTION_CONFIG);
           
      InputSource is = new InputSource(new File(
          "samples/shakespeare/hamlet.xml").toURI().toASCIIString());
      assertNotNull(is);
      IndexInfo info = test.validateXMLResource(transaction, broker,
          XmldbURI.create("hamlet.xml"), is);
      assertNotNull(info);
      test.store(transaction, broker, info, is, false);
      transact.commit(transaction);
View Full Code Here

          File[] files = generator.generate(broker, coll, generateXQ);
          for (int j = 0; j < files.length; j++, fileCount++) {
            InputSource is = new InputSource(files[j].toURI()
                .toASCIIString());
            assertNotNull(is);
            IndexInfo info = coll.validateXMLResource(transaction,
                broker, XmldbURI.create("test" + fileCount
                    + ".xml"), is);
            assertNotNull(info);
            coll.store(transaction, broker, info, is, false);
                        transact.commit(transaction);
View Full Code Here

   
            String existHome = System.getProperty("exist.home");
            File existDir = existHome==null ? new File(".") : new File(existHome);
            File f = new File(existDir,"samples/biblio.rdf");
            assertNotNull(f);
            IndexInfo info = test.validateXMLResource(transaction, broker, TestConstants.TEST_XML_URI, new InputSource(f.toURI().toASCIIString()));
            assertNotNull(info);
            test.store(transaction, broker, info, new InputSource(f.toURI().toASCIIString()), false);
           
            Collection dest = broker.getOrCreateCollection(transaction, TestConstants.DESTINATION_COLLECTION_URI);
            assertNotNull(dest);
View Full Code Here

   
            String existHome = System.getProperty("exist.home");
            File existDir = existHome==null ? new File(".") : new File(existHome);
            File f = new File(existDir,"samples/biblio.rdf");
            assertNotNull(f);
            IndexInfo info = test2.validateXMLResource(transaction, broker, TestConstants.TEST_XML_URI, new InputSource(f.toURI().toASCIIString()));
            assertNotNull(info);           
            test2.store(transaction, broker, info, new InputSource(f.toURI().toASCIIString()), false);
           
            transact.commit(transaction);
            System.out.println("Transaction commited ...");
View Full Code Here

            transact.getJournal().flushToLog(true);
           
            BrokerPool.FORCE_CORRUPTION = true;
            transaction = transact.beginTransaction();
            File file = createDocument();
            IndexInfo info = root.validateXMLResource(transaction, broker, XmldbURI.create("test.xml"),
                    new InputSource(file.toURI().toASCIIString()));
            assertNotNull(info);
            root.store(transaction, broker, info, new InputSource(file.toURI().toASCIIString()), false);
            broker.saveCollection(transaction, root);
View Full Code Here

            }
          });
            assertNotNull(files);
           
            File f;
            IndexInfo info;
           
            // store some documents.
            for (int i = 0; i < files.length; i++) {
                f = files[i];
                assertNotNull(f);
View Full Code Here

            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);
            root.store(transaction, broker, info, XML, false);

            docs.add(info.getDocument());

            info = root.validateXMLResource(transaction, broker, XmldbURI.create("test_string2.xml"), XML2);
            assertNotNull(info);
            root.store(transaction, broker, info, XML2, false);

            docs.add(info.getDocument());

            transact.commit(transaction);
        } catch (Exception e) {
            e.printStackTrace();
            transact.abort(transaction);
View Full Code Here

TOP

Related Classes of org.exist.collections.IndexInfo

Copyright © 2018 www.massapicom. 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.