Search in sources :

Example 1 with BasicQueryByClass

use of org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass in project geowave by locationtech.

the class ChooseLocalityPreservingQueryStrategyTest method testChooseTemporalWithoutStatsHouseHour.

@Test
public void testChooseTemporalWithoutStatsHouseHour() {
    final ChooseLocalityPreservingQueryStrategy strategy = new ChooseLocalityPreservingQueryStrategy();
    final Iterator<Index> it = getIndices(new BasicQueryByClass(createConstraints(HOUSE, HOUSE, HOUR)), strategy);
    assertTrue(it.hasNext());
    assertEquals(indices.get(1).getName(), it.next().getName());
    assertFalse(it.hasNext());
}
Also used : NullIndex(org.locationtech.geowave.core.store.index.NullIndex) Index(org.locationtech.geowave.core.store.api.Index) BasicQueryByClass(org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass) Test(org.junit.Test)

Example 2 with BasicQueryByClass

use of org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass in project geowave by locationtech.

the class ChooseLocalityPreservingQueryStrategyTest method testChooseTemporalWithoutStatsCityDay.

@Test
public void testChooseTemporalWithoutStatsCityDay() {
    final ChooseLocalityPreservingQueryStrategy strategy = new ChooseLocalityPreservingQueryStrategy();
    final Iterator<Index> it = getIndices(new BasicQueryByClass(createConstraints(CITY, CITY, DAY)), strategy);
    assertTrue(it.hasNext());
    assertEquals(indices.get(1).getName(), it.next().getName());
    assertFalse(it.hasNext());
}
Also used : NullIndex(org.locationtech.geowave.core.store.index.NullIndex) Index(org.locationtech.geowave.core.store.api.Index) BasicQueryByClass(org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass) Test(org.junit.Test)

Example 3 with BasicQueryByClass

use of org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass in project geowave by locationtech.

the class ChooseLocalityPreservingQueryStrategyTest method testChooseSpatialWithoutStatsHouseDay.

@Test
public void testChooseSpatialWithoutStatsHouseDay() {
    final ChooseLocalityPreservingQueryStrategy strategy = new ChooseLocalityPreservingQueryStrategy();
    final Iterator<Index> it = getIndices(new BasicQueryByClass(createConstraints(HOUSE, HOUSE, DAY)), strategy);
    assertTrue(it.hasNext());
    assertEquals(indices.get(3).getName(), it.next().getName());
    assertFalse(it.hasNext());
}
Also used : NullIndex(org.locationtech.geowave.core.store.index.NullIndex) Index(org.locationtech.geowave.core.store.api.Index) BasicQueryByClass(org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass) Test(org.junit.Test)

Example 4 with BasicQueryByClass

use of org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass in project geowave by locationtech.

the class ChooseLocalityPreservingQueryStrategyTest method testChooseTemporalWithoutStatsBlockDay.

@Test
public void testChooseTemporalWithoutStatsBlockDay() {
    final ChooseLocalityPreservingQueryStrategy strategy = new ChooseLocalityPreservingQueryStrategy();
    final Iterator<Index> it = getIndices(new BasicQueryByClass(createConstraints(BLOCK, BLOCK, DAY)), strategy);
    assertTrue(it.hasNext());
    assertEquals(indices.get(1).getName(), it.next().getName());
    assertFalse(it.hasNext());
}
Also used : NullIndex(org.locationtech.geowave.core.store.index.NullIndex) Index(org.locationtech.geowave.core.store.api.Index) BasicQueryByClass(org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass) Test(org.junit.Test)

Example 5 with BasicQueryByClass

use of org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass in project geowave by locationtech.

the class ChooseHeuristicMatchQueryStrategyTest method testChooseSpatialWithoutStatsCityWeek.

@Test
public void testChooseSpatialWithoutStatsCityWeek() {
    final ChooseHeuristicMatchIndexQueryStrategy strategy = new ChooseHeuristicMatchIndexQueryStrategy();
    final Iterator<Index> it = getIndices(null, new BasicQueryByClass(createConstraints(CITY, CITY, WEEK)), strategy);
    assertTrue(it.hasNext());
    assertEquals(indices.get(1).getName(), it.next().getName());
    assertFalse(it.hasNext());
}
Also used : NullIndex(org.locationtech.geowave.core.store.index.NullIndex) Index(org.locationtech.geowave.core.store.api.Index) BasicQueryByClass(org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass) Test(org.junit.Test)

Aggregations

BasicQueryByClass (org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass)27 Test (org.junit.Test)23 Index (org.locationtech.geowave.core.store.api.Index)23 NullIndex (org.locationtech.geowave.core.store.index.NullIndex)19 ConstraintsByClass (org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass.ConstraintsByClass)5 MultiDimensionalNumericData (org.locationtech.geowave.core.index.numeric.MultiDimensionalNumericData)4 ConstraintData (org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass.ConstraintData)4 ConstraintSet (org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass.ConstraintSet)4 ArrayList (java.util.ArrayList)3 BasicNumericDataset (org.locationtech.geowave.core.index.numeric.BasicNumericDataset)3 NumericData (org.locationtech.geowave.core.index.numeric.NumericData)3 SimpleFeature (org.opengis.feature.simple.SimpleFeature)3 HashMap (java.util.HashMap)2 FeatureDataAdapter (org.locationtech.geowave.adapter.vector.FeatureDataAdapter)2 CloseableIterator (org.locationtech.geowave.core.store.CloseableIterator)2 CommonIndexedPersistenceEncoding (org.locationtech.geowave.core.store.data.CommonIndexedPersistenceEncoding)2 NumericDimensionField (org.locationtech.geowave.core.store.dimension.NumericDimensionField)2 BasicIndexModel (org.locationtech.geowave.core.store.index.BasicIndexModel)2 CustomNameIndex (org.locationtech.geowave.core.store.index.CustomNameIndex)2 IndexImpl (org.locationtech.geowave.core.store.index.IndexImpl)2