RawDataManager
Class WindsurfRawDataManagerMySQL
java.lang.Object
RawDataManager.RawDataManager
RawDataManager.RawDataManagerMySQL
RawDataManager.WindsurfRawDataManagerMySQL
public class WindsurfRawDataManagerMySQL
- extends RawDataManagerMySQL
Implementazione del Raw Data Manager che lavora su database MySql.
Constructor Summary |
WindsurfRawDataManagerMySQL(java.lang.String usr,
java.lang.String pwd,
java.lang.String db,
java.lang.String tab)
Basic constructor for a local database. |
WindsurfRawDataManagerMySQL(java.lang.String host,
java.lang.String port,
java.lang.String usr,
java.lang.String pwd,
java.lang.String db,
java.lang.String tab)
Basic constructor for a remote database. |
Method Summary |
boolean |
contains(java.lang.String url)
Checks whether an image with a given URL exists in the DB. |
Document.ImageID |
findID(java.lang.String url)
Retrieves the image ID given the image URL; if such image does not exists, inserts it in the DB and returns the ID of the new image. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WindsurfRawDataManagerMySQL
public WindsurfRawDataManagerMySQL(java.lang.String usr,
java.lang.String pwd,
java.lang.String db,
java.lang.String tab)
- Basic constructor for a local database.
- Parameters:
usr
- Username for the DB connection.pwd
- Password for the DB connection.db
- Name of the image database.tab
- Name of the features table.
WindsurfRawDataManagerMySQL
public WindsurfRawDataManagerMySQL(java.lang.String host,
java.lang.String port,
java.lang.String usr,
java.lang.String pwd,
java.lang.String db,
java.lang.String tab)
- Basic constructor for a remote database.
- Parameters:
host
- Host name for the DB connection.port
- Port name for the DB connection.usr
- Username for the DB connection.pwd
- Password for the DB connection.db
- Name of the features database.tab
- Name of the features table.
contains
public boolean contains(java.lang.String url)
- Checks whether an image with a given URL exists in the DB.
- Specified by:
contains
in class RawDataManager
- Parameters:
url
- URL of the image to be searched.
- Returns:
true
if the image is contained in the DB, false
otherwise.
findID
public Document.ImageID findID(java.lang.String url)
- Retrieves the image ID given the image URL; if such image does not exists, inserts it in the DB and returns the ID of the new image.
- Specified by:
findID
in class RawDataManager
- Parameters:
url
- Image URL.
- Returns:
- The ID of the given image if the image is contained in the DB, the newly assigned ID, otherwise.