Search in sources :

Example 1 with NodeIdKeyCreator

use of com.bbn.parliament.jena.graph.index.spatial.persistence.NodeIdKeyCreator in project parliament by SemWebCentral.

the class SpatialIndex method openDB.

private void openDB() throws SpatialIndexException {
    try {
        Transaction t = env.beginTransaction(null, null);
        catalogDb = env.openDatabase(t, CATALOG_DB, dbConfig);
        catalog = new StoredClassCatalog(catalogDb);
        db = env.openDatabase(t, DATA_DB, dbConfig);
        secConfig.setKeyCreator(new NodeIdKeyCreator(catalog));
        nodeDb = env.openSecondaryDatabase(t, ID_NODE_INDEX, db, secConfig);
        t.commit();
    } catch (Exception ex) {
        throw new SpatialIndexException(this, "Error opening databases", ex);
    }
    createMaps();
}
Also used : Transaction(com.sleepycat.je.Transaction) StoredClassCatalog(com.sleepycat.bind.serial.StoredClassCatalog) NodeIdKeyCreator(com.bbn.parliament.jena.graph.index.spatial.persistence.NodeIdKeyCreator) IndexException(com.bbn.parliament.jena.graph.index.IndexException) DatabaseException(com.sleepycat.je.DatabaseException) ParseException(org.locationtech.jts.io.ParseException) EnvironmentLockedException(com.sleepycat.je.EnvironmentLockedException)

Aggregations

IndexException (com.bbn.parliament.jena.graph.index.IndexException)1 NodeIdKeyCreator (com.bbn.parliament.jena.graph.index.spatial.persistence.NodeIdKeyCreator)1 StoredClassCatalog (com.sleepycat.bind.serial.StoredClassCatalog)1 DatabaseException (com.sleepycat.je.DatabaseException)1 EnvironmentLockedException (com.sleepycat.je.EnvironmentLockedException)1 Transaction (com.sleepycat.je.Transaction)1 ParseException (org.locationtech.jts.io.ParseException)1