no.priv.garshol.duke
Interface EquivalenceClassDatabase

All Known Implementing Classes:
InMemoryClassDatabase, JDBCEquivalenceClassDatabase

public interface EquivalenceClassDatabase

A tool for collecting matching records into groups where all records are considered to match. Note that this means treating the matching relation between records as transitive, which in practice it is not.


Method Summary
 void addLink(String id1, String id2)
          Add a new link between two records.
 void commit()
          Commit changes made to persistent store.
 Collection<String> getClass(String id)
          Get all records linked to the given record (that is, all records in the same equivalence class as the given record).
 int getClassCount()
          Returns the number of equivalence classes in the database.
 Iterator<Collection<String>> getClasses()
          Returns an iterator over all the classes in the database.
 

Method Detail

getClassCount

int getClassCount()
Returns the number of equivalence classes in the database.


getClasses

Iterator<Collection<String>> getClasses()
Returns an iterator over all the classes in the database.


getClass

Collection<String> getClass(String id)
Get all records linked to the given record (that is, all records in the same equivalence class as the given record).

Parameters:
id - the ID of a record
Returns:
Always returns a collection, but it may be empty.

addLink

void addLink(String id1,
             String id2)
Add a new link between two records.


commit

void commit()
Commit changes made to persistent store.



Copyright © 2013. All Rights Reserved.