use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.
the class XMLDBBackupTest method deleteCollection.
private void deleteCollection(final XmldbURI collectionUri) throws XMLDBException {
final Collection parent = DatabaseManager.getCollection(collectionUri.removeLastSegment().toString(), TestUtils.ADMIN_DB_USER, TestUtils.ADMIN_DB_PWD);
final CollectionManagementService colService = (CollectionManagementService) parent.getService("CollectionManagementService", "1.0");
colService.removeCollection(collectionUri.lastSegment().toString());
}
use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.
the class FilterInputStreamCacheMonitorTest method cleanup.
@AfterClass
public static void cleanup() throws XMLDBException {
final CollectionManagementService cms = (CollectionManagementService) existXmldbEmbeddedServer.getRoot().getService("CollectionManagementService", "1.0");
cms.removeCollection(TEST_COLLECTION_NAME);
}
use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.
the class ProtectedModeTest method setupDb.
@BeforeClass
public static void setupDb() throws XMLDBException, SAXException {
CollectionManagementService mgmt = (CollectionManagementService) existEmbeddedServer.getRoot().getService("CollectionManagementService", "1.0");
final Collection collection = mgmt.createCollection("protected");
mgmt = (CollectionManagementService) collection.getService("CollectionManagementService", "1.0");
final TestDataGenerator generator = new TestDataGenerator("xdb", DOCUMENT_COUNT);
for (int i = 0; i < COLLECTION_COUNT; i++) {
Collection currentColl = mgmt.createCollection("test" + i);
final Path[] files = generator.generate(currentColl, generateXQ);
for (int j = 0; j < files.length; j++) {
final XMLResource resource = (XMLResource) currentColl.createResource("xdb" + j + ".xml", "XMLResource");
resource.setContent(files[j].toFile());
currentColl.storeResource(resource);
}
}
}
use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.
the class TestXPathOpOrSpecialCase method setUp.
@Before
public void setUp() throws Exception {
final CollectionManagementService service = (CollectionManagementService) existEmbeddedServer.getRoot().getService("CollectionManagementService", "1.0");
testCollection = service.createCollection("blah");
assertNotNull(testCollection);
}
use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.
the class TestXPathOpOrSpecialCase method tearDown.
@After
public void tearDown() throws Exception {
final CollectionManagementService service = (CollectionManagementService) existEmbeddedServer.getRoot().getService("CollectionManagementService", "1.0");
service.removeCollection("blah");
testCollection = null;
}
Aggregations