Examples of validateXMLResource()


Examples of org.exist.collections.Collection.validateXMLResource()

          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

Examples of org.exist.collections.Collection.validateXMLResource()

   
            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

Examples of org.exist.collections.Collection.validateXMLResource()

   
            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

Examples of org.exist.collections.Collection.validateXMLResource()

            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());
View Full Code Here

Examples of org.exist.collections.Collection.validateXMLResource()

            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());
View Full Code Here

Examples of org.exist.collections.Collection.validateXMLResource()

            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

Examples of org.exist.collections.Collection.validateXMLResource()

            // store some documents.
            for (int i = 0; i < files.length; i++) {
                f = files[i];
                assertNotNull(f);
                try {
                    info = test.validateXMLResource(transaction, broker, XmldbURI.create(f.getName()), new InputSource(f.toURI().toASCIIString()));
                    assertNotNull(info);
                    test.store(transaction, broker, info, new InputSource(f.toURI().toASCIIString()), false);
                } catch (SAXException e) {
                    System.err.println("Error found while parsing document: " + f.getName() + ": " + e.getMessage());
                }
View Full Code Here

Examples of org.exist.collections.Collection.validateXMLResource()

            broker.saveCollection(transaction, test);
   
            String existHome = System.getProperty("exist.home");
            File existDir = existHome==null ? new File(".") : new File(existHome);
            File f = new File(existDir,"samples/biblio.rdf");
            IndexInfo info = test.validateXMLResource(transaction, broker, XmldbURI.create("test.xml"),
                    new InputSource(f.toURI().toASCIIString()));
            test.store(transaction, broker, info, new InputSource(f.toURI().toASCIIString()), false);
           
            Collection dest = broker.getOrCreateCollection(transaction, XmldbURI.ROOT_COLLECTION_URI.append("destination"));
            broker.saveCollection(transaction, dest);
View Full Code Here

Examples of org.exist.collections.Collection.validateXMLResource()

   
            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, XmldbURI.create("test.xml"), new InputSource(f.toURI().toASCIIString()));
            test2.store(transaction, broker, info, new InputSource(f.toURI().toASCIIString()), false);
           
            transact.commit(transaction);
            System.out.println("Transaction commited ...");
           
View Full Code Here

Examples of org.exist.collections.Collection.validateXMLResource()

            String existHome = System.getProperty("exist.home");
            File existDir = existHome==null ? new File(".") : new File(existHome);
      File f = new File(existDir,"samples/shakespeare/r_and_j.xml");
      assertNotNull(f);
      IndexInfo info = subTestCollection.validateXMLResource(transaction, broker, XmldbURI.create("test.xml"), new InputSource(f.toURI().toASCIIString()));
      assertNotNull(info);
      subTestCollection.store(transaction, broker, info, new InputSource(f.toURI().toASCIIString()), false);

      broker.copyResource(transaction, info.getDocument(), testCollection, XmldbURI.create("new_test.xml"));
      broker.saveCollection(transaction, testCollection);
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.