|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.gla.terrier.indexing.FileDocument
public class FileDocument
Models a document which corresponds to one file.
| Field Summary | |
|---|---|
long |
counter
The number of bytes read from the input. |
| Constructor Summary | |
|---|---|
FileDocument(java.io.File f,
java.io.InputStream docStream)
Constructs an instance of the FileDocument from the given input stream. |
|
| Method Summary | |
|---|---|
boolean |
endOfDocument()
Indicates whether the end of a document has been reached. |
java.util.Map<java.lang.String,java.lang.String> |
getAllProperties()
Returns the underlying map of all the properties defined by this Document. |
java.util.Set<java.lang.String> |
getFields()
Returns null because there is no support for fields with file documents. |
java.lang.String |
getNextTerm()
Gets the next term from the Document |
java.lang.String |
getProperty(java.lang.String name)
Allows access to a named property of the Document. |
java.io.Reader |
getReader()
Returns the underlying buffered reader, so that client code can tokenise the document itself, and deal with it how it likes. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public long counter
| Constructor Detail |
|---|
public FileDocument(java.io.File f,
java.io.InputStream docStream)
docStream - the input stream that reads the file.| Method Detail |
|---|
public java.io.Reader getReader()
getReader in interface Documentpublic java.lang.String getNextTerm()
getNextTerm in interface Documentpublic java.util.Set<java.lang.String> getFields()
getFields in interface Documentpublic boolean endOfDocument()
endOfDocument in interface Documentpublic java.lang.String getProperty(java.lang.String name)
Document
getProperty in interface Documentname - Name of the property. It is suggested, but not required that this name
should not be case insensitive.public java.util.Map<java.lang.String,java.lang.String> getAllProperties()
Document
getAllProperties in interface Document
|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||