org.qtunes.db
Interface TextIndex

All Known Implementing Classes:
BitSetTextIndex

public interface TextIndex

A TextIndex allows free text searching on the Database.


Method Summary
 void add(BitSet indices, String phrase)
          Add the specified indices to the TextIndex, keyed on phrase
 void add(int index, String phrase)
          Add the specified index to the TextIndex, keyed on phrase
 void clear(BitSet set)
          Remove the specified indices from the TextIndex
 void clear(int index)
          Remove the specified index from the TextIndex
 BitSet get(String substring)
          Return a BitSet containing the indices that were added with a phrase containing the specified substring.
 void load(InputStream in)
          Load the TextIndex from the specified InputStream
 void save(OutputStream out)
          Save the TextIndex to the specified OutputStream
 

Method Detail

add

void add(BitSet indices,
         String phrase)
Add the specified indices to the TextIndex, keyed on phrase


add

void add(int index,
         String phrase)
Add the specified index to the TextIndex, keyed on phrase


clear

void clear(int index)
Remove the specified index from the TextIndex


clear

void clear(BitSet set)
Remove the specified indices from the TextIndex


get

BitSet get(String substring)
Return a BitSet containing the indices that were added with a phrase containing the specified substring. If no matches are found the returned BitSet is empty


save

void save(OutputStream out)
          throws IOException
Save the TextIndex to the specified OutputStream

Throws:
IOException

load

void load(InputStream in)
          throws IOException
Load the TextIndex from the specified InputStream

Throws:
IOException