uk.ac.starlink.ttools
Class Formatter

java.lang.Object
  extended by uk.ac.starlink.ttools.Formatter

public class Formatter
extends Object

Assists in formatting text for output on the terminal.

Since:
31 Aug 2005
Author:
Mark Taylor

Constructor Summary
Formatter()
          Constructor.
 
Method Summary
 String formatXML(String xml, int indent)
          Returns a string which is a formatted version of an XML string.
 String getManualName()
          Returns the text used to refer in formatted output to the STILTS manual.
 void setManualName(String name)
          Sets the text used to refer in formatted output to the STILTS manual.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Formatter

public Formatter()
Constructor.

Method Detail

formatXML

public String formatXML(String xml,
                        int indent)
                 throws SAXException
Returns a string which is a formatted version of an XML string. The result is suitable for output on the terminal. A few elements, such as p, code, ul, ref etc may be treated specially.

Parameters:
xml - XML text
indent - number of spaces to indent every line
Throws:
SAXException

setManualName

public void setManualName(String name)
Sets the text used to refer in formatted output to the STILTS manual.

Parameters:
name - manual reference name

getManualName

public String getManualName()
Returns the text used to refer in formatted output to the STILTS manual.

Returns:
manual reference name


Copyright © 2009 Central Laboratory of the Research Councils. All Rights Reserved.