Class XLIFFITSFilterExtension


  • public class XLIFFITSFilterExtension
    extends Object
    Extension to the XLIFFFilter to handle ITS metadata in the XLIFF document.
    • Method Detail

      • parseXLQIPos

        public static int[] parseXLQIPos​(String data,
                                         org.slf4j.Logger logger)
        Parse a four value lqiPos attribute.
        Parameters:
        data - the value to parse.
        logger - the logger to use for warnings.
        Returns:
        an array of four integers set to {0,-1,0,-1} by default.
      • setXLIFFReader

        public void setXLIFFReader​(XMLStreamReader reader)
        Sets the reader for this object. The Reader contains parsing state of the XLIFF file and should be set before parsing begins.
      • getITSStandoffManager

        public ITSStandoffManager getITSStandoffManager()
        Gets the standoff manager object for this helper object.
        Returns:
        the standoff manager object for this helper object.
      • readITSLQI

        protected ITSLQIAnnotations readITSLQI()
                                        throws IOException
        Resolves standoff and on-element ITS Language Quality Issue data attached to the current element being processed by the XMLStreamReader.
        Throws:
        IOException
      • getResourcePart

        protected static String getResourcePart​(String uriRef)
        Separates the fragment ID from the URI reference.
        Parameters:
        uriRef - the URI to process.
        Returns:
        the resource part of the given URI, or an empty string (e.g. for "#myId").
      • getFragmentIdPart

        protected static String getFragmentIdPart​(String uriRef)