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 Type
    Method
    Description
    void
    Deletes a Feature in the index.
    void
    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
    Attribute names
    int
    Data type
    Returns a FeatureSet with the set of values that match the given value.
    Index name
    getNearestFeatureSet(int count, Object value)
    Returns a FeatureSet with the set of up to count values that are nearest to the given value.
    getNearestFeatureSet(int count, Object value, Object tolerance)
    Returns a FeatureSet with the set of up to count values whose distance to the given value is not greater than tolerance
    getRangeFeatureSet(Object value1, Object value2)
    Returns a FeatureSet with the set of values that belong to the range defined by value1 and value2.
    void
    Inserts a Feature in the index.
    void
    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
    boolean
    Returns if the index is in the process of being filled with the Features of a store.
    boolean
    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

      void insert(Feature feat) throws DataException
      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

      void insert(FeatureSet data) throws DataException
      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

      void delete(Feature feat) throws DataException
      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

      void delete(FeatureSet data) throws FeatureIndexException
      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

      FeatureSet getMatchFeatureSet(Object value) throws FeatureIndexException
      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

      FeatureSet getRangeFeatureSet(Object value1, Object value2) throws FeatureIndexException
      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

      FeatureSet getNearestFeatureSet(int count, Object value) throws FeatureIndexException
      Returns a FeatureSet with the set of up to count values that are nearest to the given value.
      Parameters:
      count - maximum number of values that their resulting FeatureSet will return
      value - the value around which the nearest count will be looked up.
      Returns:
      a FeatureSet with the set of up to count values 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 to count values whose distance to the given value is not greater than tolerance
      Parameters:
      count - maximum number of values that their resulting FeatureSet will return
      value - the value around which the nearest count will be looked up.
      tolerance - maximum distance from the given value.
      Returns:
      a FeatureSet with the set of up to count values 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