use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.
the class DeadlockTest method clearDB.
@After
public void clearDB() throws XMLDBException {
final org.xmldb.api.base.Collection root = DatabaseManager.getCollection("xmldb:exist:///db/test", "admin", "");
CollectionManagementService service = (CollectionManagementService) root.getService("CollectionManagementService", "1.0");
service.removeCollection(".");
}
use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.
the class XmldbBinariesTest method removeCollection.
@Override
protected void removeCollection(final XmldbURI collectionUri) throws Exception {
Collection colRoot = null;
try {
colRoot = DatabaseManager.getCollection(getBaseUri() + "/db", ADMIN_DB_USER, ADMIN_DB_PWD);
final Collection colTest = colRoot.getChildCollection("test");
try {
final CollectionManagementService cms = (CollectionManagementService) colTest.getService("CollectionManagementService", "1.0");
final String testCollectionName = collectionUri.lastSegment().toString();
cms.removeCollection(testCollectionName);
} finally {
if (colTest != null) {
colTest.close();
}
}
} finally {
if (colRoot != null) {
colRoot.close();
}
}
}
use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.
the class DocTest method tearDown.
@After
public void tearDown() throws XMLDBException {
final CollectionManagementService cms = (CollectionManagementService) existEmbeddedServer.getRoot().getService("CollectionManagementService", "1.0");
// Creates the 'test' collection
cms.removeCollection("test");
test = null;
existEmbeddedServer.getRoot().removeResource(existEmbeddedServer.getRoot().getResource("test.xml"));
}
use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.
the class XQueryTest method tearDown.
@After
public void tearDown() throws XMLDBException {
final CollectionManagementService service = (CollectionManagementService) existEmbeddedServer.getRoot().getService("CollectionManagementService", "1.0");
service.removeCollection("test");
}
use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.
the class XQueryTest method setup.
@Before
public void setup() throws XMLDBException {
final CollectionManagementService service = (CollectionManagementService) existEmbeddedServer.getRoot().getService("CollectionManagementService", "1.0");
service.createCollection("test");
}
Aggregations