Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.result
Class AnnotationFromDatabase<T,O extends DatabaseObject>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.result.AnnotationFromDatabase<T,O>
Type Parameters:
O - Database object type
T - Association type
All Implemented Interfaces:
AnnotationResult<T>, Result

public class AnnotationFromDatabase<T,O extends DatabaseObject>
extends Object
implements AnnotationResult<T>

Class representing Annotations backed by a database using AssociationIDs.

Author:
Erich Schubert

Field Summary
private  AssociationID<T> assoc
          Storage of included associations.
private  Database<O> database
          database storage
 
Constructor Summary
AnnotationFromDatabase(Database<O> db, AssociationID<T> association)
          Constructor
 
Method Summary
 AssociationID<T> getAssociationID()
          Return the association ID of this result.
 Database<O> getDatabase()
          Return database referenced by annotations
 T getValueFor(Integer objID)
          Get associated value for an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

database

private Database<O extends DatabaseObject> database
database storage


assoc

private AssociationID<T> assoc
Storage of included associations.

Constructor Detail

AnnotationFromDatabase

public AnnotationFromDatabase(Database<O> db,
                              AssociationID<T> association)
Constructor

Parameters:
db - Database
association - Association to use
Method Detail

getDatabase

public Database<O> getDatabase()
Return database referenced by annotations

Returns:
database referenced

getAssociationID

public AssociationID<T> getAssociationID()
Description copied from interface: AnnotationResult
Return the association ID of this result.

Specified by:
getAssociationID in interface AnnotationResult<T>
Returns:
Association ID

getValueFor

public T getValueFor(Integer objID)
Description copied from interface: AnnotationResult
Get associated value for an object.

Specified by:
getValueFor in interface AnnotationResult<T>
Parameters:
objID - Object ID
Returns:
Associated value

Release 0.2 (2009-07-06_1820)