Package mil.nga.giat.geowave.store.adapter.statistics

Examples of mil.nga.giat.geowave.store.adapter.statistics.CountDataStatistics


    }
    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",
View Full Code Here


        Filter.INCLUDE)) {
      // GEOWAVE-60 optimization
      Map<ByteArrayId, DataStatistics<SimpleFeature>> statsMap = reader.getComponents().getDataStatistics(
          reader.getTransaction());
      if (statsMap.containsKey(CountDataStatistics.STATS_ID)) {
        CountDataStatistics stats = (CountDataStatistics) statsMap.get(CountDataStatistics.STATS_ID);
        if (stats != null && stats.isSet()) return (int) stats.getCount();
      }
    }
    else if (query.getFilter().equals(
        Filter.EXCLUDE)) {
      return 0;
View Full Code Here

    if (BoundingBoxDataStatistics.STATS_ID.equals(statisticsId)) {
      return new FeatureBoundingBoxStatistics(
          getAdapterId());
    }
    else if (CountDataStatistics.STATS_ID.equals(statisticsId)) {
      return new CountDataStatistics(
          getAdapterId());
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of mil.nga.giat.geowave.store.adapter.statistics.CountDataStatistics

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.