/** return the lexicon outputstream for the specified index at the specified filename */ @SuppressWarnings("unchecked") private static LexiconOutputStream<String> getLexOutputStream(IndexOnDisk index, String structureName) throws IOException { return new FSOMapFileLexiconOutputStream( index.getPath(), index.getPrefix(), structureName, (FixedSizeWriteableFactory<Text>)index.getIndexStructure(structureName+"-keyfactory")); }
@Override public void close() { super.close(); if (index != null) { addLexiconToIndex(index, this.structureName, this.leValueClassname); } }
Iterator<Entry<String, LexiconEntry>> lexIn = (Iterator<Entry<String, LexiconEntry>>) oldIndex.getIndexStructureInputStream("lexicon"); FSOMapFileLexiconOutputStream lexOut = new FSOMapFileLexiconOutputStream( newIndex, "lexicon", new FixedSizeTextFactory( ApplicationSetup.MAX_TERM_LENGTH), lexOut.writeNextEntry(lexTermEntry.getKey(), newLe);
.getIndexStructureInputStream("lexicon"); FSOMapFileLexiconOutputStream lexOut = new FSOMapFileLexiconOutputStream( newIndex, "lexicon", new FixedSizeTextFactory( ApplicationSetup.MAX_TERM_LENGTH), lexOut.writeNextEntry(lexTermEntry.getKey(), newLe);
/** return the lexicon outputstream for the current index at the specified filename */ @SuppressWarnings("unchecked") protected LexiconOutputStream<String> getLexOutputStream(String structureName) throws IOException { return new FSOMapFileLexiconOutputStream( index.getPath(), index.getPrefix(), structureName, (FixedSizeWriteableFactory<Text>)index.getIndexStructure(defaultStructureName+"-keyfactory")); }
FSOMapFileLexiconOutputStream lexOUT = new FSOMapFileLexiconOutputStream(index, "lexicon", new FixedSizeTextFactory(ApplicationSetup.MAX_TERM_LENGTH), FieldLexiconEntry.Factory.class); FieldLexiconEntry.Factory leFactory = new FieldLexiconEntry.Factory(fieldtags.length); le.setTermId(term.getValue().getTermId()); le.setPointer(pointer); lexOUT.writeNextEntry(term.getKey(), le);
@Override public void close() { super.close(); if (index != null) { addLexiconToIndex(index, this.structureName, this.leValueClassname); } }
/** * get LexiconOutputStream * @param _structureName * @throws IOException */ @SuppressWarnings("unchecked") protected LexiconOutputStream<String> getLexOutputStream(String _structureName) throws IOException { return new FSOMapFileLexiconOutputStream( index.getPath(), index.getPrefix(), _structureName, (FixedSizeWriteableFactory<Text>)index.getIndexStructure("lexicon-keyfactory")); }
Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass = (Class<? extends FixedSizeWriteableFactory<LexiconEntry>>) valueFactory.getClass(); LexiconOutputStream<String> los = new FSOMapFileLexiconOutputStream( index, "newlex", valueFactoryClass);
LexiconOutputStream<String> lexOutStream = new FSOMapFileLexiconOutputStream( destIndex, "lexicon",
Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass = (Class<? extends FixedSizeWriteableFactory<LexiconEntry>>) valueFactory.getClass(); LexiconOutputStream<String> los = new FSOMapFileLexiconOutputStream( index, "newlex", valueFactoryClass);
new FSOMapFileLexiconOutputStream(destIndex, "lexicon", (Class <FixedSizeWriteableFactory<LexiconEntry>>) lvf.getClass());
String[][] _fileNames = getFileNames(); this.currentIndex.setIndexProperty("max.term.length", ApplicationSetup.getProperty("max.term.length", ""+20)); LexiconOutputStream<String> lexStream = new FSOMapFileLexiconOutputStream(this.currentIndex, "lexicon", (super.numFields > 0 ? FieldLexiconEntry.Factory.class : BasicLexiconEntry.Factory.class));