// collection = getCollection("xmldb:xindice:///db/");
collection = getCollection("xmldb:xindice://localhost:8888/db/");
// 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.
}
// Build up the Collection XML configuration.
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 {