Class CTAKESContentHandler

  • All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

    public class CTAKESContentHandler
    extends ContentHandlerDecorator
    Class used to extract biomedical information while parsing.

    This class relies on Apache cTAKES that is a natural language processing system for extraction of information from electronic medical record clinical free-text.

    • Field Detail

      • CTAKES_META_PREFIX

        public static java.lang.String CTAKES_META_PREFIX
    • Constructor Detail

      • CTAKESContentHandler

        public CTAKESContentHandler​(org.xml.sax.ContentHandler handler,
                                    Metadata metadata,
                                    CTAKESConfig config)
        Creates a new CTAKESContentHandler for the given ContentHandler and Metadata objects.
        Parameters:
        handler - the ContentHandler object to be decorated.
        metadata - the Metadata object that will be populated using biomedical information extracted by cTAKES.
        config - the CTAKESConfig object used to configure the handler.
      • CTAKESContentHandler

        public CTAKESContentHandler​(org.xml.sax.ContentHandler handler,
                                    Metadata metadata)
        Creates a new CTAKESContentHandler for the given ContentHandler and Metadata objects.
        Parameters:
        handler - the ContentHandler object to be decorated.
        metadata - the Metadata object that will be populated using biomedical information extracted by cTAKES.
      • CTAKESContentHandler

        public CTAKESContentHandler()
        Default constructor.
    • Method Detail

      • characters

        public void characters​(char[] ch,
                               int start,
                               int length)
                        throws org.xml.sax.SAXException
        Specified by:
        characters in interface org.xml.sax.ContentHandler
        Overrides:
        characters in class ContentHandlerDecorator
        Throws:
        org.xml.sax.SAXException
      • endDocument

        public void endDocument()
                         throws org.xml.sax.SAXException
        Specified by:
        endDocument in interface org.xml.sax.ContentHandler
        Overrides:
        endDocument in class ContentHandlerDecorator
        Throws:
        org.xml.sax.SAXException
      • getMetadata

        public Metadata getMetadata()
        Returns metadata that includes cTAKES annotations.
        Returns:
        Metadata object that includes cTAKES annotations.