nu.validator.messages
Class TextMessageEmitter

java.lang.Object
  extended by nu.validator.messages.MessageEmitter
      extended by nu.validator.messages.TextMessageEmitter

public class TextMessageEmitter
extends MessageEmitter


Field Summary
private static char[] AT_LINE
           
private static char[] COLON_SPACE
           
private static char[] COLUMN
           
private  boolean exact
           
private static char[] FROM_LINE
           
private static char[] IN_RESOURCE
           
private  TextMessageTextHandler messageTextHandler
           
private static char[] ON_LINE
           
private  int oneBasedFirstColumn
           
private  int oneBasedFirstLine
           
private  int oneBasedLastColumn
           
private  int oneBasedLastLine
           
private static char[] PERIOD
           
private  String systemId
           
private  boolean textEmitted
           
private static char[] TO_LINE
           
private  Writer writer
           
 
Constructor Summary
TextMessageEmitter(OutputStream out)
           
 
Method Summary
private  void emitErrorLevel(char[] level)
           
private  void emitLineLocation()
           
private  void emitRangeLocation()
           
private  void emitSingleLocation()
           
private  void emitSystemId()
           
 void endMessage()
           
 void endMessages()
           
 void endText()
           
private  void maybeEmitInResource()
           
private  void maybeEmitLocation()
           
private static Writer newOutputStreamWriter(OutputStream out)
           
 void startMessage(MessageType type, String systemId, int oneBasedFirstLine, int oneBasedFirstColumn, int oneBasedLastLine, int oneBasedLastColumn, boolean exact)
           
 void startMessages(String documentUri, boolean willShowSource)
           
 ResultHandler startResult()
           
 MessageTextHandler startText()
           
 
Methods inherited from class nu.validator.messages.MessageEmitter
endElaboration, endFullSource, endResult, endSource, startElaboration, startFullSource, startSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLON_SPACE

private static final char[] COLON_SPACE

PERIOD

private static final char[] PERIOD

ON_LINE

private static final char[] ON_LINE

AT_LINE

private static final char[] AT_LINE

FROM_LINE

private static final char[] FROM_LINE

TO_LINE

private static final char[] TO_LINE

COLUMN

private static final char[] COLUMN

IN_RESOURCE

private static final char[] IN_RESOURCE

writer

private final Writer writer

messageTextHandler

private final TextMessageTextHandler messageTextHandler

systemId

private String systemId

oneBasedFirstLine

private int oneBasedFirstLine

oneBasedFirstColumn

private int oneBasedFirstColumn

oneBasedLastLine

private int oneBasedLastLine

oneBasedLastColumn

private int oneBasedLastColumn

exact

private boolean exact

textEmitted

private boolean textEmitted
Constructor Detail

TextMessageEmitter

public TextMessageEmitter(OutputStream out)
Method Detail

newOutputStreamWriter

private static Writer newOutputStreamWriter(OutputStream out)

emitErrorLevel

private void emitErrorLevel(char[] level)
                     throws IOException
Throws:
IOException

maybeEmitLocation

private void maybeEmitLocation()
                        throws IOException
Throws:
IOException

maybeEmitInResource

private void maybeEmitInResource()
                          throws IOException
Throws:
SAXException
IOException

emitSystemId

private void emitSystemId()
                   throws IOException
Throws:
SAXException
IOException

emitRangeLocation

private void emitRangeLocation()
                        throws IOException
Throws:
IOException

emitSingleLocation

private void emitSingleLocation()
                         throws IOException
Throws:
IOException

emitLineLocation

private void emitLineLocation()
                       throws IOException
Throws:
IOException

startMessage

public void startMessage(MessageType type,
                         String systemId,
                         int oneBasedFirstLine,
                         int oneBasedFirstColumn,
                         int oneBasedLastLine,
                         int oneBasedLastColumn,
                         boolean exact)
                  throws SAXException
Specified by:
startMessage in class MessageEmitter
Throws:
SAXException

endMessages

public void endMessages()
                 throws SAXException
Overrides:
endMessages in class MessageEmitter
Throws:
SAXException
See Also:
MessageEmitter.endMessages()

endText

public void endText()
             throws SAXException
Overrides:
endText in class MessageEmitter
Throws:
SAXException
See Also:
MessageEmitter.endText()

startMessages

public void startMessages(String documentUri,
                          boolean willShowSource)
                   throws SAXException
Overrides:
startMessages in class MessageEmitter
Throws:
SAXException
See Also:
nu.validator.messages.MessageEmitter#startMessages(java.lang.String)

startText

public MessageTextHandler startText()
                             throws SAXException
Overrides:
startText in class MessageEmitter
Throws:
SAXException
See Also:
MessageEmitter.startText()

endMessage

public void endMessage()
                throws SAXException
Specified by:
endMessage in class MessageEmitter
Throws:
SAXException

startResult

public ResultHandler startResult()
                          throws SAXException
Overrides:
startResult in class MessageEmitter
Throws:
SAXException
See Also:
MessageEmitter.startResult()