Interface IFeatureStoreBase<V extends IFeature,VF extends IFeatureStoreBase.FeatureField,F extends FeatureFilterBase<? super V>>

Type Parameters:
V - Feature type
VF - Feature field enum type
F - Feature filter type
All Superinterfaces:
IDataStore<FeatureKey,V,VF,F>, IResourceStore<FeatureKey,V,VF,F>, Map<FeatureKey,V>
All Known Subinterfaces:
IDeploymentStore, IFeatureStore, IFoiStore, IProcedureStore, ISystemDescStore
All Known Implementing Classes:
EmptyDeploymentStore, EmptyFeatureBaseStore, EmptyFoiStore, EmptyProcedureStore, EmptySystemStore

public interface IFeatureStoreBase<V extends IFeature,VF extends IFeatureStoreBase.FeatureField,F extends FeatureFilterBase<? super V>> extends IResourceStore<FeatureKey,V,VF,F>

Base interface for data stores containing objects derived from IFeature.

  • Method Details

    • filterBuilder

      Specified by:
      filterBuilder in interface IResourceStore<FeatureKey,V extends IFeature,VF extends IFeatureStoreBase.FeatureField,F extends FeatureFilterBase<? super V>>
      Returns:
      A builder for a filter compatible with this datastore
    • add

      default FeatureKey add(V value) throws DataStoreException
      Add a new feature to the store, generating a new key for it.
      If a feature with the same UID already exists, a new version of the feature whose validity starts at the specified valid time is created and it shares the same internal ID with the previous version.
      Specified by:
      add in interface IResourceStore<FeatureKey,V extends IFeature,VF extends IFeatureStoreBase.FeatureField,F extends FeatureFilterBase<? super V>>
      Parameters:
      value - New feature object
      Returns:
      The newly allocated key (internal ID)
      Throws:
      DataStoreException - if a feature with the same UID and valid time already exists
    • add

      FeatureKey add(BigId parentID, V value) throws DataStoreException
      Add a new feature to the store, generating a new key for it, and also add it as a child of the specified parent
      Parameters:
      parentID - Internal ID of parent feature
      value - New feature object
      Returns:
      The newly allocated key (internal ID)
      Throws:
      DataStoreException - if a feature with the same UID and valid time already exists, or if the parent ID is unknown
    • contains

      default boolean contains(BigId internalID)
      Checks if store contains a feature with the given internal ID
      Parameters:
      internalID - The feature internal ID
      Returns:
      True if a feature with the given ID exists, false otherwise
    • contains

      default boolean contains(String uid)
      Checks if store contains a feature with the given unique ID
      Parameters:
      uid - The feature unique ID
      Returns:
      True if a feature with the given ID exists, false otherwise
    • getParent

      BigId getParent(BigId internalID)
      Get a feature's parent ID
      Parameters:
      internalID - Internal ID of feature
      Returns:
      Internal ID of parent feature or null if no feature with the given ID was found or the feature has no parent
    • getCurrentVersionEntry

      default Map.Entry<FeatureKey,V> getCurrentVersionEntry(String uid)
      Helper method to retrieve the entry corresponding to the current version of the feature with the given unique ID
      Parameters:
      uid - The feature unique ID
      Returns:
      The feature entry or null if no feature with the given ID was found
    • getCurrentVersionEntry

      default Map.Entry<FeatureKey,V> getCurrentVersionEntry(BigId internalID)
      Helper method to retrieve the entry corresponding to the current version of the feature with the given internal ID
      Parameters:
      internalID - The feature internal ID
      Returns:
      The feature entry or null if no feature with the given ID was found
    • getLatestEntry

      default Map.Entry<FeatureKey,V> getLatestEntry(Stream<Map.Entry<FeatureKey,V>> featureVersions)
    • getCurrentVersionKey

      default FeatureKey getCurrentVersionKey(String uid)
      Helper method to retrieve the full key corresponding to the current version of the feature with the given unique ID
      Parameters:
      uid - The feature unique ID
      Returns:
      The feature key or null if no feature with the given ID was found
    • getCurrentVersionKey

      default FeatureKey getCurrentVersionKey(BigId internalID)
      Helper method to retrieve the full key corresponding to the current version of the feature with the given internal ID
      Parameters:
      internalID - The feature internal ID
      Returns:
      The feature key or null if no feature with the given ID was found
    • getCurrentVersion

      default V getCurrentVersion(String uid)
      Helper method to retrieve the current version of the feature with the given unique ID
      Parameters:
      uid - The feature unique ID
      Returns:
      The feature representation or null if no feature with the given ID was found
    • getCurrentVersion

      default V getCurrentVersion(BigId internalID)
      Helper method to retrieve the current version of the feature with the given internal ID
      Parameters:
      internalID - The feature internal ID
      Returns:
      The feature representation or null if no feature with the given ID was found
    • remove

      default FeatureKey remove(String uid)
      Helper method to remove all versions of the feature with the given UID
      Parameters:
      uid - The feature unique ID
      Returns:
      The feature key of the current version or null if nothing was removed
    • getNumFeatures

      default long getNumFeatures()
      Returns:
      Total number of distinct features contained in this data store.
      Note that this is different from IDataStore.getNumRecords() because the later will count one entry for each version of the same feature while this method will count the feature only once.
    • getFeaturesBbox

      Bbox getFeaturesBbox()
      Returns:
      Overall bounding rectangle of all features contained in this data store