Class AbstractChecker

    • Field Detail

      • WORDCHARS

        public static final Pattern WORDCHARS
      • WORDCHARS_NONUMBERS

        public static final Pattern WORDCHARS_NONUMBERS
    • Constructor Detail

      • AbstractChecker

        public AbstractChecker()
    • Method Detail

      • fromFragmentToGeneric

        public static int fromFragmentToGeneric​(TextFragment frag,
                                                int pos)
        Converts a position in a coded-text string into the same position when the string display uses generic codes.
        Parameters:
        frag - the text-fragment displayed.
        pos - the position in the coded-text string
        Returns:
        the position when the codes' generic representations are used
      • fromOriginalToGeneric

        public static int fromOriginalToGeneric​(TextFragment frag,
                                                int pos)
        Converts a position in a string display using the original code data into the same position when the string display uses generic codes.
        Parameters:
        frag - the text-fragment displayed.
        pos - the position when the codes' original data are used
        Returns:
        the position when the codes' generic representations are used
      • fromStrippedToGeneric

        public static int fromStrippedToGeneric​(TextFragment frag,
                                                int pos)
        Converts a position in a string display where codes are stripped into the same position when the string display uses generic codes.
        Parameters:
        frag - the text-fragment displayed.
        pos - the position when the codes are stripped.
        Returns:
        the position when the codes' generic representations are used
      • fromStrippedToString

        public static int fromStrippedToString​(TextFragment frag,
                                               int pos)
        Converts a position in a string display where codes are stripped into the same position when the string display uses original data.
        Parameters:
        frag - the text-fragment displayed.
        pos - the position when the codes are stripped
        Returns:
        the position when the codes' original data are used.
      • processStartSubDocument

        public void processStartSubDocument​(StartSubDocument ssd)
      • processTextUnit

        public abstract void processTextUnit​(ITextUnit tu)
      • addAnnotation

        public void addAnnotation​(TextContainer tc,
                                  String segId,
                                  IssueType issueType,
                                  String comment,
                                  int srcStart,
                                  int srcEnd,
                                  int trgStart,
                                  int trgEnd,
                                  double severity,
                                  List<Code> codes)
      • getSrcLoc

        public LocaleId getSrcLoc()
      • getTrgLoc

        public LocaleId getTrgLoc()
      • getCurrentDocId

        public URI getCurrentDocId()
      • getCurrentSubDocId

        public String getCurrentSubDocId()
      • isMonolingual

        public boolean isMonolingual()
      • getDisplay

        protected String getDisplay​(TextFragment frag)
        Generates the display string for a source or target text-fragment (e.g. a segment).
        Parameters:
        frag - the fragment to display.
        Returns:
        the string representation based on the options (e.g. tags: original data or generic)
      • getDisplay

        protected String getDisplay​(TextContainer tc)
        Generates the display string for a source or target text=container.
        Parameters:
        tc - the text-container to display.
        Returns:
        the string representation based on the options (e.g. tags: original data or generic)