public class XLIFF2TerminologyPackageWriter extends XLIFF2PackageWriter
GlossaryAnnotation should be present in source segment Segment in order
to perform the writing.
Also it is capable to annotate source and target segments with references to generated glossary entry ids.
For this, the fields GlossaryAnnotation.isAnnotateSourceSegment() and GlossaryAnnotation.isAnnotateTargetSegment()
from GlossaryAnnotation are used to indicate if the annotation should be done.| Modifier and Type | Field and Description |
|---|---|
static String |
GLS_SEGMENT_REF_PREFIX |
POBJECTS_DIRcopiedTargetsLikeApproved, docId, extractionType, inputRootDir, manifest, params, rootDir, skelWriter, supporstOneOutputPerInput, tempTmxPathAlternates, tempTmxPathApproved, tempTmxPathLeverage, tempTmxPathUnApproved, tmxInfoAlreadySet, tmxPathAlternates, tmxPathApproved, tmxPathLeverage, tmxPathUnApproved, tmxWriterAlternates, tmxWriterApproved, tmxWriterLeverage, tmxWriterUnApproved, useLetterCodes, zeroBasedLetterCodes| Constructor and Description |
|---|
XLIFF2TerminologyPackageWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addGlossary(Unit xliffUnit,
GlossaryAnnotation glossaryAnnotation)
Method which converts OKAPI glossary entries to XLIFF format and adds them to XLIFF glossary element.
|
protected void |
addGlossaryReferences(Segment xliffSegment,
GlossaryAnnotation glossaryAnnotation)
Method which annotates source and target XLIFF segments with references to generated glossary entry ids.
|
protected Unit |
toXLIFF2Unit(ITextUnit unit) |
close, getCreeatTipPackage, getName, processDocumentPart, processEndBatch, processEndDocument, processEndGroup, processEndSubDocument, processStartBatch, processStartDocument, processStartGroup, processStartSubDocument, processTextUnit, toXLIFF2StartGroupDatacancel, copySupportMaterial, creatRawDocumentEventSet, getEncoderManager, getMainOutputPath, getParameters, getSkeletonWriter, handleEvent, initializeTMXWriters, processEndBatchItem, processRawDocument, processStartBatchItem, setBatchInformation, setDocumentInformation, setOptions, setOutput, setOutput, setParameters, setSupporstOneOutputPerInput, setTMXInfo, writeTMXEntriespublic static final String GLS_SEGMENT_REF_PREFIX
protected Unit toXLIFF2Unit(ITextUnit unit)
toXLIFF2Unit in class XLIFF2PackageWriterprotected void addGlossaryReferences(Segment xliffSegment, GlossaryAnnotation glossaryAnnotation)
xliffSegment - XLIFF segment where glossary entries annotation will be doneglossaryAnnotation - glossary annotation for XLIFF segmentprotected void addGlossary(Unit xliffUnit, GlossaryAnnotation glossaryAnnotation)
xliffUnit - XLIFF unitglossaryAnnotation - okapi glossary annotation taken from source segmentCopyright © 2021. All rights reserved.