Interface FeatureIndexProviderServices

All Superinterfaces:
org.gvsig.tools.dispose.Disposable, org.gvsig.fmap.dal.feature.FeatureIndex, org.gvsig.tools.observer.Observable

public interface FeatureIndexProviderServices extends org.gvsig.fmap.dal.feature.FeatureIndex, org.gvsig.tools.observer.Observable, org.gvsig.tools.dispose.Disposable
SPI for all index implementations. This observable object provides notificationswhen the index has finished filling with data and is available to be used. The observer will receive then a FeatureStoreNotification.INDEX_FILLING_SUCCESS notification, with the index object if it has finished successfully, or a FeatureStoreNotification.INDEX_FILLING_ERROR notification with the exception object if there has been any error in the process.
Author:
gvSIG team
See Also:
  • FeatureStoreNotification.INDEX_FILLING_SUCCESS
  • FeatureStoreNotification.INDEX_FILLING_ERROR
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Fills this index with the store's data.
    void
    fill(boolean background, org.gvsig.tools.observer.Observer observer)
    Fills this index with the store's data.
    org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor
    Column to which belongs this index
    FeatureStore to which belongs this index
    org.gvsig.fmap.dal.feature.FeatureType
    FeatureType to which belongs this index
    Returns the absolute path (directory + filename) where this index is or will be stored
    getNewFileName(String prefix, String sufix)
    Calculates and returns a new filename for an index, using the given prefix and suffix
    Returns a temporary absolute path (directory + filename) according to the system environment
    void
    Initializes this provider
    void
    setValid(boolean valid)
    Sets the index as valid or invalid, so it may be used or not.
    void
    If the index is in the process of being filled by a background task, synchronize this method or add some mechanism for external callers to block on it.

    Methods inherited from interface org.gvsig.tools.dispose.Disposable

    dispose

    Methods inherited from interface org.gvsig.fmap.dal.feature.FeatureIndex

    delete, delete, getAttributeNames, getDataType, getMatchFeatureSet, getName, getNearestFeatureSet, getNearestFeatureSet, getRangeFeatureSet, insert, insert, isFilling, isValid

    Methods inherited from interface org.gvsig.tools.observer.Observable

    addObserver, deleteObserver, deleteObservers
  • Method Details

    • initialize

      void initialize() throws org.gvsig.fmap.dal.exception.InitializeException
      Initializes this provider
      Throws:
      org.gvsig.fmap.dal.exception.InitializeException
    • getFeatureAttributeDescriptor

      org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor getFeatureAttributeDescriptor()
      Column to which belongs this index
    • getFeatureType

      org.gvsig.fmap.dal.feature.FeatureType getFeatureType()
      FeatureType to which belongs this index
    • getFeatureStoreProviderServices

      FeatureStoreProviderServices getFeatureStoreProviderServices()
      FeatureStore to which belongs this index
    • getFileName

      String getFileName()
      Returns the absolute path (directory + filename) where this index is or will be stored
    • getTemporaryFileName

      String getTemporaryFileName()
      Returns a temporary absolute path (directory + filename) according to the system environment
    • getNewFileName

      String getNewFileName(String prefix, String sufix)
      Calculates and returns a new filename for an index, using the given prefix and suffix
    • fill

      void fill() throws org.gvsig.fmap.dal.feature.exception.FeatureIndexException
      Fills this index with the store's data. This operation will not return until the index has filled with all the store's data.
      Throws:
      org.gvsig.fmap.dal.feature.exception.FeatureIndexException - if there is an error while filling the index
    • fill

      void fill(boolean background, org.gvsig.tools.observer.Observer observer) throws org.gvsig.fmap.dal.feature.exception.FeatureIndexException
      Fills this index with the store's data.
      Parameters:
      background - if the filling must be performed in background
      observer - optional observer to be notified when the fill index operation finishes
      Throws:
      org.gvsig.fmap.dal.feature.exception.FeatureIndexException - if there is an error while filling the index
      See Also:
      • FeatureStoreNotification.INDEX_FILLING_STARTED
      • FeatureStoreNotification.INDEX_FILLING_SUCCESS
      • FeatureStoreNotification.INDEX_FILLING_CANCELLED
      • FeatureStoreNotification.INDEX_FILLING_ERROR
    • setValid

      void setValid(boolean valid)
      Sets the index as valid or invalid, so it may be used or not.
      Parameters:
      valid - status to set the index to
    • waitForIndex

      void waitForIndex()
      If the index is in the process of being filled by a background task, synchronize this method or add some mechanism for external callers to block on it.