IndexManager
Class RegIndexManagerMtree

java.lang.Object
  extended by IndexManager.RegIndexManager
      extended by IndexManager.RegIndexManagerMtree

public class RegIndexManagerMtree
extends RegIndexManager

Class for the management of the region index using M-tree.


Constructor Summary
RegIndexManagerMtree(java.lang.String filename)
          Basic constructor.
 
Method Summary
 boolean create(java.lang.String featureFile)
          Creates a new index from a file containing region features.
 RegionQuery createQuery(Region region)
          Creates a new k-NN query based on the given region using this index.
 boolean delete(ImageID id, Region region)
          Deletes a region from the index.
 boolean insert(ImageID id, Region region)
          Inserts a new region in the index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegIndexManagerMtree

public RegIndexManagerMtree(java.lang.String filename)
Basic constructor.

Parameters:
filename - The absolute path of the file containing the M-tree index.
Method Detail

createQuery

public RegionQuery createQuery(Region region)
Creates a new k-NN query based on the given region using this index.

Specified by:
createQuery in class RegIndexManager
Parameters:
region - The query region.
Returns:
A new k-NN query.

create

public boolean create(java.lang.String featureFile)
Creates a new index from a file containing region features.

Specified by:
create in class RegIndexManager
Parameters:
featureFile - Absolute path of the features file.
Returns:
true if the index was successfully created, false otherwise.

insert

public boolean insert(ImageID id,
                      Region region)
Inserts a new region in the index.

Specified by:
insert in class RegIndexManager
Parameters:
id - ID of the region to be inserted.
region - Region to be inserted.
Returns:
true if the region was successfully inserted, false otherwise.

delete

public boolean delete(ImageID id,
                      Region region)
Deletes a region from the index.

Specified by:
delete in class RegIndexManager
Parameters:
id - ID of the region to be inserted.
region - Region to be inserted.
Returns:
true if the region was successfully deleted, false otherwise.