public class Formatter
extends java.lang.Object
Constructor and Description |
---|
Formatter()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntity(java.lang.String entName,
java.lang.String entValue)
Adds an internal entity declaration to this formatter.
|
static java.lang.String |
formatWords(java.util.List<java.lang.String> wordList,
int indent)
Utility method for writing a number of unbreakable words on the
terminal.
|
java.lang.String |
formatXML(java.lang.String xml,
int indent)
Returns a string which is a formatted version of an XML string.
|
java.lang.String |
getManualName()
Returns the text used to refer in formatted output to the STILTS manual.
|
void |
setManualName(java.lang.String name)
Sets the text used to refer in formatted output to the STILTS manual.
|
public java.lang.String formatXML(java.lang.String xml, int indent) throws org.xml.sax.SAXException
xml
- XML textindent
- number of spaces to indent every lineorg.xml.sax.SAXException
public void setManualName(java.lang.String name)
name
- manual reference namepublic java.lang.String getManualName()
public void addEntity(java.lang.String entName, java.lang.String entValue)
formatXML
method.entName
- internal entity nameentValue
- entity valuepublic static java.lang.String formatWords(java.util.List<java.lang.String> wordList, int indent)
aaaa bbb cccc d eee ... xxxxxx yy
wordList
- list of wordsindent
- number of spaces to indent linesCopyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.