gate.email
Class EmailDocumentHandler
java.lang.Object
|
+--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.
EmailDocumentHandler
public EmailDocumentHandler()
- Constructor used in tests mostly
EmailDocumentHandler
public EmailDocumentHandler(Document aGateDocument,
Map aMarkupElementsMap,
Map anElement2StringMap)
- Constructor initialises some private fields
annotateMessages
public void annotateMessages()
throws IOException,
InvalidOffsetException
- 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.
- If the line belongs to an e-mail header then creates the
annotation if the markupElementsMap allows that.
- Lines belonging to the e-mail body are placed under a Gate
annotation called messageBody.
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
testSelf
public void testSelf()
- Test final