Package org.sensorhub.api.datastore.obs
Interface IObsStore
- All Superinterfaces:
IDataStore<BigId,
,IObsData, IObsStore.ObsField, ObsFilter> Map<BigId,
IObsData>
- All Known Implementing Classes:
EmptyObsStore
Generic interface for data stores containing observations.
Observations are organized into data streams. Each data stream contains observations sharing the same result type (i.e. record structure).
Observations retrieved by select methods are sorted by phenomenon time and grouped by result time when several result times are requested.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionAdd an observation to the datastoredefault ObsFilter.Builder
getStatistics
(ObsStatsQuery query) Select statistics for systems and FOI matching the queryvoid
Link this store to a feature of interest store to enable JOIN queriesdefault ObsFilter
selectObservedFois
(ObsFilter filter) Select all FOIs for which observation matching the filter are availableselectResults
(ObsFilter filter) Select all observations matching the query and return result datablocks onlyMethods inherited from interface org.sensorhub.api.datastore.IDataStore
backup, commit, containsKey, containsValue, countMatchingEntries, entrySet, getDatastoreName, getNumRecords, isEmpty, isReadOnly, keySet, putAll, removeEntries, restore, select, select, select, selectEntries, selectEntries, selectEntries, selectKeys, size, values
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, equals, forEach, get, getOrDefault, hashCode, merge, put, putIfAbsent, remove, remove, replace, replace, replaceAll
-
Method Details
-
getDataStreams
IDataStreamStore getDataStreams()- Returns:
- Interface to manage data streams
-
add
Add an observation to the datastore- Parameters:
obs
-- Returns:
- The auto-generated ID
-
selectResults
Select all observations matching the query and return result datablocks only- Parameters:
filter
- Observation filter- Returns:
- Stream of result data blocks
-
selectObservedFois
Select all FOIs for which observation matching the filter are available- Parameters:
filter
-- Returns:
- Stream of FOI internal IDs
-
getStatistics
Select statistics for systems and FOI matching the query- Parameters:
query
- filter to select desired systems and FOIs- Returns:
- stream of statistics buckets. Each item represents statistics for observations collected for a combination of system, feature of interest, and result time.
-
filterBuilder
- Returns:
- A builder for a filter compatible with this datastore
-
selectAllFilter
- Specified by:
selectAllFilter
in interfaceIDataStore<BigId,
IObsData, IObsStore.ObsField, ObsFilter> - Returns:
- The filter to use to select all records
-
linkTo
Link this store to a feature of interest store to enable JOIN queries- Parameters:
foiStore
-
-