Search in sources :

Example 21 with CollectionManagementService

use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.

the class MoveCollectionTest method tearDown.

@After
public void tearDown() throws XMLDBException {
    final Collection root = DatabaseManager.getCollection(getBaseUri() + "/db", TestUtils.ADMIN_DB_USER, TestUtils.ADMIN_DB_PWD);
    final CollectionManagementService service = (CollectionManagementService) root.getService("CollectionManagementService", "1.0");
    service.removeCollection(TEST_COLLECTION_NAME);
    testCollection = null;
}
Also used : CollectionManagementService(org.xmldb.api.modules.CollectionManagementService) Collection(org.xmldb.api.base.Collection) After(org.junit.After)

Example 22 with CollectionManagementService

use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.

the class BinaryResourceUpdateTest method tearDown.

@After
public void tearDown() throws XMLDBException {
    // delete the test collection
    final CollectionManagementService service = (CollectionManagementService) testCollection.getParentCollection().getService("CollectionManagementService", "1.0");
    service.removeCollection(TEST_COLLECTION);
    binFile = null;
    xmlFile = null;
}
Also used : CollectionManagementService(org.xmldb.api.modules.CollectionManagementService) After(org.junit.After)

Example 23 with CollectionManagementService

use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.

the class BinaryResourceUpdateTest method setUp.

@Before
public void setUp() throws Exception {
    final CollectionManagementService service = (CollectionManagementService) existEmbeddedServer.getRoot().getService("CollectionManagementService", "1.0");
    testCollection = service.createCollection(TEST_COLLECTION);
    assertNotNull(testCollection);
    binFile = getClass().getClassLoader().getResource("org/exist/xmldb/test.bin");
    assertNotNull(binFile);
    xmlFile = getClass().getClassLoader().getResource("org/exist/xmldb/test.xml");
    assertNotNull(xmlFile);
}
Also used : CollectionManagementService(org.xmldb.api.modules.CollectionManagementService) Before(org.junit.Before)

Example 24 with CollectionManagementService

use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.

the class CollectionTest method setup.

@Before
public void setup() throws XMLDBException {
    final CollectionManagementService service = (CollectionManagementService) existEmbeddedServer.getRoot().getService("CollectionManagementService", "1.0");
    service.createCollection(TestConstants.SPECIAL_NAME);
}
Also used : CollectionManagementService(org.xmldb.api.modules.CollectionManagementService) Before(org.junit.Before)

Example 25 with CollectionManagementService

use of org.xmldb.api.modules.CollectionManagementService in project exist by eXist-db.

the class DeleteCollectionTest method tearDown.

@After
public void tearDown() throws XMLDBException {
    final Collection root = DatabaseManager.getCollection(getBaseUri() + "/db", TestUtils.ADMIN_DB_USER, TestUtils.ADMIN_DB_PWD);
    final CollectionManagementService service = (CollectionManagementService) root.getService("CollectionManagementService", "1.0");
    service.removeCollection(TEST_COLLECTION_NAME);
    testCollection = null;
}
Also used : CollectionManagementService(org.xmldb.api.modules.CollectionManagementService) Collection(org.xmldb.api.base.Collection) After(org.junit.After)

Aggregations

CollectionManagementService (org.xmldb.api.modules.CollectionManagementService)148 Collection (org.xmldb.api.base.Collection)84 XMLResource (org.xmldb.api.modules.XMLResource)33 Resource (org.xmldb.api.base.Resource)25 Before (org.junit.Before)23 EXistCollectionManagementService (org.exist.xmldb.EXistCollectionManagementService)21 After (org.junit.After)21 Test (org.junit.Test)19 UserManagementService (org.exist.xmldb.UserManagementService)14 ResourceSet (org.xmldb.api.base.ResourceSet)14 BinaryResource (org.xmldb.api.modules.BinaryResource)13 XPathQueryService (org.xmldb.api.modules.XPathQueryService)9 Account (org.exist.security.Account)7 IndexQueryService (org.exist.xmldb.IndexQueryService)6 AfterClass (org.junit.AfterClass)6 Database (org.xmldb.api.base.Database)6 XMLDBException (org.xmldb.api.base.XMLDBException)6 Path (java.nio.file.Path)5 BeforeClass (org.junit.BeforeClass)5 InputStream (java.io.InputStream)4