Class XMLMapper


  • public class XMLMapper
    extends Object
    Generic XML to UIMA TypeSystem mapper. It is intended to be used by an UIMA CollectionReader.
    Author:
    muehlhausen, weigel
    • Method Detail

      • setIgnoreTrivialWhitespaces

        public void setIgnoreTrivialWhitespaces​(boolean ignoreTrivialWhitespaces)

        Whether or not to ignore trivial XML whitespaces and newlines according to VTDGen.enableIgnoredWhiteSpace(boolean).

        Activating this will ignore whitespaces that exist between XML tags and have no other character data. This is not always desired behavior. Inline-annotated text may contain whitespaces between two tags that should actually retained in the document text.

        Parameters:
        ignoreTrivialWhitespaces -
      • parse

        public void parse​(byte[] data,
                          byte[] identifier,
                          org.apache.uima.jcas.JCas jcas)
      • parse

        public void parse​(File file,
                          org.apache.uima.jcas.JCas jcas)
                   throws Throwable
        parses the File to the jcas
        Parameters:
        file -
        jcas -
        Throws:
        org.apache.uima.collection.CollectionException
        Throwable