|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.indexing.SimpleFileCollection
public class SimpleFileCollection
Implements a collection that can read arbitrary files on disk. It will use the file list given to it in the constructor, or it will read the file specified by the property collection.spec.
Field Summary | |
---|---|
static java.lang.String |
NAMESPACE_DOCUMENTS
The default namespace for all parsers to be loaded from. |
Constructor Summary | |
---|---|
SimpleFileCollection()
A default constructor that uses the files to be processed by this collection, as specified by the property collection.spec |
|
SimpleFileCollection(java.util.List<java.lang.String> filelist,
boolean recurse)
Constructs an instance of the class with the given list of files. |
|
SimpleFileCollection(java.lang.String addressCollectionFilename)
Creates an instance of the class. |
Method Summary | |
---|---|
void |
close()
Closes the collection, any files that may be open. |
boolean |
endOfCollection()
Checks whether there are more documents in the colection. |
java.lang.String |
getDocid()
Returns the current document's identifier string. |
Document |
getDocument()
Return the current document in the collection. |
java.util.List<java.lang.String> |
getFileList()
Returns the ist of indexed files in the order they were indexed in. |
static void |
main(java.lang.String[] args)
Simple test case. |
boolean |
nextDocument()
Move onto the next document in the collection to be processed. |
void |
reset()
Starts again from the beginning of the collection. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NAMESPACE_DOCUMENTS
Constructor Detail |
---|
public SimpleFileCollection(java.util.List<java.lang.String> filelist, boolean recurse)
filelist
- ArrayList the files to be processed by this collection.public SimpleFileCollection()
public SimpleFileCollection(java.lang.String addressCollectionFilename)
addressCollectionFilename
- String the name of the file that
contains the list of files to be processed by this collecion.Method Detail |
---|
public boolean nextDocument()
nextDocument
in interface Collection
public Document getDocument()
getDocument
in interface Collection
public boolean endOfCollection()
endOfCollection
in interface Collection
public void reset()
reset
in interface Collection
public java.lang.String getDocid()
getDocid
in interface Collection
public void close()
Collection
close
in interface Collection
public java.util.List<java.lang.String> getFileList()
public static void main(java.lang.String[] args)
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |