org.ow2.weblab.service.normaliser.tika.handlers
Class WebLabHandlerDecorator

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.apache.tika.sax.ContentHandlerDecorator
          extended by org.ow2.weblab.service.normaliser.tika.handlers.WebLabHandlerDecorator
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
Direct Known Subclasses:
MediaUnitContentHandler, SimpleTextContentHandler

public abstract class WebLabHandlerDecorator
extends org.apache.tika.sax.ContentHandlerDecorator

This class is an abstract handler decorator that should be specialised and instantiated inside the TikaService for the creation of WebLab document when parsing the HTML Tika output. It contains two methods that should be overridden (even if they are not really used). They are called by the TikaService when instanciating the Handler.

Author:
WebLab IPCC Team
Date:
2011-12-06

Constructor Summary
WebLabHandlerDecorator()
          The default constructor
 
Method Summary
 void setContentHandler(org.xml.sax.ContentHandler handler)
           
abstract  void setDocument(org.ow2.weblab.core.model.Document document)
          Sets the document that should be enriched when processing the content with the handler.
abstract  void setTikaConfiguration(TikaConfiguration tikaConfiguration)
          Sends the service configuration to this decorator.
 
Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator
characters, endDocument, endElement, endPrefixMapping, handleException, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, toString
 
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
 

Constructor Detail

WebLabHandlerDecorator

public WebLabHandlerDecorator()
The default constructor

Method Detail

setDocument

public abstract void setDocument(org.ow2.weblab.core.model.Document document)
Sets the document that should be enriched when processing the content with the handler.

Parameters:
document - The WebLab document to be enriched

setTikaConfiguration

public abstract void setTikaConfiguration(TikaConfiguration tikaConfiguration)
Sends the service configuration to this decorator. It will be called even if the configuration is not used inside.

Parameters:
tikaConfiguration - The service configuration

setContentHandler

public void setContentHandler(org.xml.sax.ContentHandler handler)
Overrides:
setContentHandler in class org.apache.tika.sax.ContentHandlerDecorator


Copyright © 2004-2012. All Rights Reserved.