eu.dicodeproject.analysis.examples
Class MailHandler

java.lang.Object
  extended by eu.dicodeproject.analysis.examples.MailHandler
All Implemented Interfaces:
MailContentHandler, ContentHandler

public final class MailHandler
extends Object
implements MailContentHandler

Accepts events resulting from parsing mbox archives. Each mail's content is stored in a sequence file (used as value part of a key value pair, key is a combination of the original mbox archive location + a running number.) Class is not threadsafe.


Constructor Summary
MailHandler(org.apache.mahout.text.ChunkedWriter writer)
           
 
Method Summary
 void characters(char[] arg0, int arg1, int arg2)
           
 void endDocument()
           
 void endElement(String arg0, String arg1, String arg2)
           
 void endPrefixMapping(String arg0)
           
 String getPrefix()
           
 void ignorableWhitespace(char[] arg0, int arg1, int arg2)
           
 void processingInstruction(String arg0, String arg1)
           
 void setDocumentLocator(Locator arg0)
           
 void setPrefix(String targetKeyPrefix)
           
 void skippedEntity(String arg0)
           
 void startDocument()
           
 void startElement(String arg0, String arg1, String arg2, Attributes arg3)
           
 void startPrefixMapping(String arg0, String arg1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailHandler

public MailHandler(org.apache.mahout.text.ChunkedWriter writer)
Method Detail

getPrefix

public String getPrefix()

setPrefix

public void setPrefix(String targetKeyPrefix)
Specified by:
setPrefix in interface MailContentHandler

startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Throws:
SAXException

characters

public void characters(char[] arg0,
                       int arg1,
                       int arg2)
                throws SAXException
Specified by:
characters in interface ContentHandler
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
Specified by:
endDocument in interface ContentHandler
Throws:
SAXException

startElement

public void startElement(String arg0,
                         String arg1,
                         String arg2,
                         Attributes arg3)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Throws:
SAXException

endElement

public void endElement(String arg0,
                       String arg1,
                       String arg2)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Throws:
SAXException

endPrefixMapping

public void endPrefixMapping(String arg0)
                      throws SAXException
Specified by:
endPrefixMapping in interface ContentHandler
Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] arg0,
                                int arg1,
                                int arg2)
                         throws SAXException
Specified by:
ignorableWhitespace in interface ContentHandler
Throws:
SAXException

processingInstruction

public void processingInstruction(String arg0,
                                  String arg1)
                           throws SAXException
Specified by:
processingInstruction in interface ContentHandler
Throws:
SAXException

setDocumentLocator

public void setDocumentLocator(Locator arg0)
Specified by:
setDocumentLocator in interface ContentHandler

skippedEntity

public void skippedEntity(String arg0)
                   throws SAXException
Specified by:
skippedEntity in interface ContentHandler
Throws:
SAXException

startPrefixMapping

public void startPrefixMapping(String arg0,
                               String arg1)
                        throws SAXException
Specified by:
startPrefixMapping in interface ContentHandler
Throws:
SAXException


Copyright © 2011. All Rights Reserved.