RawDataManager
Class RawDataManager

java.lang.Object
  extended by RawDataManager.RawDataManager
Direct Known Subclasses:
RawDataManagerMySQL

public abstract class RawDataManager
extends java.lang.Object

Abstract class representing a generic Raw Data Manager.


Constructor Summary
RawDataManager()
           
 
Method Summary
abstract  void closeConnection()
          Closes the connection to the features DB.
abstract  boolean contains(java.lang.String url)
          Checks whether an image with a given URL exists in the DB.
abstract  void createConnection()
          Connects to the feature DB.
abstract  Document.ImageID findID(java.lang.String url)
          Retrieves the image ID given the image URL; if such image does not exists, it inserts it in the DB and returns the ID of the new image.
abstract  java.lang.String findURL(Document.ImageID id)
          Retrieves the URL of an image with a given ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawDataManager

public RawDataManager()
Method Detail

createConnection

public abstract void createConnection()
Connects to the feature DB.


closeConnection

public abstract void closeConnection()
Closes the connection to the features DB.


findID

public abstract Document.ImageID findID(java.lang.String url)
Retrieves the image ID given the image URL; if such image does not exists, it inserts it in the DB and returns the ID of the new image.

Parameters:
url - Image URL.
Returns:
The ID of the given image if the image is contained in the DB, the newly assigned ID, otherwise.

findURL

public abstract java.lang.String findURL(Document.ImageID id)
Retrieves the URL of an image with a given ID.

Parameters:
id - ID of the image to be searched.
Returns:
The URL of the image with the given ID, if such image exists, null otherwise.

contains

public abstract boolean contains(java.lang.String url)
Checks whether an image with a given URL exists in the DB.

Parameters:
url - URL of the image to be searched.
Returns:
true if the image is contained in the DB, false otherwise.