Package org.xmldb.api.base

Examples of org.xmldb.api.base.Collection


   }

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

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


      service.dropCollection(name);
   }

   public String[] listCollections(String path)
         throws Exception {
      Collection col = DatabaseManager.getCollection(driver + "/" + path);
      return col.listChildCollections();
   }
View Full Code Here

      return col.listChildCollections();
   }

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

   public void createIndexer(String path,
                             String name,
                             String indexdef)
         throws Exception {
      Collection col = DatabaseManager.getCollection(driver + "/" + path);
      CollectionManager service = (CollectionManager) col.getService("CollectionManager", "1.0");

      service.createIndexer(DOMParser.toDocument(indexdef));
   }
View Full Code Here

      service.createIndexer(DOMParser.toDocument(indexdef));
   }

   public String[] listIndexes(String path)
         throws Exception {
      Collection col = DatabaseManager.getCollection(driver + "/" + path);
      CollectionManager service = (CollectionManager) col.getService("CollectionManager", "1.0");

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

   }

   public void dropIndexer(String path,
                           String name)
         throws Exception {
      Collection col = DatabaseManager.getCollection(driver + "/" + path);
      CollectionManager service = (CollectionManager) col.getService("CollectionManager", "1.0");

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

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

      XMLResource document = (XMLResource) col.createResource(name, "XMLResource");
      document.setContent(doc);
      col.storeResource(document);
   }
View Full Code Here

      col.storeResource(document);
   }

   public int countDocument(String path)
         throws Exception {
      Collection col = DatabaseManager.getCollection(driver + "/" + path);

      return col.getResourceCount();
   }
View Full Code Here

   }

   public String getDocument(String path,
                             String name)
         throws Exception {
      Collection col = DatabaseManager.getCollection(driver + "/" + path);
      XMLResource document = (XMLResource) col.getResource(name);

      if (document == null) {
         return null;
      }
View Full Code Here

      return document.getContent().toString();
   }

   public String[] listDocuments(String path)
         throws Exception {
      Collection col = DatabaseManager.getCollection(driver + "/" + path);
      return col.listResources();
   }
View Full Code Here

TOP

Related Classes of org.xmldb.api.base.Collection

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.