Examples of configureCollection()


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

        //TODO : trigger UPDATE events !
        final XUpdateQueryService update = (XUpdateQueryService) testCollection.getService("XUpdateQueryService", "1.0");
        update.updateResource(DOCUMENT_NAME, DOCUMENT_UPDATE);

        idxConf.configureCollection(EMPTY_COLLECTION_CONFIG);

        final XPathQueryService service = (XPathQueryService) testCollection
            .getService("XPathQueryService", "1.0");
        // this is necessary to compare with MODIFIED_DOCUMENT_CONTENT ; TODO better compare with XML diff tool
        service.setProperty(OutputKeys.INDENT, "no");
View Full Code Here

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

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

        final XMLResource doc = (XMLResource) testCollection.createResource(DOCUMENT_NAME, "XMLResource" );
            doc.setContent(DOCUMENT_CONTENT);
        testCollection.storeResource(doc);

View Full Code Here

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

            doc.setContent(DOCUMENT_CONTENT);
        testCollection.storeResource(doc);

        testCollection.removeResource(testCollection.getResource(DOCUMENT_NAME));

        idxConf.configureCollection(EMPTY_COLLECTION_CONFIG);

        final XPathQueryService service = (XPathQueryService) testCollection
            .getService("XPathQueryService", "1.0");

        service.setProperty(OutputKeys.INDENT, "no");
View Full Code Here

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

    @Test
    public void documentBinaryCreate() throws XMLDBException {
        // configure the Collection with the trigger under test
        final IndexQueryService idxConf = (IndexQueryService)
            testCollection.getService("IndexQueryService", "1.0");
        idxConf.configureCollection(COLLECTION_CONFIG);

        // this will fire the trigger
        final Resource res = testCollection.createResource(BINARY_DOCUMENT_NAME, "BinaryResource");
        Base64Decoder dec = new Base64Decoder();
        dec.translate(BINARY_DOCUMENT_CONTENT);
View Full Code Here

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

        dec.translate(BINARY_DOCUMENT_CONTENT);
        res.setContent(dec.getByteArray());
        testCollection.storeResource(res);

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

        final XPathQueryService service = (XPathQueryService) testCollection.getService("XPathQueryService", "1.0");
        //TODO : understand why it is necessary !
        service.setProperty(OutputKeys.INDENT, "no");
View Full Code Here

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

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

        // this will fire the trigger
        final Resource res = testCollection.createResource(BINARY_DOCUMENT_NAME, "BinaryResource");
        final Base64Decoder dec = new Base64Decoder();
        dec.translate(BINARY_DOCUMENT_CONTENT);
View Full Code Here

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

        res.setContent(dec.getByteArray());
        testCollection.storeResource(res);

        testCollection.removeResource(testCollection.getResource(BINARY_DOCUMENT_NAME));

        idxConf.configureCollection(EMPTY_COLLECTION_CONFIG);

        final XPathQueryService service = (XPathQueryService) testCollection
            .getService("XPathQueryService", "1.0");

        service.setProperty(OutputKeys.INDENT, "no");
View Full Code Here

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

   
    /** test a trigger fired by a Collection manipulations */
    @Test
    public void collectionCreate() throws XMLDBException {
        final IndexQueryService idxConf = (IndexQueryService) root.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()

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

        // 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 @Ignore
    public void collectionCopy() throws XMLDBException, URISyntaxException {
        final IndexQueryService idxConf = (IndexQueryService) root.getService("IndexQueryService", "1.0");
        idxConf.configureCollection(COLLECTION_CONFIG);

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

        final CollectionManagementServiceImpl service = (CollectionManagementServiceImpl) testCollection.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.