Class DataStreamInfo

java.lang.Object
org.sensorhub.api.data.DataStreamInfo
All Implemented Interfaces:
IDataStreamInfo, IResource

public class DataStreamInfo extends Object implements IDataStreamInfo

Immutable object containing information about a data stream of observations.

This class is mainly useful for creating new datastreams as it does not provide dynamic timing information (i.e. getPhenomenonTimeRange() and getResultTimeRange() both return a fixed arbitrary value). A full implementation must extend or wrap this class and implement these methods to compute correct values based on actual data available from the data store.

  • Field Details

    • name

      protected String name
    • description

      protected String description
    • systemID

      protected FeatureId systemID
    • procedureID

      protected FeatureId procedureID
    • deploymentID

      protected FeatureId deploymentID
    • featureOfInterestID

      protected FeatureId featureOfInterestID
    • samplingFeatureID

      protected FeatureId samplingFeatureID
    • validTime

      protected TimeExtent validTime
    • phenomenonTimeInterval

      protected Duration phenomenonTimeInterval
    • resultTimeInterval

      protected Duration resultTimeInterval
    • recordStruct

      protected DataComponent recordStruct
    • recordEncoding

      protected DataEncoding recordEncoding
  • Constructor Details

    • DataStreamInfo

      public DataStreamInfo()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface IResource
      Returns:
      The resource name
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface IResource
      Returns:
      A short description of the resource
    • getSystemID

      public FeatureId getSystemID()
      Specified by:
      getSystemID in interface IDataStreamInfo
      Returns:
      The identifier of the system that produces this data stream
    • getOutputName

      public String getOutputName()
      Specified by:
      getOutputName in interface IDataStreamInfo
      Returns:
      The name of the system output that is/was the source of this data stream
    • getProcedureID

      public FeatureId getProcedureID()
      Specified by:
      getProcedureID in interface IDataStreamInfo
      Returns:
      A reference to the procedure associated to this datastream. (only provided if all observations in the datastream share the same procedure)
    • getDeploymentID

      public FeatureId getDeploymentID()
      Specified by:
      getDeploymentID in interface IDataStreamInfo
      Returns:
      A reference to the deployment associated to this datastream. (only provided if all observations in the datastream were produced during the same deployment)
    • getFeatureOfInterestID

      public FeatureId getFeatureOfInterestID()
      Specified by:
      getFeatureOfInterestID in interface IDataStreamInfo
      Returns:
      A reference to the ultimate feature of interest associated to this datastream. (only provided if all observations in the datastream share the same feature of interest)
    • getSamplingFeatureID

      public FeatureId getSamplingFeatureID()
      Specified by:
      getSamplingFeatureID in interface IDataStreamInfo
      Returns:
      A reference to the sampling feature associated to this datastream. (only provided if all observations in the datastream share the same sampling feature)
    • getValidTime

      public TimeExtent getValidTime()
      Specified by:
      getValidTime in interface IDataStreamInfo
      Returns:
      The time of validity of this datastream. This corresponds to the time during which the corresponding system output actually existed.
    • getPhenomenonTimeRange

      public TimeExtent getPhenomenonTimeRange()
      Specified by:
      getPhenomenonTimeRange in interface IDataStreamInfo
      Returns:
      The range of phenomenon times of observations that are part of this datastream, or null if no observations have been recorded yet.
    • getPhenomenonTimeInterval

      public Duration getPhenomenonTimeInterval()
      Specified by:
      getPhenomenonTimeInterval in interface IDataStreamInfo
      Returns:
      The average interval between two observation phenomenon times, or null if unknown or highly variable.
    • getResultTimeRange

      public TimeExtent getResultTimeRange()
      Specified by:
      getResultTimeRange in interface IDataStreamInfo
      Returns:
      The range of result times of observations that are part of this datastream, or null if no observations have been recorded yet.
    • getResultTimeInterval

      public Duration getResultTimeInterval()
      Specified by:
      getResultTimeInterval in interface IDataStreamInfo
      Returns:
      The average interval between two observation result times, or null if unknown or highly variable.
    • hasDiscreteResultTimes

      public boolean hasDiscreteResultTimes()
      Specified by:
      hasDiscreteResultTimes in interface IDataStreamInfo
      Returns:
      True if this datastream contains observations acquired for a discrete number of result times (e.g. model runs, test campaigns, etc.)
    • getDiscreteResultTimes

      public Map<Instant,TimeExtent> getDiscreteResultTimes()
      Specified by:
      getDiscreteResultTimes in interface IDataStreamInfo
      Returns:
      A map of discrete result times to the phenomenon time range of all observations whose result was produced at each result time, or an empty map if IDataStreamInfo.hasDiscreteResultTimes() returns true.
    • getRecordStructure

      public DataComponent getRecordStructure()
      Specified by:
      getRecordStructure in interface IDataStreamInfo
      Returns:
      The data stream record structure
    • getRecordEncoding

      public DataEncoding getRecordEncoding()
      Specified by:
      getRecordEncoding in interface IDataStreamInfo
      Returns:
      The recommended encoding for the data stream