Class ObsData

java.lang.Object
org.sensorhub.api.data.ObsData
All Implemented Interfaces:
IObsData

public class ObsData extends Object implements IObsData

Immutable object representing observation data and that can be stored in an observation datastore.

  • Field Details

    • dataStreamID

      protected BigId dataStreamID
    • foiID

      protected BigId foiID
    • resultTime

      protected Instant resultTime
    • phenomenonTime

      protected Instant phenomenonTime
    • parameters

      protected Map<String,Object> parameters
    • phenomenonLocation

      protected org.locationtech.jts.geom.Geometry phenomenonLocation
    • result

      protected DataBlock result
  • Constructor Details

    • ObsData

      protected ObsData()
  • Method Details

    • getDataStreamID

      public BigId getDataStreamID()
      Specified by:
      getDataStreamID in interface IObsData
      Returns:
      The internal ID of the data stream that the observation is part of.
    • getFoiID

      public BigId getFoiID()
      Specified by:
      getFoiID in interface IObsData
      Returns:
      The ID of the feature of interest that was observed.
      This can be 0 if no feature of interest was reported.
    • getPhenomenonTime

      public Instant getPhenomenonTime()
      Specified by:
      getPhenomenonTime in interface IObsData
      Returns:
      The time of occurrence of the measured phenomenon (e.g. for many automated sensor devices, this is typically the sampling time).
      This field cannot be null.
    • getResultTime

      public Instant getResultTime()
      Specified by:
      getResultTime in interface IObsData
      Returns:
      The time at which the observation result was obtained.
      This is typically the same as the phenomenon time for many automated in-situ and remote sensors doing the sampling and actual measurement (almost) simultaneously, but different for measurements made in a lab on samples that were collected previously. It is also different for models and simulations outputs (e.g. for a model, this is the run time).
      If no result time was explicitly set, this returns the phenomenon time
    • getParameters

      public Map<String,Object> getParameters()
      Specified by:
      getParameters in interface IObsData
      Returns:
      Observation parameters map
    • getPhenomenonLocation

      public org.locationtech.jts.geom.Geometry getPhenomenonLocation()
      Specified by:
      getPhenomenonLocation in interface IObsData
      Returns:
      Area or volume (2D or 3D) where the observation was made.
      If value is null, FoI geometry is used instead when provided. If neither geometry is provided, observation will never be selected when filtering on geometry.
      In a given data store, all geometries must be expressed in the same coordinate reference system.
    • getResult

      public DataBlock getResult()
      Specified by:
      getResult in interface IObsData
      Returns:
      Observation result data record
    • toString

      public String toString()
      Overrides:
      toString in class Object