Package org.exist.xmldb

Examples of org.exist.xmldb.IndexQueryService


        try {
            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


    }

    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

                "1.0");
            testCollection = root.getChildCollection(TEST_COLLECTION_NAME);
            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

            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

        Collection root = DatabaseManager.getCollection(baseURI + "/db", "admin", "");
       
        CollectionManagementService mgmt =
                (CollectionManagementService) root.getService("CollectionManagementService", "1.0");
        Collection test = mgmt.createCollection("rpctest");
        IndexQueryService idxs = (IndexQueryService) test.getService("IndexQueryService", "1.0");
        idxs.configureCollection(COLLECTION_CONFIG);

        Resource resource = test.createResource("strings.xml", "XMLResource");
        resource.setContent(new File("samples/shakespeare/macbeth.xml"));
        test.storeResource(resource);
       
View Full Code Here

            return BooleanValue.FALSE;
        }

        // Reindex
        try {
            final IndexQueryService iqs = (IndexQueryService) collection.getService("IndexQueryService", "1.0");
            iqs.reindexCollection();
        } catch (final XMLDBException xe) {
            logger.error("Unable to reindex collection", xe);
            return BooleanValue.FALSE;
        }
View Full Code Here

   
  /**
   * @throws XMLDBException
   */
  protected void configureCollection(String config) throws XMLDBException {
    IndexQueryService idxConf = (IndexQueryService)
      testCollection.getService("IndexQueryService", "1.0");
    idxConf.configureCollection(config);
  }
View Full Code Here

      CollectionManagementService service =
        (CollectionManagementService) root.getService("CollectionManagementService", "1.0");
      testCollection = service.createCollection("test");
      Assert.assertNotNull(testCollection);

            IndexQueryService idxConf = (IndexQueryService) testCollection.getService("IndexQueryService", "1.0");
            idxConf.configureCollection(COLLECTION_CONFIG);
           
            XMLResource resource = (XMLResource) testCollection.createResource("test.xml", "XMLResource");
            resource.setContent(XML);
            testCollection.storeResource(resource);
View Full Code Here

TOP

Related Classes of org.exist.xmldb.IndexQueryService

Copyright © 2018 www.massapicom. 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.