cleanup();
}
private static DocumentImpl storeDocument(Txn txn, DBBroker broker, Collection col, XmldbURI uri, String data) throws TriggerException, EXistException, PermissionDeniedException, SAXException, LockException, IOException {
System.out.println("STORING DOCUMENT....");
IndexInfo info = col.validateXMLResource(txn, broker, uri.lastSegment(), data);
assertNotNull(info);
System.out.println("STORING DOCUMENT....SECOND ROUND....");
col.store(txn, broker, info, data, false);
assertNotNull(info.getDocument());
System.out.println("STORING DOCUMENT....DONE.");
return info.getDocument();
}