Class SgmlParser.ContentHandler

java.lang.Object
opennlp.tools.formats.muc.SgmlParser.ContentHandler
Direct Known Subclasses:
MucNameContentHandler
Enclosing class:
SgmlParser

public abstract static class SgmlParser.ContentHandler extends Object
Defines methods to handle content produced by a SgmlParser. A concrete implementation interprets the document specific details.
  • Constructor Details

    • ContentHandler

      public ContentHandler()
  • Method Details

    • startElement

      public abstract void startElement(String name, Map<String,String> attributes) throws InvalidFormatException
      Handles a SGML start element.
      Parameters:
      name - The name of the element's start tag.
      attributes - The attributes supplied with the start tag. It may be empty.
      Throws:
      InvalidFormatException - Thrown if parameters were invalid.
    • characters

      public abstract void characters(CharSequence chars) throws InvalidFormatException
      Handles a set of characters between SGML start and end tag.
      Parameters:
      chars - The characters to process.
      Throws:
      InvalidFormatException - Thrown if parameters were invalid.
    • endElement

      public abstract void endElement(String name)
      Handles a SGML end element.
      Parameters:
      name - The name of the element's end tag.