Package net.sf.okapi.filters.ttx
Class TTXSkeletonWriter
- java.lang.Object
-
- net.sf.okapi.common.skeleton.GenericSkeletonWriter
-
- net.sf.okapi.filters.ttx.TTXSkeletonWriter
-
- All Implemented Interfaces:
ISkeletonWriter
public class TTXSkeletonWriter extends GenericSkeletonWriter
-
-
Field Summary
-
Fields inherited from class net.sf.okapi.common.skeleton.GenericSkeletonWriter
allowEmptyOutputTarget, ALLOWEMPTYOUTPUTTARGET, encoderManager, inputLoc, isMultilingual, layer, outputEncoding, outputLoc, storageStack
-
-
Constructor Summary
Constructors Constructor Description TTXSkeletonWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckForFilterInternalUse(String lineBreak)Verifies that this skeleton writer can be used for internal purpose by the TTXFilter for outputting skeleton chunks.protected StringprocessFragment(TextFragment frag, EncoderContext context)Outputs a fragment.StringprocessTextUnit(ITextUnit tu)Processes the TEXT_UNIT event.voidsetSourceLanguageCode(String langCode)voidsetTargetLanguageCode(String langCode)-
Methods inherited from class net.sf.okapi.common.skeleton.GenericSkeletonWriter
_processEndGroup, _processStartGroup, addToReferents, close, expandCodeContent, getContent, getContent, getEncoderManager, getInputLoc, getLayer, getOutputEncoding, getOutputLoc, getPropertyValue, getReference, getReferentCopies, getReferents, getSfWriter, getString, getString, getString, getString, getString, isAllowEmptyOutputTarget, isCodeThatDisablesEncoding, isMultilingual, processDocumentPart, processEndDocument, processEndGroup, processEndSubDocument, processEndSubfilter, processStartDocument, processStartGroup, processStartSubDocument, processStartSubfilter, setAllowEmptyOutputTarget, setEncoderManager, setLayer, setMultilingual, setOutputEncoding, setOutputLoc, setReferentCopies, setReferents
-
-
-
-
Method Detail
-
setSourceLanguageCode
public void setSourceLanguageCode(String langCode)
-
setTargetLanguageCode
public void setTargetLanguageCode(String langCode)
-
processTextUnit
public String processTextUnit(ITextUnit tu)
Description copied from interface:ISkeletonWriterProcesses the TEXT_UNIT event.- Specified by:
processTextUnitin interfaceISkeletonWriter- Overrides:
processTextUnitin classGenericSkeletonWriter- Parameters:
tu- the TextUnit resource associated with the event.- Returns:
- the string output corresponding to this event.
-
checkForFilterInternalUse
protected void checkForFilterInternalUse(String lineBreak)
Verifies that this skeleton writer can be used for internal purpose by the TTXFilter for outputting skeleton chunks.- Parameters:
lineBreak- the type of line-break to use.
-
processFragment
protected String processFragment(TextFragment frag, EncoderContext context)
Outputs a fragment.- Parameters:
frag- the fragment to outputcontext- output context: 0=text, 1=skeleton- Returns:
- the output string.
-
-