org.ow2.weblab.service.normaliser.tika.handlers
Class SimpleTextContentHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.tika.sax.ContentHandlerDecorator
org.ow2.weblab.service.normaliser.tika.handlers.WebLabHandlerDecorator
org.ow2.weblab.service.normaliser.tika.handlers.SimpleTextContentHandler
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
public class SimpleTextContentHandler
- extends WebLabHandlerDecorator
This class is the simplest exemple of WebLab Handler Decorator.
It creates a single Text unit with the concatenation of the HTML content in the Handler.
- Author:
- WebLab IPCC Team
- Date:
- 2011-12-06
|
Method Summary |
void |
characters(char[] ch,
int start,
int length)
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name)
|
void |
setDocument(Document document)
Sets the document that should be enriched when processing the content with the handler. |
void |
setTikaConfiguration(TikaConfiguration tikaConfiguration)
Sends the service configuration to this decorator. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name,
org.xml.sax.Attributes atts)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SimpleTextContentHandler
public SimpleTextContentHandler()
startElement
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
- Specified by:
startElement in interface org.xml.sax.ContentHandler- Overrides:
startElement in class ContentHandlerDecorator
- Throws:
org.xml.sax.SAXException
endElement
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name)
throws org.xml.sax.SAXException
- Specified by:
endElement in interface org.xml.sax.ContentHandler- Overrides:
endElement in class ContentHandlerDecorator
- Throws:
org.xml.sax.SAXException
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
setDocument
public void setDocument(Document document)
- Description copied from class:
WebLabHandlerDecorator
- Sets the document that should be enriched when processing the content with the handler.
- Specified by:
setDocument in class WebLabHandlerDecorator
- Parameters:
document - The WebLab document to be enriched
setTikaConfiguration
public void setTikaConfiguration(TikaConfiguration tikaConfiguration)
- Description copied from class:
WebLabHandlerDecorator
- Sends the service configuration to this decorator. It will be called even if the configuration is not used inside.
- Specified by:
setTikaConfiguration in class WebLabHandlerDecorator
- Parameters:
tikaConfiguration - The service configuration
Copyright © 2004-2012. All Rights Reserved.