Package net.sf.okapi.filters.xliff
Class SdlXliffSkeletonWriter
- java.lang.Object
-
- net.sf.okapi.common.skeleton.GenericSkeletonWriter
-
- net.sf.okapi.filters.xliff.XLIFFSkeletonWriter
-
- net.sf.okapi.filters.xliff.SdlXliffSkeletonWriter
-
- All Implemented Interfaces:
ISkeletonWriter
public class SdlXliffSkeletonWriter extends XLIFFSkeletonWriter
SDL XLIFF specific xliff writer that updates sdl:seg-defs so that the file can be seen as completed.- Author:
- jimh
- See Also:
- http://wasaty.pl/blog/2012/05/22/sdlxlif-in-memoq-or-there-and-back-again/
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROP_ORIG_SDL_SEG_CONFstatic StringPROP_SDL_CONFstatic StringPROP_SDL_LOCKEDstatic StringPROP_SDL_ORIGINstatic StringPROP_SDL_ORIGIN_SYSTEMstatic StringPROP_SDL_PERCENTstatic StringPROP_SDL_TEXT_MATCHstatic StringSDL_SEG_CONF_MARKERstatic StringSDL_SEG_CONF_STARTMARKERstatic StringSDL_SEG_LOCKED_MARKERstatic StringSDL_SEG_LOCKED_STARTMARKERstatic StringSDL_SEG_ORIGIN_MARKERstatic StringSDL_SEG_ORIGIN_STARTMARKERstatic StringSDL_SEG_PROP_ENDMARKER-
Fields inherited from class net.sf.okapi.filters.xliff.XLIFFSkeletonWriter
ALTTRANSMARKER, CONTEXT_GROUP_MARKER, ITSNSDECL, NOTEMARKER, SEGSOURCEMARKER
-
Fields inherited from class net.sf.okapi.common.skeleton.GenericSkeletonWriter
allowEmptyOutputTarget, ALLOWEMPTYOUTPUTTARGET, encoderManager, inputLoc, isMultilingual, layer, outputEncoding, outputLoc, storageStack
-
-
Constructor Summary
Constructors Constructor Description SdlXliffSkeletonWriter(Parameters params)SdlXliffSkeletonWriter(Parameters params, XLIFFContent fmt, ITSContent itsCont, ITSStandoffManager itsStandoffManager, Map<String,GenericAnnotations> lqiStandoff, Map<String,GenericAnnotations> provStandoff, CharsetEncoder chsEnc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringprocessTextUnit(ITextUnit resource)Process as normal xliff but search and replace sdl patterns in skeleton.-
Methods inherited from class net.sf.okapi.filters.xliff.XLIFFSkeletonWriter
addUnusedAnnotations, expandCodeContent, getCharsetEncoder, getContent, getFmt, getItsCont, getITSStandoffManager, getLqiStandoff, getParams, getPropertyValue, getProvStandoff, getString, processEndDocument, processStartDocument, processStartGroup, processStartSubDocument, setITSStandoffManager
-
Methods inherited from class net.sf.okapi.common.skeleton.GenericSkeletonWriter
_processEndGroup, _processStartGroup, addToReferents, close, getContent, getEncoderManager, getInputLoc, getLayer, getOutputEncoding, getOutputLoc, getReference, getReferentCopies, getReferents, getSfWriter, getString, getString, getString, getString, isAllowEmptyOutputTarget, isCodeThatDisablesEncoding, isMultilingual, processDocumentPart, processEndGroup, processEndSubDocument, processEndSubfilter, processStartSubfilter, setAllowEmptyOutputTarget, setEncoderManager, setLayer, setMultilingual, setOutputEncoding, setOutputLoc, setReferentCopies, setReferents
-
-
-
-
Field Detail
-
SDL_SEG_LOCKED_MARKER
public static final String SDL_SEG_LOCKED_MARKER
- See Also:
- Constant Field Values
-
SDL_SEG_CONF_MARKER
public static final String SDL_SEG_CONF_MARKER
- See Also:
- Constant Field Values
-
SDL_SEG_ORIGIN_MARKER
public static final String SDL_SEG_ORIGIN_MARKER
- See Also:
- Constant Field Values
-
SDL_SEG_LOCKED_STARTMARKER
public static final String SDL_SEG_LOCKED_STARTMARKER
- See Also:
- Constant Field Values
-
SDL_SEG_CONF_STARTMARKER
public static final String SDL_SEG_CONF_STARTMARKER
- See Also:
- Constant Field Values
-
SDL_SEG_ORIGIN_STARTMARKER
public static final String SDL_SEG_ORIGIN_STARTMARKER
- See Also:
- Constant Field Values
-
SDL_SEG_PROP_ENDMARKER
public static final String SDL_SEG_PROP_ENDMARKER
- See Also:
- Constant Field Values
-
PROP_SDL_LOCKED
public static final String PROP_SDL_LOCKED
- See Also:
- Constant Field Values
-
PROP_SDL_CONF
public static final String PROP_SDL_CONF
- See Also:
- Constant Field Values
-
PROP_SDL_ORIGIN
public static final String PROP_SDL_ORIGIN
- See Also:
- Constant Field Values
-
PROP_ORIG_SDL_SEG_CONF
public static final String PROP_ORIG_SDL_SEG_CONF
- See Also:
- Constant Field Values
-
PROP_SDL_ORIGIN_SYSTEM
public static final String PROP_SDL_ORIGIN_SYSTEM
- See Also:
- Constant Field Values
-
PROP_SDL_PERCENT
public static final String PROP_SDL_PERCENT
- See Also:
- Constant Field Values
-
PROP_SDL_TEXT_MATCH
public static final String PROP_SDL_TEXT_MATCH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SdlXliffSkeletonWriter
public SdlXliffSkeletonWriter(Parameters params)
-
SdlXliffSkeletonWriter
public SdlXliffSkeletonWriter(Parameters params, XLIFFContent fmt, ITSContent itsCont, ITSStandoffManager itsStandoffManager, Map<String,GenericAnnotations> lqiStandoff, Map<String,GenericAnnotations> provStandoff, CharsetEncoder chsEnc)
-
-
Method Detail
-
processTextUnit
public String processTextUnit(ITextUnit resource)
Process as normal xliff but search and replace sdl patterns in skeleton.- Specified by:
processTextUnitin interfaceISkeletonWriter- Overrides:
processTextUnitin classXLIFFSkeletonWriter- Parameters:
resource- the TextUnit resource associated with the event.- Returns:
- the string output corresponding to this event.
-
-