Examples of removeCollection()


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

            IndexQueryService idxConf = (IndexQueryService) rootCol.getService("IndexQueryService", "1.0");
            idxConf.configureCollection(COLLECTION_CONFIG);
            testCol = rootCol.getChildCollection(testColName);
            if (testCol != null) {
                CollectionManagementService mgr = DBUtils.getCollectionManagementService(rootCol);
                mgr.removeCollection(testColName);
            }
            testCol = DBUtils.addCollection(rootCol, testColName);
            assertNotNull(testCol);

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

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

    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

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

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

    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

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

     
      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

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

      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

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

       

        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

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

    @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

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

    @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

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

  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
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.