Package net.sf.okapi.tm.pensieve.writer
Interface ITmWriter
-
- All Known Implementing Classes:
PensieveWriter
public interface ITmWriter- Author:
- HaslamJD, HARGRAVEJE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the index and forces a commit against the index.voidcommit()Forces a commit against the index.voiddelete(String id)Deletes a TranslationUnit based on the id.voidindexTranslationUnit(TranslationUnit tu)Indexes a given translation unit.voidindexTranslationUnit(TranslationUnit tu, boolean overwrite)Indexes a given translation unit, possibly overwriting an existing one with the same source.voidupdate(TranslationUnit tu)Updates a TranslationUnit.
-
-
-
Method Detail
-
close
void close()
Closes the index and forces a commit against the index.- Throws:
OkapiIOException- if the commit can not happen
-
indexTranslationUnit
void indexTranslationUnit(TranslationUnit tu)
Indexes a given translation unit.- Parameters:
tu- the translation unit to index.- Throws:
OkapiIOException- if the indexing cannot happen.
-
indexTranslationUnit
void indexTranslationUnit(TranslationUnit tu, boolean overwrite)
Indexes a given translation unit, possibly overwriting an existing one with the same source.- Parameters:
tu- the translation unit to index.overwrite- true to overwrite any existing unit that has the same source content (codes excluded)
-
delete
void delete(String id)
Deletes a TranslationUnit based on the id.- Parameters:
id- The Unique ID of the TU to delete- Throws:
OkapiIOException- if the delete can not happen
-
update
void update(TranslationUnit tu)
Updates a TranslationUnit.- Parameters:
tu- The TranslationUnit to update- Throws:
OkapiIOException- if the update can not happen
-
commit
void commit()
Forces a commit against the index.- Throws:
OkapiIOException- if the commit can not happen
-
-