Package org.apache.tika.parser.ctakes
Class CTAKESContentHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.apache.tika.sax.ContentHandlerDecorator
-
- org.apache.tika.parser.ctakes.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 Summary
Fields Modifier and Type Field Description static java.lang.String
CTAKES_META_PREFIX
-
Constructor Summary
Constructors Constructor Description CTAKESContentHandler()
Default constructor.CTAKESContentHandler(org.xml.sax.ContentHandler handler, Metadata metadata)
Creates a newCTAKESContentHandler
for the givenContentHandler
and Metadata objects.CTAKESContentHandler(org.xml.sax.ContentHandler handler, Metadata metadata, CTAKESConfig config)
Creates a newCTAKESContentHandler
for the givenContentHandler
and Metadata objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
void
endDocument()
Metadata
getMetadata()
Returns metadata that includes cTAKES annotations.-
Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator
endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, toString
-
-
-
-
Constructor Detail
-
CTAKESContentHandler
public CTAKESContentHandler(org.xml.sax.ContentHandler handler, Metadata metadata, CTAKESConfig config)
Creates a newCTAKESContentHandler
for the givenContentHandler
and Metadata objects.- Parameters:
handler
- theContentHandler
object to be decorated.metadata
- theMetadata
object that will be populated using biomedical information extracted by cTAKES.config
- theCTAKESConfig
object used to configure the handler.
-
CTAKESContentHandler
public CTAKESContentHandler(org.xml.sax.ContentHandler handler, Metadata metadata)
Creates a newCTAKESContentHandler
for the givenContentHandler
and Metadata objects.- Parameters:
handler
- theContentHandler
object to be decorated.metadata
- theMetadata
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 interfaceorg.xml.sax.ContentHandler
- Overrides:
characters
in classContentHandlerDecorator
- Throws:
org.xml.sax.SAXException
-
endDocument
public void endDocument() throws org.xml.sax.SAXException
- Specified by:
endDocument
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endDocument
in classContentHandlerDecorator
- Throws:
org.xml.sax.SAXException
-
-