Class BasePackageWriter

    • Field Detail

      • docId

        protected int docId
      • extractionType

        protected String extractionType
      • supporstOneOutputPerInput

        protected boolean supporstOneOutputPerInput
      • inputRootDir

        protected String inputRootDir
      • rootDir

        protected String rootDir
      • tmxWriterApproved

        protected TMXWriter tmxWriterApproved
      • tmxPathApproved

        protected String tmxPathApproved
      • tempTmxPathApproved

        protected String tempTmxPathApproved
      • tmxWriterUnApproved

        protected TMXWriter tmxWriterUnApproved
      • tmxPathUnApproved

        protected String tmxPathUnApproved
      • tempTmxPathUnApproved

        protected String tempTmxPathUnApproved
      • tmxWriterAlternates

        protected TMXWriter tmxWriterAlternates
      • tmxPathAlternates

        protected String tmxPathAlternates
      • tempTmxPathAlternates

        protected String tempTmxPathAlternates
      • tmxWriterLeverage

        protected TMXWriter tmxWriterLeverage
      • tmxPathLeverage

        protected String tmxPathLeverage
      • tempTmxPathLeverage

        protected String tempTmxPathLeverage
      • copiedTargetsLikeApproved

        protected boolean copiedTargetsLikeApproved
      • useLetterCodes

        protected boolean useLetterCodes
      • zeroBasedLetterCodes

        protected boolean zeroBasedLetterCodes
      • tmxInfoAlreadySet

        protected boolean tmxInfoAlreadySet
    • Constructor Detail

      • BasePackageWriter

        public BasePackageWriter​(String extractionType)
    • Method Detail

      • getMainOutputPath

        public String getMainOutputPath()
      • cancel

        public void cancel()
        Description copied from interface: IFilterWriter
        Cancels the current process.
        Specified by:
        cancel in interface IFilterWriter
      • getEncoderManager

        public EncoderManager getEncoderManager()
        Description copied from interface: IFilterWriter
        Gets the current encoder manager for this writer. Some special implementation of IFilterWriter may not use an encoder manager (for example writers that do not use skeleton).
        Specified by:
        getEncoderManager in interface IFilterWriter
        Returns:
        the current encoder manager for this writer, or null if none exists for this writer.
      • getSkeletonWriter

        public ISkeletonWriter getSkeletonWriter()
        Description copied from interface: IFilterWriter
        Gets the skeleton writer associated with this writer. Some implementation of IFilterWriter may not use a skeleton writer.
        Specified by:
        getSkeletonWriter in interface IFilterWriter
        Returns:
        the skeleton writer associated with this writer or null if none is associated.
      • handleEvent

        public Event handleEvent​(Event event)
        Description copied from interface: IFilterWriter
        Handles the filter events.
        Specified by:
        handleEvent in interface IFilterWriter
        Parameters:
        event - The event to process.
        Returns:
        The event that was processed.
      • setOptions

        public void setOptions​(LocaleId locale,
                               String defaultEncoding)
        Description copied from interface: IFilterWriter
        Sets the options for this writer.
        Specified by:
        setOptions in interface IFilterWriter
        Parameters:
        locale - the output locale.
        defaultEncoding - Name of the character set encoding for the output.
      • setOutput

        public void setOutput​(String path)
        Description copied from interface: IFilterWriter
        Sets the output through the path of the output file.
        Specified by:
        setOutput in interface IFilterWriter
        Parameters:
        path - Full path of the output file.
      • setOutput

        public void setOutput​(OutputStream output)
        Description copied from interface: IFilterWriter
        Sets the output through its output stream.
        Specified by:
        setOutput in interface IFilterWriter
        Parameters:
        output - Output stream to use for the output.
      • processStartBatch

        protected void processStartBatch()
      • setTMXInfo

        protected void setTMXInfo​(boolean generate,
                                  String pathApproved,
                                  boolean useLetterCodes,
                                  boolean zerobasedletterCodes,
                                  boolean overwrite)
      • initializeTMXWriters

        protected void initializeTMXWriters()
      • processEndBatch

        protected void processEndBatch()
      • processStartBatchItem

        protected void processStartBatchItem()
      • processEndBatchItem

        protected void processEndBatchItem()
      • processRawDocument

        protected void processRawDocument​(Event event)
      • processStartDocument

        protected void processStartDocument​(Event event)
      • processEndDocument

        protected abstract Event processEndDocument​(Event event)
      • processStartSubDocument

        protected void processStartSubDocument​(Event event)
      • processEndSubDocument

        protected void processEndSubDocument​(Event event)
      • processStartGroup

        protected void processStartGroup​(Event event)
      • processEndGroup

        protected void processEndGroup​(Event event)
      • processDocumentPart

        protected void processDocumentPart​(Event event)
      • processTextUnit

        protected abstract void processTextUnit​(Event event)
      • writeTMXEntries

        protected void writeTMXEntries​(ITextUnit tu)
      • copySupportMaterial

        protected void copySupportMaterial()