FeatureManager
Class WindsurfFeatureManagerTxt

java.lang.Object
  extended by FeatureManager.FeatureManager
      extended by FeatureManager.WindsurfFeatureManagerTxt

public class WindsurfFeatureManagerTxt
extends FeatureManager

Implements the text-based Feature Manager for Windsurf.


Field Summary
 
Fields inherited from class FeatureManager.FeatureManager
time
 
Constructor Summary
WindsurfFeatureManagerTxt(java.lang.String filename)
          Basic constructor.
 
Method Summary
 void closeConnection()
          Closes the connection to the features file.
 void closeScan()
          Closes a sequential scan over image features.
 void createConnection()
          Connects to the features file.
 void createScan()
          Creates a sequential scan over image features.
protected  Image loadFeatures(ImageID id)
          Loads the features of an image from the features file given the image ID.
protected  Image loadFeaturesNext()
          Loads the features of the next image from the features file.
 ImageID nextID()
          Returns an image ID for a new image.
protected  boolean saveFeatures(Image image)
          Saves the features of a given image in the features file.
 
Methods inherited from class FeatureManager.FeatureManager
contains, getTime, load, loadNext, resetTime, save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindsurfFeatureManagerTxt

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

Parameters:
filename - The name for the features file.
Method Detail

createConnection

public void createConnection()
Connects to the features file.

Specified by:
createConnection in class FeatureManager

closeConnection

public void closeConnection()
Closes the connection to the features file.

Specified by:
closeConnection in class FeatureManager

saveFeatures

protected boolean saveFeatures(Image image)
Saves the features of a given image in the features file.

Specified by:
saveFeatures in class FeatureManager
Parameters:
image - Image whose features are to be saved.
Returns:
true if the features have been successfully saved, false otherwise.

loadFeatures

protected Image loadFeatures(ImageID id)
Loads the features of an image from the features file given the image ID.

Specified by:
loadFeatures in class FeatureManager
Parameters:
id - ID of the image to be loaded.
Returns:
Image object containing loaded features (null if no such image exists).

createScan

public void createScan()
Creates a sequential scan over image features.

Specified by:
createScan in class FeatureManager

closeScan

public void closeScan()
Closes a sequential scan over image features.

Specified by:
closeScan in class FeatureManager

loadFeaturesNext

protected Image loadFeaturesNext()
Loads the features of the next image from the features file.

Specified by:
loadFeaturesNext in class FeatureManager
Returns:
Image object containing loaded features (null if no next image exists).

nextID

public ImageID nextID()
Returns an image ID for a new image.

Specified by:
nextID in class FeatureManager
Returns:
ImageIDnumerical object not associated to any DB image.