Package mil.nga.giat.geowave.store

Examples of mil.nga.giat.geowave.store.CloseableIterator


        visWriterBBB).get(
        0);

    final SpatialQuery query = new SpatialQuery(
        testGeoFilter);
    CloseableIterator it1 = mockDataStore.query(
        adapter,
        index,
        query,
        -1,
        "aaa",
        "bbb");
    int count = 0;
    while (it1.hasNext()) {
      it1.next();
      count++;
    }
    assertEquals(
        3,
        count);

    CountDataStatistics countStats = (CountDataStatistics) this.statsStore.getDataStatistics(
        adapter.getAdapterId(),
        CountDataStatistics.STATS_ID,
        "aaa",
        "bbb");
    assertEquals(
        3,
        countStats.getCount());

    countStats = (CountDataStatistics) this.statsStore.getDataStatistics(
        adapter.getAdapterId(),
        CountDataStatistics.STATS_ID,
        "aaa");
    assertEquals(
        2,
        countStats.getCount());

    countStats = (CountDataStatistics) this.statsStore.getDataStatistics(
        adapter.getAdapterId(),
        CountDataStatistics.STATS_ID,
        "bbb");
    assertEquals(
        1,
        countStats.getCount());

    assertFalse(mockDataStore.deleteEntry(
        index,
        new ByteArrayId("test_pt_2".getBytes()),
        adapter.getAdapterId(),
        "aaa"));

    it1 = mockDataStore.query(adapter,
        index,
        query,
        -1,
        "aaa",
        "bbb");
    count = 0;
    while (it1.hasNext()) {
      it1.next();
      count++;
    }
    assertEquals(
        3,
        count);
   
    assertTrue(mockDataStore.deleteEntry(
        index,
        new ByteArrayId("test_pt".getBytes()),
        adapter.getAdapterId(),
        "aaa"));

    it1 = mockDataStore.query(adapter,
        index,
        query,
        -1,
        "aaa",
        "bbb");
    count = 0;
    while (it1.hasNext()) {
      it1.next();
      count++;
    }
    assertEquals(
        2,
        count);

    countStats = (CountDataStatistics) this.statsStore.getDataStatistics(
        adapter.getAdapterId(),
        CountDataStatistics.STATS_ID,
        "aaa");
    assertEquals(
        1,
        countStats.getCount());

    countStats = (CountDataStatistics) this.statsStore.getDataStatistics(
        adapter.getAdapterId(),
        CountDataStatistics.STATS_ID,
        "bbb");
    assertEquals(
        1,
        countStats.getCount());

    mockDataStore.deleteEntries(
        adapter,
        index,
        "aaa",
        "bbb");
    it1 = mockDataStore.query(adapter,
        index,
        query,
        -1,
        "aaa",
        "bbb");
    count = 0;
    while (it1.hasNext()) {
      it1.next();
      count++;
    }
    assertEquals(
        0,
        count);
View Full Code Here

TOP

Related Classes of mil.nga.giat.geowave.store.CloseableIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.