in = new GZIPInputStream(inputURL.openStream());
} else {
in = inputURL.openStream();
}
// 2. parse to infer schema
StructureParser structureParser = new StructureParser();
new SAXCallbackInputHandler(structureParser, false).parse(in, false, false);
in.close();
if (structureParser.hasException()) {
throw structureParser.getException();
}
DatabaseSchema databaseSchema = structureParser.getDatabaseSchema(path);
// register the database with the server
server.registerDatabase(name, title, path, inputURL, databaseSchema, server.users().get(user), 1, 0);
} catch (Exception exception) {
exception.printStackTrace();