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:
-
Method Summary
Modifier and TypeMethodDescriptionvoidfill()Fills this index with the store's data.voidfill(boolean background, org.gvsig.tools.observer.Observer observer) Fills this index with the store's data.org.gvsig.fmap.dal.feature.FeatureAttributeDescriptorColumn to which belongs this indexFeatureStore to which belongs this indexorg.gvsig.fmap.dal.feature.FeatureTypeFeatureType to which belongs this indexReturns the absolute path (directory + filename) where this index is or will be storedgetNewFileName(String prefix, String sufix) Calculates and returns a new filename for an index, using the given prefix and suffixReturns a temporary absolute path (directory + filename) according to the system environmentvoidInitializes this providervoidsetValid(boolean valid) Sets the index as valid or invalid, so it may be used or not.voidIf 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
disposeMethods inherited from interface org.gvsig.fmap.dal.feature.FeatureIndex
delete, delete, getAttributeNames, getDataType, getMatchFeatureSet, getName, getNearestFeatureSet, getNearestFeatureSet, getRangeFeatureSet, insert, insert, isFilling, isValidMethods inherited from interface org.gvsig.tools.observer.Observable
addObserver, deleteObserver, deleteObservers
-
Method Details
-
initialize
void initialize() throws org.gvsig.fmap.dal.exception.InitializeExceptionInitializes 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
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.FeatureIndexExceptionFills 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 backgroundobserver- 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:
-
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.
-