Examples of configureCollection()


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

    try {
      super.setUp();   
      IndexQueryService idxConf = (IndexQueryService)
        getTestCollection().getService("IndexQueryService", "1.0");
      assertNotNull(idxConf);
      idxConf.configureCollection(CONFIG);     
      String[] wordList = DBUtils.wordList(rootCol);
      assertNotNull(wordList);
      tempFile = DBUtils.generateXMLFile(500, 10, wordList);
      DBUtils.addXMLResource(getTestCollection(), "R1.xml", tempFile);
     
View Full Code Here

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

    protected void setUp() {
        try {
            rootCol = DBUtils.setupDB(rootColURI);
            assertNotNull(rootCol);
            IndexQueryService idxConf = (IndexQueryService) rootCol.getService("IndexQueryService", "1.0");
            idxConf.configureCollection(COLLECTION_CONFIG);
            testCol = rootCol.getChildCollection(testColName);
            if (testCol != null) {
                CollectionManagementService mgr = DBUtils.getCollectionManagementService(rootCol);
                mgr.removeCollection(testColName);
            }
View Full Code Here

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

    @Test
    public void storeDocument() {
        try {
            Collection root = DatabaseManager.getCollection(BASE_URI + testCollection, "admin", "");
            IndexQueryService iqs = (IndexQueryService) root.getService("IndexQueryService", "1.0");
            iqs.configureCollection(COLLECTION_CONFIG);
           
            Resource resource = root.createResource("data.xml", "XMLResource");
            resource.setContent(DOCUMENT_CONTENT);
            root.storeResource(resource);
            printMessages();
View Full Code Here

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

    @Test
    public void removeDocument() {
        try {
            Collection root = DatabaseManager.getCollection(BASE_URI + testCollection, "admin", "");
            IndexQueryService iqs = (IndexQueryService) root.getService("IndexQueryService", "1.0");
            iqs.configureCollection(COLLECTION_CONFIG);

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

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

    @Test
    public void removeTriggers() {
        try {
            Collection root = DatabaseManager.getCollection(BASE_URI + testCollection, "admin", "");
            IndexQueryService iqs = (IndexQueryService) root.getService("IndexQueryService", "1.0");
            iqs.configureCollection(EMPTY_COLLECTION_CONFIG);

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

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

    @Test
    public void updateTriggers() {
        try {
            Collection root = DatabaseManager.getCollection(BASE_URI + testCollection, "admin", "");
            IndexQueryService iqs = (IndexQueryService) root.getService("IndexQueryService", "1.0");
            iqs.configureCollection(EMPTY_COLLECTION_CONFIG);

            Collection configCol =  DatabaseManager.getCollection(BASE_URI + "/db/system/config" + testCollection, "admin", null);
            Resource resource = configCol.createResource("collection.xconf", "XMLResource");
            resource.setContent(COLLECTION_CONFIG);
            configCol.storeResource(resource);
View Full Code Here

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

        //create a test collection
        testCollection = rootSrv.createCollection(TEST_COLLECTION);

        // configure the test collection with the trigger
        IndexQueryService idxConf = (IndexQueryService)testCollection.getService("IndexQueryService", "1.0");
        idxConf.configureCollection(COLLECTION_CONFIG);
    }

    @After
    public void removeTestCollection() throws XMLDBException {
        rootSrv.removeCollection(XmldbURI.create(testCollection.getName()));
View Full Code Here

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

    @Test
    public void documentCreate() 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 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()

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

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

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

        ResourceSet result = service.query(BEFORE+CREATE+DOCUMENT+documentURI);
        assertEquals(1, result.getSize());
View Full Code Here

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

    /** test a trigger fired by a Document Update */
    @Test
    public void documentUpdate() 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
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.