Package opennlp.tools.formats.muc
Class SgmlParser.ContentHandler
java.lang.Object
opennlp.tools.formats.muc.SgmlParser.ContentHandler
- Direct Known Subclasses:
MucNameContentHandler
- Enclosing class:
SgmlParser
Defines methods to handle content produced by a
SgmlParser
.
A concrete implementation interprets the document specific details.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract 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.
-
Constructor Details
-
ContentHandler
public ContentHandler()
-
-
Method Details
-
startElement
public abstract void startElement(String name, Map<String, String> attributes) throws InvalidFormatExceptionHandles 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
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
Handles a SGML end element.- Parameters:
name
- The name of the element's end tag.
-