Examples of configureCollection()


Examples of org.exist.xmldb.IndexQueryService.configureCollection()

        assertNotNull(dst);

        service.copy(srcURI, dstURI, null);

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

        final XPathQueryService query = (XPathQueryService) root.getService("XPathQueryService", "1.0");

        ResourceSet result = query.query(BEFORE+CREATE+COLLECTION+testCollectionURI);
        assertEquals(1, result.getSize());
View Full Code Here

Examples of org.exist.xmldb.IndexQueryService.configureCollection()

   
    /** test a trigger fired by a Collection manipulations */
    @Test
    public void collectionMove() throws XMLDBException, URISyntaxException {
        final IndexQueryService idxConf = (IndexQueryService) root.getService("IndexQueryService", "1.0");
        idxConf.configureCollection(COLLECTION_CONFIG);

        XmldbURI srcURI = XmldbURI.xmldbUriFor("/db/testXQueryTrigger/test");
        XmldbURI dstURI = XmldbURI.xmldbUriFor("/db/testXQueryTrigger/test-dst");

        final CollectionManagementServiceImpl service = (CollectionManagementServiceImpl) testCollection.getService("CollectionManagementService", "1.0");
View Full Code Here

Examples of org.exist.xmldb.IndexQueryService.configureCollection()

        assertNotNull(dst);

        service.move(srcURI, dstURI, null);

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

        final XPathQueryService query = (XPathQueryService) root.getService("XPathQueryService", "1.0");

        ResourceSet result = query.query(BEFORE+CREATE+COLLECTION+testCollectionURI);
        assertEquals(1, result.getSize());
View Full Code Here

Examples of org.exist.xmldb.IndexQueryService.configureCollection()

   
    /** test a trigger fired by a Collection manipulations */
    @Test
    public void collectionDelete() throws XMLDBException {
        final IndexQueryService idxConf = (IndexQueryService) testCollection.getService("IndexQueryService", "1.0");
        idxConf.configureCollection(COLLECTION_CONFIG);

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

View Full Code Here

Examples of org.exist.xmldb.IndexQueryService.configureCollection()

        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");

        ResourceSet result = query.query(BEFORE+CREATE+COLLECTION+testCollectionURI);
        assertEquals(1, result.getSize());
View Full Code Here

Examples of org.exist.xmldb.IndexQueryService.configureCollection()

        invalidModule.setContent(INVALID_MODULE.getBytes());
        testCollection.storeResource(invalidModule);

        // configure the Collection with the trigger under test
        final IndexQueryService idxConf = (IndexQueryService)testCollection.getService("IndexQueryService", "1.0");
        idxConf.configureCollection(COLLECTION_CONFIG);
       
        final int max_store_attempts = 10;
        int count_prepare_exceptions = 0;
        for(int i = 0; i < max_store_attempts; i++) {
            try {
View Full Code Here

Examples of org.exist.xmldb.IndexQueryService.configureCollection()

            broker = db.get(db.getSecurityManager().getSystemSubject());

            Collection root = DatabaseManager.getCollection(BASE_URI + testCollection, "admin", "");

            IndexQueryService idxConf = (IndexQueryService) root.getService("IndexQueryService", "1.0");
            idxConf.configureCollection(COLLECTION_CONFIG);

            Resource resource = root.createResource("data.xml", "XMLResource");
            resource.setContent(DOCUMENT2_CONTENT);
            root.storeResource(resource);
View Full Code Here

Examples of org.exist.xmldb.IndexQueryService.configureCollection()

    private void storeDocs(String collectionName) throws XMLDBException {
        CollectionManagementService service = (CollectionManagementService) test.getService("CollectionManagementService", "1.0");
        Collection collection = service.createCollection(collectionName);
        IndexQueryService iqs = (IndexQueryService) collection.getService("IndexQueryService", "1.0");
        iqs.configureCollection(COLLECTION_CONFIG1);

        String existHome = System.getProperty("exist.home");
        File existDir = existHome==null ? new File(".") : new File(existHome);
        File samples = new File(existDir,"samples/shakespeare");
        File[] files = samples.listFiles();
View Full Code Here

Examples of org.exist.xmldb.IndexQueryService.configureCollection()

            if (testCollection == null) {
                testCollection = service.createCollection(TEST_COLLECTION_NAME);
                assertNotNull(testCollection);
                IndexQueryService idxConf = (IndexQueryService)
                testCollection.getService("IndexQueryService", "1.0");
                idxConf.configureCollection(COLLECTION_CONFIG);
            }
           
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
View Full Code Here

Examples of org.exist.xmldb.IndexQueryService.configureCollection()

            Collection root = DatabaseManager.getCollection(XmldbURI.LOCAL_DB, "admin", "");
            CollectionManagementService mgmt = (CollectionManagementService) root.getService("CollectionManagementService", "1.0");
            Collection collection = mgmt.createCollection("protected");

            IndexQueryService idxConf = (IndexQueryService) collection.getService("IndexQueryService", "1.0");
            idxConf.configureCollection(COLLECTION_CONFIG);
            XMLResource hamlet = (XMLResource) collection.createResource("hamlet.xml", "XMLResource");
            hamlet.setContent(new File("samples/shakespeare/hamlet.xml"));
            collection.storeResource(hamlet);

            mgmt = (CollectionManagementService) collection.getService("CollectionManagementService", "1.0");
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.