de.unikiel.ipn.htmlform
Class AntiLineBreakVisitor

java.lang.Object
  |
  +--de.unikiel.ipn.htmlform.AntiLineBreakVisitor
All Implemented Interfaces:
MessageHandler, TextVisitor

class AntiLineBreakVisitor
extends java.lang.Object
implements TextVisitor

A TextVisitor to remove line breaks. They are replaced by spaces.


Constructor Summary
(package private) AntiLineBreakVisitor(MessageHandler handler)
          Creates an AntiLineBreakVisitor.
 
Method Summary
 void handleMessage(Message msg)
          Forwards the Message to the successor.
 void visit(Entry e)
          Removes linebreaks from the content of the Entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntiLineBreakVisitor

AntiLineBreakVisitor(MessageHandler handler)
Creates an AntiLineBreakVisitor.

Parameters:
handler - the MessageHandler for error messages that may occur.
Method Detail

visit

public void visit(Entry e)
Removes linebreaks from the content of the Entry. Intended linebreaks at the end of a section are preserved. They are identified by one of ".!?" at the end of a line.

Specified by:
visit in interface TextVisitor
Parameters:
e - the entry that shall be changed.
See Also:
Entry.accept(TextVisitor)

handleMessage

public void handleMessage(Message msg)
Forwards the Message to the successor. See constructor.

Specified by:
handleMessage in interface MessageHandler
Parameters:
msg - the message that shall be passed to the successor.