Package org.exist.xmldb

Examples of org.exist.xmldb.CollectionManagementServiceImpl.createCollection()


        XmldbURI srcURI = XmldbURI.xmldbUriFor("/db/testXQueryTrigger/test");
        XmldbURI dstURI = XmldbURI.xmldbUriFor("/db/testXQueryTrigger/test-dst");

        final CollectionManagementServiceImpl service = (CollectionManagementServiceImpl) testCollection.getService("CollectionManagementService", "1.0");
        final Collection src = service.createCollection("test");
        assertNotNull(src);

        final Collection dst = service.createCollection("test-dst");
        assertNotNull(dst);
View Full Code Here


        final CollectionManagementServiceImpl service = (CollectionManagementServiceImpl) testCollection.getService("CollectionManagementService", "1.0");
        final Collection src = service.createCollection("test");
        assertNotNull(src);

        final Collection dst = service.createCollection("test-dst");
        assertNotNull(dst);

        service.move(srcURI, dstURI, null);

        // remove the trigger for the Collection under test
View Full Code Here

      org.xmldb.api.base.Collection test = root.getChildCollection("test");
      if (test == null)
        test = mgr.createCollection("test");
      org.xmldb.api.base.Collection test2 = test.getChildCollection("test2");
      if (test2 == null)
        test2 = mgr.createCollection("test2");

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

      org.xmldb.api.base.Collection root = DatabaseManager.getCollection(XmldbURI.LOCAL_DB, "admin", "");
      CollectionManagementServiceImpl mgr = (CollectionManagementServiceImpl)
        root.getService("CollectionManagementService", "1.0");
      org.xmldb.api.base.Collection test = root.getChildCollection("test");
      if (test == null)
        test = mgr.createCollection("test");
      org.xmldb.api.base.Collection test2 = test.getChildCollection("test2");
      if (test2 == null)
        test2 = mgr.createCollection("test2");

      String existHome = System.getProperty("exist.home");
View Full Code Here

          CollectionManagementServiceImpl mgr = (CollectionManagementServiceImpl)
              root.getService("CollectionManagementService", "1.0");
          assertNotNull(mgr);
          org.xmldb.api.base.Collection test = root.getChildCollection("test");
          if (test == null)
            test = mgr.createCollection(TestConstants.TEST_COLLECTION_URI.toString());
          assertNotNull(test);
          org.xmldb.api.base.Collection test2 = test.getChildCollection("test2");
          if (test2 == null)
            test2 = mgr.createCollection(TestConstants.TEST_COLLECTION_URI2.toString());
          assertNotNull(test2);       
View Full Code Here

          if (test == null)
            test = mgr.createCollection(TestConstants.TEST_COLLECTION_URI.toString());
          assertNotNull(test);
          org.xmldb.api.base.Collection test2 = test.getChildCollection("test2");
          if (test2 == null)
            test2 = mgr.createCollection(TestConstants.TEST_COLLECTION_URI2.toString());
          assertNotNull(test2);       
          Resource res = test2.createResource("test_xmldb.xml", "XMLResource");
          assertNotNull(res);
          res.setContent(TEST_XML);
          test2.storeResource(res);
View Full Code Here

              root.getService("CollectionManagementService", "1.0");
          assertNotNull(mgr);
         
          org.xmldb.api.base.Collection test = root.getChildCollection("test");         
          if (test == null)
              test = mgr.createCollection("test");
          assertNotNull(test);
         
          org.xmldb.api.base.Collection test2 = test.getChildCollection("test2");
          if (test2 == null)
              test2 = mgr.createCollection("test2");
View Full Code Here

              test = mgr.createCollection("test");
          assertNotNull(test);
         
          org.xmldb.api.base.Collection test2 = test.getChildCollection("test2");
          if (test2 == null)
              test2 = mgr.createCollection("test2");
          assertNotNull(test2);
         
                String existHome = System.getProperty("exist.home");
                File existDir = existHome==null ? new File(".") : new File(existHome);
          File f = new File(existDir,"samples/biblio.rdf");
View Full Code Here

          res.setContent(f);
          test2.storeResource(res);
         
          org.xmldb.api.base.Collection dest = root.getChildCollection("destination3");
          if (dest == null)         
              dest = mgr.createCollection("destination3");
          assertNotNull(dest);
         
          mgr.move(TestConstants.TEST_COLLECTION_URI2, TestConstants.DESTINATION_COLLECTION_URI3, XmldbURI.create("test3"));
      } catch (Exception e) {           
          fail(e.getMessage());     
View Full Code Here

          CollectionManagementServiceImpl mgr = (CollectionManagementServiceImpl)
              root.getService("CollectionManagementService", "1.0");
          assertNotNull(mgr);
          org.xmldb.api.base.Collection test = root.getChildCollection("test");
          if (test == null)
              test = mgr.createCollection(TestConstants.TEST_COLLECTION_URI.toString());
          assertNotNull(test);
          org.xmldb.api.base.Collection test2 = test.getChildCollection("test2");
          if (test2 == null)
              test2 = mgr.createCollection(TestConstants.TEST_COLLECTION_URI.append("test2").toString());
          assertNotNull(test2);
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.