Examples of dropCollection()


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

//            collection = getCollection("xmldb:xindice-embed:///db/");

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

            try{
                service.dropCollection(COLLECTION_NAME);
                System.out.println("Dropped existing collection with name: " + COLLECTION_NAME);
            }
            catch (Exception e) {
                ; // nothing, this may be the first pass.
            }
View Full Code Here

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

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

                // Drop the collection
                colman.dropCollection((String) table.get(XMLTools.NAME_OF));

                System.out.println("Deleted: " + table.get(XMLTools.COLLECTION) + "/" + (String) table.get(XMLTools.NAME_OF));
            } else
                System.out.println("Error : Collection Context and Name required");
View Full Code Here

Examples of org.apache.xindice.core.Collection.dropCollection()

       Hashtable result = new Hashtable();
      try {

          Collection col = getCollection( (String) message.get(COLLECTION)
                                      + "/" + (String) message.get(NAME));
          col.dropCollection( col );
          result.put(RESULT, "yes");

      } catch (Exception e) {

          /* No such collection... */
 
View Full Code Here

Examples of org.apache.xindice.core.Collection.dropCollection()

        Hashtable result = new Hashtable();
        try {
                       
            Collection col = getCollection((String) message.get(COLLECTION) + "/" + childName);
            col.dropCollection(col);
            result.put(RESULT, "yes");

        } catch (Exception e) {
            // FIXME "No such collection" is when col == null
            /* No such collection... */
 
View Full Code Here

Examples of org.apache.xindice.core.Collection.dropCollection()

                                     FaultCodes.COL_COLLECTION_NOT_FOUND,
                                     "Cannot remove child collection '" + childName + "': Parent collection '" + parentName + "' not found.");
        }

        final Hashtable result = new Hashtable();
        col.dropCollection(col.getCollection(childName));
        result.put(RESULT, "yes");
        return result;
    }
}
View Full Code Here

Examples of org.apache.xindice.core.Collection.dropCollection()

      if ( cm == null )
         throw new DBException(FaultCodes.DBE_CANNOT_DROP, "You Cannot Drop The Database");
     
      if ( cm != this )
         return cm.dropCollection(collection);
      else {
         String path = collection.getCanonicalName();
         final String name = collection.getName();
         boolean dropped = collection.drop();
         if ( dropped ) {
View Full Code Here

Examples of org.apache.xindice.core.Collection.dropCollection()

            throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION,
                                     FaultCodes.COL_COLLECTION_NOT_FOUND,
                                     "Cannot remove child collection '" + childName + "': Parent collection '" + parentName + "' not found.");
        }

        col.dropCollection(col.getCollection(childName));

        Map result = new HashMap(3);
        result.put(RESULT, "yes");
        return result;
    }
View Full Code Here

Examples of org.apache.xindice.core.Collection.dropCollection()

            if (overwrite) {
                // overwrites the collection
                String name = destCollection.getName();
                Collection parent = destCollection.getParentCollection();
                // delete collection
                parent.dropCollection(destCollection);
                results.putAll(copyCollection(col, parent, name, deep));
                if (results.size() == 0) {
                    results.put(dest, new Integer(WebdavStatus.SC_NO_CONTENT));
                }
            } else {
View Full Code Here

Examples of org.apache.xindice.core.Collection.dropCollection()

                                     FaultCodes.COL_COLLECTION_NOT_FOUND,
                                     "Cannot remove child collection '" + childName + "': Parent collection '" + parentName + "' not found.");
        }

        final Hashtable result = new Hashtable();
        col.dropCollection(col.getCollection(childName));
        result.put(RESULT, "yes");
        return result;
    }
}
View Full Code Here

Examples of org.springframework.data.mongodb.core.MongoTemplate.dropCollection()

public class DemoUtils {

  public static MongoDbFactory prepareMongoFactory(String... additionalCollectionToDrop) throws Exception{
    MongoDbFactory mongoDbFactory = new SimpleMongoDbFactory(new MongoClient(), "test");
    MongoTemplate template = new MongoTemplate(mongoDbFactory);
    template.dropCollection("messages");
    template.dropCollection("data");
    for (String additionalCollection : additionalCollectionToDrop) {
      template.dropCollection(additionalCollection);
    }
    return mongoDbFactory;
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.