Class NotesMapper


  • public class NotesMapper
    extends Object
    Saves properties from the XLIFF Toolkit into Okapi Core and back. The properties saved involve primarily attributes, and other data that does not fit neatly within the Okapi Core Pipeline structure.

    Since the operation to and from should be equivalent, we put both operations in here to make it easier to compare them.

    • Method Detail

      • setNotes

        public static void setNotes​(IWithAnnotations sourceAnnotationsHolder,
                                    IWithNotes targetXliffNotesHolder)
        Takes annotations from Okapi Core and stores them as XLIFF 2.0 notes
        Parameters:
        sourceAnnotationsHolder - The source of the annotations.
        targetXliffNotesHolder - The destination where the notes will be stored.
      • setAnnotations

        public static void setAnnotations​(IWithNotes sourceXliffNotesHolder,
                                          IWithAnnotations targetAnnotationsHolder)
        Takes notes from XLIFF 2.0 and stores them as Okapi Core Annotations
        Parameters:
        sourceXliffNotesHolder - The source of the notes.
        targetAnnotationsHolder - The destination to store the annotations
      • setNotes

        public static void setNotes​(IWithAnnotations sourceAnnotationsHolder,
                                    StartFileData targetStartFileData)
        A placeholder to give a warning if annotations are detected in the StartSubDocument. If the StartSubDocument has some annotations, they will be lost and a warning will be logged. The StartFileData class from the XLIFF Toolkit does not implement IWithNotes, instead the notes in a <file> element are stored in MidFileData. In a future update we could potentially transfer the annotations from the StartSubDocument to the MidFileData.
        Parameters:
        sourceAnnotationsHolder - The source of the notes.
        targetStartFileData - The destination where Notes are attempting to be stored