retrieval
Class DatabaseEntry

java.lang.Object
  extended by retrieval.DatabaseEntry

public class DatabaseEntry
extends java.lang.Object

A one-to-one mapping of a row in the database to a java class. Each row in the database represents one serialized form of a skeleton object.

The data stored in a database entry allow the parsing of a skeleton object.

The database schema is:

  
 CREATE TABLE data (
        id integer primary key autoincrement, 
        shapepath varchar(200), 
        skeletonpath varchar(200), 
        category varchar(200)
 );
 
 
Besides of the entry id, which is not needed in the code, all fields are "translated" into java member fields, allowing the handling of database entries in a comfortable way.


Field Summary
private  java.lang.String category
          the category of the serialized skeleton object
private  java.lang.String shapepath
          the path to the shape image
private  java.lang.String skeletonpath
          the path to the skeleton image
 
Constructor Summary
DatabaseEntry(java.lang.String shapepath, java.lang.String skeletonpath, java.lang.String category)
          Constructor.
 
Method Summary
 java.lang.String getCategory()
          get the entry's category
 java.lang.String getShapepath()
          get the path to the shape image
 java.lang.String getSkeletonpath()
          get the path to the skeleton image
(package private)  void setCategory(java.lang.String category)
          set the entry's category
(package private)  void setShapepath(java.lang.String shapepath)
          set the path to the shape image
(package private)  void setSkeletonpath(java.lang.String skeletonpath)
          set the path to the skeleton image
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

shapepath

private java.lang.String shapepath
the path to the shape image


skeletonpath

private java.lang.String skeletonpath
the path to the skeleton image


category

private java.lang.String category
the category of the serialized skeleton object

Constructor Detail

DatabaseEntry

public DatabaseEntry(java.lang.String shapepath,
                     java.lang.String skeletonpath,
                     java.lang.String category)
Constructor. Create a new database entry instance, defined by the path to the shape image, the path to the skeleton image and the entry's category.

Parameters:
shapepath - - the path to the shape image
skeletonpath - - the path to the skeleton image
category - - the entry's category
Method Detail

getShapepath

public java.lang.String getShapepath()
get the path to the shape image

Returns:
the path to the shape image

setShapepath

void setShapepath(java.lang.String shapepath)
set the path to the shape image

Parameters:
shapepath - - the path to the shape image

getSkeletonpath

public java.lang.String getSkeletonpath()
get the path to the skeleton image

Returns:
the path to the skeleton image

setSkeletonpath

void setSkeletonpath(java.lang.String skeletonpath)
set the path to the skeleton image

Parameters:
skeletonpath - - the path to the skeleton image

getCategory

public java.lang.String getCategory()
get the entry's category

Returns:
the entry's category

setCategory

void setCategory(java.lang.String category)
set the entry's category

Parameters:
category - - the entry's category

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object