Package org.apache.xindice.client.xmldb.services

Examples of org.apache.xindice.client.xmldb.services.CollectionManager.createCollection()


              filEle.setAttribute("maxkeysize", (String)table.get(XMLTools.MAX_KEY_SIZE) );
           }
          
           colEle.appendChild(filEle);
          
           tempcol = colman.createCollection(newcol, doc);
       

            System.out.println("Created : " + table.get(XMLTools.COLLECTION) + "/" + newcol);
         } else {
            System.out.println("ERROR : Collection Context and New Collection name required");
View Full Code Here


      CollectionManager service = (CollectionManager) col.getService("CollectionManager", "1.0");

      String collectionConfig = "<collection compressed=\"true\" name=\"" + name + "\">" +
            "   <filer class=\"org.apache.xindice.core.filer.BTreeFiler\" gzip=\"true\"/>" +
            "</collection>";
      return service.createCollection(name, DOMParser.toDocument(collectionConfig));
   }

   public Collection getCollection(String path)
         throws Exception {
      return DatabaseManager.getCollection(driver + "/" + path);
View Full Code Here

          + COLLECTION_NAME
          + "\">"
          + "   <filer class=\"org.apache.xindice.core.filer.BTreeFiler\" gzip=\"true\"/>"
          + "</collection>";

      service.createCollection(COLLECTION_NAME, DOMParser.toDocument(collectionConfig));

      System.out.println("Collection " + COLLECTION_NAME + " created.");
    }
    catch (XMLDBException e) {
      System.err.println("XML:DB Exception occured " + e.errorCode + " " + e.getMessage());
View Full Code Here

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

    public Collection getCollection(String path) throws Exception {
        return DatabaseManager.getCollection(driver + "/" + path);
    }
View Full Code Here

                    filEle.setAttribute("maxkeysize", (String) table.get(XMLTools.MAX_KEY_SIZE));
                }

                colEle.appendChild(filEle);

                tempcol = colman.createCollection(newcol, doc);


                System.out.println("Created : " + table.get(XMLTools.COLLECTION) + "/" + newcol);
            } else {
                System.out.println("ERROR : Collection Context and New Collection name required");
View Full Code Here

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

    public Collection getCollection(String path) throws Exception {
        return DatabaseManager.getCollection(driver + "/" + path);
    }
View Full Code Here

                  filEle.setAttribute(XMLTools.PAGE_COUNT, (String) table.get(XMLTools.PAGE_COUNT));
                }

                colEle.appendChild(filEle);

                tempcol = colman.createCollection(colPath, doc);

                System.out.println("Created : " + table.get(XMLTools.COLLECTION) + "/" + colPath);
            } else {
                System.out.println("ERROR : Collection Context and New Collection name required");
            }
View Full Code Here

            String collectionConfig =
                "<collection compressed=\"true\" name=\"" + COLLECTION_NAME + "\">"
                    + "   <filer class=\"org.apache.xindice.core.filer.BTreeFiler\"/>"
                    + "</collection>";

            service.createCollection(COLLECTION_NAME, DOMParser.toDocument(collectionConfig));

            System.out.println("Collection " + COLLECTION_NAME + " created.");
        } catch (XMLDBException e) {
            System.err.println("XML:DB Exception occured " + e.errorCode + " " + e.getMessage());
        } finally {
View Full Code Here

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

    public Collection getCollection(String path) throws Exception {
        return DatabaseManager.getCollection(driver + "/" + path);
    }
View Full Code Here

                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

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.