|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Collection
This interface encapsulates the most fundamental concept to
indexing with Terrier - a Collection. Anyone using Terrier to
encapuslate a new source of data (a corpus, colllection etc)
needs to create an object which implements this Collection interface.
The Collection interface is essentially an Iterator over a series of
documents. It generates Document objects for each next document requested
from the collection. It is aware of the type of Document objects available,
and how to instantiate them.
Terrier core provides two Collection implementation: TRECCollection and
SimpleFileCollection.
Method Summary | |
---|---|
void |
close()
Closes the collection, any files that may be open. |
boolean |
endOfCollection()
Returns true if the end of the collection has been reached |
java.lang.String |
getDocid()
Get the String document identifier of the current document. |
Document |
getDocument()
Get the document object representing the current document. |
boolean |
nextDocument()
Move the collection to the start of the next document. |
void |
reset()
Resets the Collection iterator to the start of the collection. |
Method Detail |
---|
boolean nextDocument()
Document getDocument()
java.lang.String getDocid()
boolean endOfCollection()
void reset()
void close()
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |