gate.email
Class EmailDocumentHandler

java.lang.Object
  extended by gate.email.EmailDocumentHandler

public class EmailDocumentHandler
extends Object

This class implements the behaviour of the Email reader It takes the Gate Document representing a list with e-mails and creates Gate annotations on it.


Field Summary
protected  List myStatusListeners
           
 
Constructor Summary
EmailDocumentHandler()
          Constructor used in tests mostly
EmailDocumentHandler(Document aGateDocument, Map aMarkupElementsMap, Map anElement2StringMap)
          Constructor initialises some private fields
 
Method Summary
 void addStatusListener(StatusListener listener)
          This methos is called when a listener is registered with this class
 void annotateMessages()
          Reads the Gate Document line by line and does the folowing things: Each line is analized in order to detect where an e-mail starts.
protected  void fireStatusChangedEvent(String text)
          This methos is called whenever we need to inform the listener about an event.
 void removeStatusListener(StatusListener listener)
          This methos is called when a listener is removed
 void testSelf()
          Test final
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myStatusListeners

protected List myStatusListeners
Constructor Detail

EmailDocumentHandler

public EmailDocumentHandler()
Constructor used in tests mostly


EmailDocumentHandler

public EmailDocumentHandler(Document aGateDocument,
                            Map aMarkupElementsMap,
                            Map anElement2StringMap)
Constructor initialises some private fields

Method Detail

annotateMessages

public void annotateMessages()
                      throws IOException,
                             InvalidOffsetException
Reads the Gate Document line by line and does the folowing things:

Throws:
IOException
InvalidOffsetException

addStatusListener

public void addStatusListener(StatusListener listener)
This methos is called when a listener is registered with this class


removeStatusListener

public void removeStatusListener(StatusListener listener)
This methos is called when a listener is removed


fireStatusChangedEvent

protected void fireStatusChangedEvent(String text)
This methos is called whenever we need to inform the listener about an event.


testSelf

public void testSelf()
Test final