Interface IDataStreamStore

All Superinterfaces:
IDataStore<DataStreamKey,IDataStreamInfo,IDataStreamStore.DataStreamInfoField,DataStreamFilter>, IResourceStore<DataStreamKey,IDataStreamInfo,IDataStreamStore.DataStreamInfoField,DataStreamFilter>, Map<DataStreamKey,IDataStreamInfo>
All Known Implementing Classes:
EmptyDataStreamStore

Generic interface for managing data streams within an observation store.
Removal operations also remove all observations associated to a data stream.

  • Method Details

    • filterBuilder

      default DataStreamFilter.Builder filterBuilder()
      Specified by:
      filterBuilder in interface IResourceStore<DataStreamKey,IDataStreamInfo,IDataStreamStore.DataStreamInfoField,DataStreamFilter>
      Returns:
      A builder for a filter compatible with this datastore
    • add

      Add a new data stream and generate a new unique key for it.
      If the datastream valid time is not set, it will be set to the valid time of the parent system.
      Specified by:
      add in interface IResourceStore<DataStreamKey,IDataStreamInfo,IDataStreamStore.DataStreamInfoField,DataStreamFilter>
      Parameters:
      dsInfo - The data stream info object to be stored
      Returns:
      The key associated with the new data stream
      Throws:
      DataStoreException - if a datastream with the same parent system, output name and valid time already exists, or if the parent system is unknown.
    • getLatestVersionKey

      default DataStreamKey getLatestVersionKey(String sysUID, String outputName)
      Helper method to retrieve the internal ID of the latest version of the data stream corresponding to the specified system and output.
      Parameters:
      sysUID - Unique ID of system producing the data stream
      outputName - Name of output generating the data stream
      Returns:
      The datastream key or null if none was found
    • getLatestVersion

      default IDataStreamInfo getLatestVersion(String sysUID, String outputName)
      Helper method to retrieve the latest version of the data stream corresponding to the specified system and output.
      Parameters:
      sysUID - Unique ID of system producing the data stream
      outputName - Name of output generating the data stream
      Returns:
      The datastream info or null if none was found
    • getLatestVersionEntry

      default Map.Entry<DataStreamKey,IDataStreamInfo> getLatestVersionEntry(String sysUID, String outputName)
      Helper method to retrieve the entry for the latest version of the data stream corresponding to the specified system and output.
      Parameters:
      sysUID - Unique ID of system producing the data stream
      outputName - Name of output generating the data stream
      Returns:
      The datastream entry or null if none was found
    • removeAllVersions

      default long removeAllVersions(String sysUID, String outputName)
      Remove all datastreams that are associated to the given system output
      Parameters:
      sysUID -
      outputName -
      Returns:
      The number of entries actually removed
    • linkTo

      void linkTo(ISystemDescStore systemStore)
      Link this store to a system store to enable JOIN queries
      Parameters:
      systemStore -
    • remove

      IDataStreamInfo remove(Object key)
      Remove the datastream mapped to the given key and all observations associated to it.
      Specified by:
      remove in interface Map<DataStreamKey,IDataStreamInfo>