gate.yam.format
Class YamFormatter

java.lang.Object
  extended by gate.yam.format.YamFormatter

public class YamFormatter
extends Object

Format utility for YAM based on JAPE.

Author:
Niraj Aswani

Constructor Summary
YamFormatter()
           
 
Method Summary
static void normalise(gate.Document doc, StringBuilder content)
          Normalise the spacing in an annotated YAM document.
static void setDocumentProcessor(DocumentProcessor p)
           
static void wrap(StringBuilder inputText, int startOffset, int endOffset, int indentLevel, int textWidth)
          Wrap a range of text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YamFormatter

public YamFormatter()
Method Detail

setDocumentProcessor

public static void setDocumentProcessor(DocumentProcessor p)

normalise

public static void normalise(gate.Document doc,
                             StringBuilder content)
Normalise the spacing in an annotated YAM document.

Parameters:
doc - a GATE doc that's annotated with all the YAM constituents
content - the content that the GATE doc was built from

wrap

public static void wrap(StringBuilder inputText,
                        int startOffset,
                        int endOffset,
                        int indentLevel,
                        int textWidth)
Wrap a range of text.

Parameters:
inputText - buffer that contains a range to modify
startOffset - start offset of the range to wrap
endOffset - end offset of the range to wrap
indentLevel - left margin for the range
textWidth - wrap margin