Package opennlp.tools.formats.muc

# 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 Summary

  Constructors
  Constructor
  Description
  `ContentHandler()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract void`
  `characters(CharSequence chars)`
  Handles a set of characters between SGML start and end tag.
  `abstract void`
  `endElement(String name)`
  Handles a SGML end element.
  `abstract void`
  `startElement(String name, Map<String,String> attributes)`
  Handles a SGML start element.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ContentHandler

    public ContentHandler()

- ## Method Details

  - ### startElement

    public abstract void startElement(String name, Map<String,String> attributes) throws opennlp.tools.util.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:
      `opennlp.tools.util.InvalidFormatException` - Thrown if parameters were invalid.

  - ### characters

    public abstract void characters(CharSequence chars) throws opennlp.tools.util.InvalidFormatException
    Handles a set of characters between SGML start and end tag.
    Parameters:
      `chars` - The characters to process.
    Throws:
      `opennlp.tools.util.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.