Examples of CollectionManager


Examples of org.apache.xindice.client.xmldb.services.CollectionManager

    public Collection createCollection(String parent, String path, Document configuration) throws Exception {
        Collection col = DatabaseManager.getCollection(driver + "/" + parent);
        if (col == null) {
            throw new XindiceException("DatabaseManager.getCollection(" + driver + "/" + parent + ") returned null");
        }
        CollectionManager service = (CollectionManager) col.getService("CollectionManager", "1.0");
        return service.createCollection(path, configuration);
    }
View Full Code Here

Examples of org.apache.xindice.client.xmldb.services.CollectionManager

    public void dropCollection(String path, String name) throws Exception {
        Collection col = DatabaseManager.getCollection(driver + "/" + path);

        if (col != null) {
            CollectionManager service = (CollectionManager) col.getService("CollectionManager", "1.0");
            service.dropCollection(name);
        }
    }
View Full Code Here

Examples of org.apache.xindice.client.xmldb.services.CollectionManager

    public void createIndexer(String path, Document indexDoc) throws Exception {
        Collection col = DatabaseManager.getCollection(driver + "/" + path);
        if (col == null) {
            throw new XindiceException("DatabaseManager.getCollection(" + driver + "/" + path + ") returned null");
        }
        CollectionManager service = (CollectionManager) col.getService("CollectionManager", "1.0");

        service.createIndexer(indexDoc);
    }
View Full Code Here

Examples of org.apache.xindice.client.xmldb.services.CollectionManager

    public String[] listIndexes(String path) throws Exception {
        Collection col = DatabaseManager.getCollection(driver + "/" + path);
        if (col == null) {
            throw new XindiceException("DatabaseManager.getCollection(" + driver + "/" + path + ") returned null");
        }
        CollectionManager service = (CollectionManager) col.getService("CollectionManager", "1.0");

        return service.listIndexers();
    }
View Full Code Here

Examples of org.apache.xindice.client.xmldb.services.CollectionManager

    public void dropIndexer(String path, String name) throws Exception {
        Collection col = DatabaseManager.getCollection(driver + "/" + path);
        if (col == null) {
            throw new XindiceException("DatabaseManager.getCollection(" + driver + "/" + path + ") returned null");
        }
        CollectionManager service = (CollectionManager) col.getService("CollectionManager", "1.0");

        service.dropIndexer(name);
    }
View Full Code Here

Examples of org.apache.xindice.client.xmldb.services.CollectionManager

                System.out.println("ERROR : Collection not found!");
                return false;
            }

            // Create an instance of the collection manager and create the collection
            CollectionManager colman = (CollectionManager) col.getService("CollectionManager", XMLDBAPIVERSION);

            String colPath;
            if (!"".equals(table.getString(XMLTools.FILE_PATH))) {
                colPath = config.getDocumentElement().getAttributeNode("name").getNodeValue();
            } else {
                colPath = table.getString(XMLTools.NAME_OF);
            }

            tempcol = colman.createCollection(colPath, config);

            System.out.println("Created : " + table.getString(XMLTools.COLLECTION) + "/" + colPath);
        } finally {
            // Release the collection objects
            if (col != null) {
View Full Code Here

Examples of org.apache.xindice.client.xmldb.services.CollectionManager

                System.out.println("ERROR : Collection not found!");
                return false;
            }

            // Create a collection manager instance for the parent of the collection
            CollectionManager colman = (CollectionManager) col.getService("CollectionManager", XMLDBAPIVERSION);

            String[] idx = colman.listIndexers();

            System.out.println("Indexes:\n");

            for (int i = 0; i < idx.length; i++) {
                System.out.println(idx[i]);
View Full Code Here

Examples of org.apache.xindice.client.xmldb.services.CollectionManager

                System.out.println("ERROR : Collection not found!");
                return false;
            }

            // Create a collection manager instance for the collection
            CollectionManager colman = (CollectionManager) col.getService("CollectionManager", XMLDBAPIVERSION);

            colman.dropIndexer(table.getString(XMLTools.NAME_OF));
            System.out.println("DELETED: " + table.getString(XMLTools.NAME_OF));
        } finally {
            if (col != null) {
                col.close();
            }
View Full Code Here

Examples of org.apache.xindice.core.CollectionManager

         Element filEle = doc.createElement("filer");
         filEle.setAttribute("class", "org.apache.xindice.core.filer.BTreeFiler");
         colEle.appendChild(filEle);
      }
     
      CollectionManager colman = getCollection((String) message.get(COLLECTION));

      Configuration config = new Configuration(doc.getDocumentElement(),false);    
      colman.createCollection( (String) message.get(NAME), config );

      Hashtable result = new Hashtable();
      result.put(RESULT, (String) message.get(NAME));
      return result;
   }
View Full Code Here

Examples of org.apache.xindice.core.CollectionManager

            Element filEle = doc.createElement("filer");
            filEle.setAttribute("class", "org.apache.xindice.core.filer.BTreeFiler");
            colEle.appendChild(filEle);
        }

        CollectionManager colman = getCollection((String) message.get(COLLECTION));

        Configuration config = new Configuration(doc.getDocumentElement(), false);
        colman.createCollection((String) message.get(NAME), config);

        Hashtable result = new Hashtable();
        result.put(RESULT, message.get(NAME));
        return result;
    }
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.