Package org.xmldb.api.modules

Examples of org.xmldb.api.modules.CollectionManagementService.removeCollection()


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

        service.removeCollection("test");

        // remove the trigger for the Collection under test
        idxConf.configureCollection(EMPTY_COLLECTION_CONFIG);

        final XPathQueryService query = (XPathQueryService) root.getService("XPathQueryService", "1.0");
View Full Code Here


    public void cleanDB() {
        try {
            Collection config = DatabaseManager.getCollection(BASE_URI + "/db/system/config" + testCollection, "admin", null);
            if (config != null) {
                CollectionManagementService mgmt = (CollectionManagementService) config.getService("CollectionManagementService", "1.0");
                mgmt.removeCollection(".");
            }
            Collection root = DatabaseManager.getCollection(BASE_URI + testCollection, "admin", "");
            Resource resource = root.getResource("messages.xml");
            if (resource != null) {
                root.removeResource(resource);
View Full Code Here

     
      org.xmldb.api.base.Collection root = DatabaseManager.getCollection(
          XmldbURI.LOCAL_DB, "admin", "");
      CollectionManagementService mgmt = (CollectionManagementService) root.getService("CollectionManagementService", "1.0");
      try {
        mgmt.removeCollection(myWorkingCopyName);
        mgmt.removeCollection(importDirName);
      } catch (XMLDBException e) {
      }

    } catch (Exception e) {
View Full Code Here

      org.xmldb.api.base.Collection root = DatabaseManager.getCollection(
          XmldbURI.LOCAL_DB, "admin", "");
      CollectionManagementService mgmt = (CollectionManagementService) root.getService("CollectionManagementService", "1.0");
      try {
        mgmt.removeCollection(myWorkingCopyName);
        mgmt.removeCollection(importDirName);
      } catch (XMLDBException e) {
      }

    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

       

        testCol = rootCol.getChildCollection(XmldbURI.ROOT_COLLECTION + "/test");
        if(testCol != null) {
            CollectionManagementService mgr = DBUtils.getCollectionManagementService(rootCol);
            mgr.removeCollection(XmldbURI.ROOT_COLLECTION + "/test");
        }
       
        testCol = DBUtils.addCollection(rootCol, "test");
        assertNotNull(testCol);
       
View Full Code Here

    @After
    public void clearDB() {
        try {
      org.xmldb.api.base.Collection root = DatabaseManager.getCollection("xmldb:exist:///db/test", "admin", null);
      CollectionManagementService service = (CollectionManagementService) root.getService("CollectionManagementService", "1.0");
      service.removeCollection(".");
        } catch (XMLDBException e) {
      e.printStackTrace();
      fail(e.getMessage());
    }
    }
View Full Code Here

    @AfterClass
    public static void closeDB() {
        try {
            Collection root = DatabaseManager.getCollection(XmldbURI.LOCAL_DB, "admin", "");
            CollectionManagementService cmgr = (CollectionManagementService) root.getService("CollectionManagementService", "1.0");
            cmgr.removeCollection("protected");
           
            DatabaseInstanceManager mgr = (DatabaseInstanceManager) root.getService("DatabaseInstanceManager", "1.0");
            mgr.shutdown();
        } catch (XMLDBException e) {
            e.printStackTrace();
View Full Code Here

  private Collection setupTestCollection() throws XMLDBException {
    Collection root = DatabaseManager.getCollection(URI, "admin", "");
    CollectionManagementService rootcms = (CollectionManagementService) root.getService("CollectionManagementService", "1.0");
    Collection c = root.getChildCollection("test");
    if(c != null) rootcms.removeCollection("test");
    rootcms.createCollection("test");
    c = DatabaseManager.getCollection(URI+"/test", "admin", "");
    assertNotNull(c);
    return c;
  }
View Full Code Here

        try {
            Collection root = DatabaseManager.getCollection(baseURI + "/db", "admin", "");
            CollectionManagementService mgmt =
                (CollectionManagementService) root.getService("CollectionManagementService", "1.0");
            mgmt.removeCollection("rpctest");

            Collection config = DatabaseManager.getCollection(baseURI + "/db/system/config/db", "admin", "");
            mgmt =
                (CollectionManagementService) config.getService("CollectionManagementService", "1.0");
            mgmt.removeCollection("rpctest");
View Full Code Here

            mgmt.removeCollection("rpctest");

            Collection config = DatabaseManager.getCollection(baseURI + "/db/system/config/db", "admin", "");
            mgmt =
                (CollectionManagementService) config.getService("CollectionManagementService", "1.0");
            mgmt.removeCollection("rpctest");
        } catch (XMLDBException e) {
            e.printStackTrace();
        }
        server.shutdown();
        server = null;
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.