if (resource != null) {
Database database = wiki.database();
// Note that database.schema() is a copy of databaseSchema that has been read back from the database
// after being loaded in when we created new database above.
// We should really deal with the target path separately, e.g. via extra text field
XMLDocumentImportReader reader = new XMLDocumentImportReader(resource,
database.schema(),
path, user, false, false);
ImportHandler importHandler = database.createImportHandler(con);
reader.setImportHandler(importHandler);
reader.start();
}
} catch (java.sql.SQLException sqlException) {
con.rollback();
con.close();
throw new WikiFatalException(sqlException);