package org.warp.jcwdb.ann; import java.io.IOException; import java.nio.file.Path; public class JCWDatabase { private final DatabaseManager database; public JCWDatabase(Path dataFile, Path metadataFile) throws IOException { this.database = new DatabaseManager(this, dataFile, metadataFile); } public T loadRoot(Class rootClass) { try { return database.loadRoot(rootClass); } catch (IOException e) { throw new RuntimeException(e); } } DatabaseManager getDatabaseManager() { return database; } public void registerClass(Class clazz, int id) { database.registerClass(clazz, id); } public void close() throws IOException { database.close(); } }