TemporalRange, even though a public class, is intended as an internally used class. The query classes are intended to be the public API.
Please see mil.nga.giat.geowave.examples.query.GeoTemporalQueryExample under the examples sub-project.
Are you using time ranges (start & end) or a single time value in your feature data? On range data, the default query operator is 'overlaps'. You can change the operator provided to the query constructor (CompareOperation.CONTAINS).
What type of index are using, Spatial Temporal? SpatialTemporalQuery and TemporalQuery are only applicable to Spatial Temporal indices. The alternative is to use a CQL filter with a Spatial index. The CQL filter is provided to the VectorDataStore.query method in the 'filter' argument.
The following example demonstrates the creation of an opengis Filter.
org.geotools.filter.text.cql2.CQL.CQL.toFilter("someTimeVariable during 2005-05-19T20:32:56Z/2005-05-19T21:32:56Z");
What type of query are you using, SpatialTemporalQuery or TemporalQuery?
Here is an example:
final SpatialTemporalQuery query = new SpatialTemporalQuery(
df.parse("2005-05-17T19:32:56GMT-00:00"),
df.parse("2005-05-17T22:32:56GMT-00:00"),
factory.createPolygon(new Coordinate[] {
new Coordinate(
24,
33),
new Coordinate(
28,
33),
new Coordinate(
28,
37),
new Coordinate(
24,
37),
new Coordinate(
24,
33)
}),
CompareOperation.CONTAINS);