|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.structures.LexiconOutputStream<java.lang.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 java.lang.String |
leValueClassname
|
protected FSOrderedMapFile.MapFileWriter |
mapFileWriter
|
protected java.lang.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,
java.lang.String _structureName,
java.lang.Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass)
Construct an instance of the class with |
|
FSOMapFileLexiconOutputStream(Index _index,
java.lang.String _structureName,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory,
java.lang.Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass)
Construct an instance of the class with |
|
FSOMapFileLexiconOutputStream(Index _index,
java.lang.String _structureName,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory,
java.lang.String valueFactoryClassName)
Construct an instance of the class with |
|
FSOMapFileLexiconOutputStream(java.lang.String filename,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory)
Construct an instance of the class with |
|
FSOMapFileLexiconOutputStream(java.lang.String path,
java.lang.String prefix,
java.lang.String _structureName,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory)
Construct an instance of the class with |
Method Summary | |
---|---|
static void |
addLexiconToIndex(Index index,
java.lang.String structureName,
java.lang.String leValueClassname)
Adds Lexicon to index |
void |
close()
Closes the lexicon stream. |
int |
writeNextEntry(java.lang.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 java.lang.String leValueClassname
protected final java.lang.String structureName
Constructor Detail |
---|
public FSOMapFileLexiconOutputStream(java.lang.String filename, FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory) throws java.io.IOException
filename
- _keyFactory
-
java.io.IOException
public FSOMapFileLexiconOutputStream(java.lang.String path, java.lang.String prefix, java.lang.String _structureName, FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory) throws java.io.IOException
path
- prefix
- _structureName
- _keyFactory
-
java.io.IOException
public FSOMapFileLexiconOutputStream(Index _index, java.lang.String _structureName, java.lang.Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass) throws java.io.IOException
_index
- _structureName
- valueFactoryClass
-
java.io.IOException
public FSOMapFileLexiconOutputStream(Index _index, java.lang.String _structureName, FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory, java.lang.Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass) throws java.io.IOException
_index
- _structureName
- _keyFactory
- valueFactoryClass
-
java.io.IOException
public FSOMapFileLexiconOutputStream(Index _index, java.lang.String _structureName, FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory, java.lang.String valueFactoryClassName) throws java.io.IOException
_index
- _structureName
- _keyFactory
- valueFactoryClassName
-
java.io.IOException
Method Detail |
---|
public int writeNextEntry(java.lang.String _key, LexiconEntry _value) throws java.io.IOException
LexiconOutputStream
writeNextEntry
in class LexiconOutputStream<java.lang.String>
_key
- the key - usually the term_value
- the lexicon entry value
java.io.IOException
- if an I/O error occurspublic void close()
LexiconOutputStream
close
in interface java.io.Closeable
close
in class LexiconOutputStream<java.lang.String>
public static void addLexiconToIndex(Index index, java.lang.String structureName, java.lang.String leValueClassname)
index
- structureName
- leValueClassname
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |