Search in sources :

Example 1 with MongoGeoTemporalIndexer

use of org.apache.rya.indexing.geotemporal.mongo.MongoGeoTemporalIndexer in project incubator-rya by apache.

the class MongoGeoTemporalIndexIT method ensureInEventStore_Test.

@Test
public void ensureInEventStore_Test() throws Exception {
    final Sail sail = GeoRyaSailFactory.getInstance(conf);
    final SailRepository repo = new SailRepository(sail);
    try (final MongoGeoTemporalIndexer indexer = new MongoGeoTemporalIndexer()) {
        indexer.setConf(conf);
        indexer.init();
        addStatements(repo.getConnection());
        final EventStorage events = indexer.getEventStorage();
        final RyaURI subject = new RyaURI("urn:event1");
        final Optional<Event> event = events.get(subject);
        assertTrue(event.isPresent());
    } finally {
        sail.shutDown();
    }
}
Also used : MongoGeoTemporalIndexer(org.apache.rya.indexing.geotemporal.mongo.MongoGeoTemporalIndexer) RyaURI(org.apache.rya.api.domain.RyaURI) SailRepository(org.openrdf.repository.sail.SailRepository) Sail(org.openrdf.sail.Sail) Event(org.apache.rya.indexing.geotemporal.model.Event) EventStorage(org.apache.rya.indexing.geotemporal.storage.EventStorage) Test(org.junit.Test)

Aggregations

RyaURI (org.apache.rya.api.domain.RyaURI)1 Event (org.apache.rya.indexing.geotemporal.model.Event)1 MongoGeoTemporalIndexer (org.apache.rya.indexing.geotemporal.mongo.MongoGeoTemporalIndexer)1 EventStorage (org.apache.rya.indexing.geotemporal.storage.EventStorage)1 Test (org.junit.Test)1 SailRepository (org.openrdf.repository.sail.SailRepository)1 Sail (org.openrdf.sail.Sail)1