|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terrier.structures.LexiconOutputStream<String>
org.terrier.structures.FSOMapFileLexiconOutputStream
public class FSOMapFileLexiconOutputStream
A LexiconOutputStream for FSOMapFileLexicon. Writes to a FSOrderedMapFile.
| Field Summary | |
|---|---|
protected Index |
index
|
protected FixedSizeWriteableFactory<org.apache.hadoop.io.Text> |
keyFactory
|
protected String |
leValueClassname
|
protected FSOrderedMapFile.MapFileWriter |
mapFileWriter
|
protected String |
structureName
|
protected org.apache.hadoop.io.Text |
tempKey
|
| Fields inherited from class org.terrier.structures.LexiconOutputStream |
|---|
lexiconStream, numPointersWritten, numTermsWritten, numTokensWritten |
| Constructor Summary | |
|---|---|
FSOMapFileLexiconOutputStream(Index _index,
String _structureName,
Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass)
Construct an instance of the class with |
|
FSOMapFileLexiconOutputStream(Index _index,
String _structureName,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory,
Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass)
Construct an instance of the class with |
|
FSOMapFileLexiconOutputStream(Index _index,
String _structureName,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory,
String valueFactoryClassName)
Construct an instance of the class with |
|
FSOMapFileLexiconOutputStream(String filename,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory)
Construct an instance of the class with |
|
FSOMapFileLexiconOutputStream(String path,
String prefix,
String _structureName,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory)
Construct an instance of the class with |
|
| Method Summary | |
|---|---|
static void |
addLexiconToIndex(Index index,
String structureName,
String leValueClassname)
Adds Lexicon to index |
void |
close()
Closes the lexicon stream. |
int |
writeNextEntry(String _key,
LexiconEntry _value)
Writes a lexicon entry. |
| Methods inherited from class org.terrier.structures.LexiconOutputStream |
|---|
getNumberOfPointersWritten, getNumberOfTermsWritten, getNumberOfTokensWritten, incrementCounters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected FixedSizeWriteableFactory<org.apache.hadoop.io.Text> keyFactory
protected org.apache.hadoop.io.Text tempKey
protected final FSOrderedMapFile.MapFileWriter mapFileWriter
protected Index index
protected String leValueClassname
protected final String structureName
| Constructor Detail |
|---|
public FSOMapFileLexiconOutputStream(String filename,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory)
throws IOException
filename - _keyFactory -
IOException
public FSOMapFileLexiconOutputStream(String path,
String prefix,
String _structureName,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory)
throws IOException
path - prefix - _structureName - _keyFactory -
IOException
public FSOMapFileLexiconOutputStream(Index _index,
String _structureName,
Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass)
throws IOException
_index - _structureName - valueFactoryClass -
IOException
public FSOMapFileLexiconOutputStream(Index _index,
String _structureName,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory,
Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass)
throws IOException
_index - _structureName - _keyFactory - valueFactoryClass -
IOException
public FSOMapFileLexiconOutputStream(Index _index,
String _structureName,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory,
String valueFactoryClassName)
throws IOException
_index - _structureName - _keyFactory - valueFactoryClassName -
IOException| Method Detail |
|---|
public int writeNextEntry(String _key,
LexiconEntry _value)
throws IOException
LexiconOutputStream
writeNextEntry in class LexiconOutputStream<String>_key - the key - usually the term_value - the lexicon entry value
IOException - if an I/O error occurspublic void close()
LexiconOutputStream
close in interface Closeableclose in class LexiconOutputStream<String>
public static void addLexiconToIndex(Index index,
String structureName,
String leValueClassname)
index - structureName - leValueClassname -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||