Package org.gvsig.fmap.dal.feature
Interface FeatureIndex
public interface FeatureIndex
This interface represents a local index on feature based data.
All indexes are stored in local files. Creating server
side indexes is not supported.
- Author:
- jyarza
-
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes a Feature in the index.voiddelete(FeatureSet data) Deletes a FeatureSet from this index FeatureType is not checked so it will accept any FeatureType as long as exists a column with a valid nameAttribute namesintData typegetMatchFeatureSet(Object value) Returns a FeatureSet with the set of values that match the given value.getName()Index namegetNearestFeatureSet(int count, Object value) Returns a FeatureSet with the set of up tocountvalues that are nearest to the given value.getNearestFeatureSet(int count, Object value, Object tolerance) Returns a FeatureSet with the set of up tocountvalues whose distance to the given value is not greater thantolerancegetRangeFeatureSet(Object value1, Object value2) Returns a FeatureSet with the set of values that belong to the range defined by value1 and value2.voidInserts a Feature in the index.voidinsert(FeatureSet data) Inserts a FeatureSet into this index FeatureType is not checked so it will accept any FeatureType as long as exists a column with a valid namebooleanReturns if the index is in the process of being filled with the Features of a store.booleanisValid()Returns if the index is valid and might be used to get Features.
-
Method Details
-
getName
String getName()Index name -
getAttributeNames
List getAttributeNames()Attribute names -
getDataType
int getDataType()Data type -
insert
Inserts a Feature in the index. The Feature must contain a column that matches this index's column (name and data type)- Parameters:
feat-- Throws:
DataException
-
insert
Inserts a FeatureSet into this index FeatureType is not checked so it will accept any FeatureType as long as exists a column with a valid name- Throws:
DataException
-
delete
Deletes a Feature in the index. The Feature must contain a column that matches this index's column (name and data type)- Parameters:
feat-- Throws:
DataException
-
delete
Deletes a FeatureSet from this index FeatureType is not checked so it will accept any FeatureType as long as exists a column with a valid name- Throws:
FeatureIndexException
-
getMatchFeatureSet
Returns a FeatureSet with the set of values that match the given value.- Parameters:
value- is the value to match.- Returns:
- a FeatureSet containing the values in the index that match the given value.
- Throws:
FeatureIndexException
-
getRangeFeatureSet
Returns a FeatureSet with the set of values that belong to the range defined by value1 and value2.- Parameters:
value1- range lower limit.value2- range higher limit.- Returns:
- a FeatureSet with the set of values that belong to the range defined by value1 and value2.
- Throws:
FeatureIndexException
-
getNearestFeatureSet
Returns a FeatureSet with the set of up tocountvalues that are nearest to the given value.- Parameters:
count- maximum number of values that their resulting FeatureSet will returnvalue- the value around which the nearestcountwill be looked up.- Returns:
- a FeatureSet with the set of up to
countvalues that are nearest to the given value. - Throws:
FeatureIndexException
-
getNearestFeatureSet
FeatureSet getNearestFeatureSet(int count, Object value, Object tolerance) throws FeatureIndexException Returns a FeatureSet with the set of up tocountvalues whose distance to the given value is not greater thantolerance- Parameters:
count- maximum number of values that their resulting FeatureSet will returnvalue- the value around which the nearestcountwill be looked up.tolerance- maximum distance from the given value.- Returns:
- a FeatureSet with the set of up to
countvalues that are nearest to the given value. - Throws:
FeatureIndexException
-
isValid
boolean isValid()Returns if the index is valid and might be used to get Features.- Returns:
- if the index is valid
-
isFilling
boolean isFilling()Returns if the index is in the process of being filled with the Features of a store.- Returns:
- if the index is filling with data
-