|
Textractor API textractor-720 (20091120123250) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttextractor.mg4j.docstore.StringPerDocumentReader
public class StringPerDocumentReader
When one String value per document in the index needs to be read, this class can aid in doing that. This can be used to write DOI values, etc. See StringPerDocumentWriter for the class that writes these strings.
| Field Summary | |
|---|---|
static int |
OFFSET_ENTRY_SIZE
We are using writeInt for pos and writeInt for string length, so, the string offset entry size is 8 bytes. |
| Method Summary | |
|---|---|
void |
close()
Closes this reader and releases any system resources associated with it. |
static String |
getDataFilename(String basename,
String filenameSuffix)
|
static String |
getOffsetsFilename(String basename,
String filenameSuffix)
|
static StringPerDocumentReader |
obtainReader(DocumentIndexManager manager,
String filenameSuffix)
|
String |
readStringForDocument(int documentIndex)
Retrieves the string value for the document if it exists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int OFFSET_ENTRY_SIZE
| Method Detail |
|---|
public static StringPerDocumentReader obtainReader(DocumentIndexManager manager,
String filenameSuffix)
public static String getDataFilename(String basename,
String filenameSuffix)
public static String getOffsetsFilename(String basename,
String filenameSuffix)
public String readStringForDocument(int documentIndex)
throws IOException
documentIndex - the document index for this article
IOException - error writing data
public void close()
throws IOException
close in interface CloseableIOException - if an I/O error occurs
|
Textractor API textractor-720 (20091120123250) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||