Package org.cdlib.mrt.formatter
Class ANVLFormatter
java.lang.Object
org.cdlib.mrt.formatter.FormatterAbs
org.cdlib.mrt.formatter.ANVLFormatter
- All Implemented Interfaces:
FormatterInf
ANVL output display formatter
- Author:
- dloy
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cdlib.mrt.formatter.FormatterInf
FormatterInf.Format -
Field Summary
FieldsFields inherited from class org.cdlib.mrt.formatter.FormatterAbs
DEBUG, formatterType, logger, MESSAGE, NAME, NL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprint(String name, String value, boolean isFirst, boolean isNumeric, int lvl, PrintStream stream) Formatted entry valueprotected intprintBegin(StateInf state, PrintStream stream) Beginning of formattingprotected voidprintClose(String name, int lvl, PrintStream stream) Closing element entry.protected voidprintEnd(PrintStream stream) End of formattingprotected voidprintEnd_Concatenation(PrintStream stream) Example of ANVL output using concatenation of identical keys using ;voidprintStart(String name, boolean isFirst, int lvl, PrintStream stream) Beginning element entry.Methods inherited from class org.cdlib.mrt.formatter.FormatterAbs
addLvl, closeOutput, display, format, formatClass, formatNamedNode, formatNode, formatObject, getANVLFormatter, getFormatter, getFormatterType, getJSONFormatter, getJSONFormatter, getMethodName, getObjectName, getXHTMLFormatter, getXHTMLFormatter, getXMLFormatter, getXMLFormatter, interfaceMatches, isDisplayableClass, isDisplayMethod, isEnum, isLinkedHashList, isList, isMap, isNumeric, isNumeric, isNumeric, isStateClass, isStateStringClass, log, logDebug, logException, lowerCaseFirst, processLinkedHashList, processLinkedHashList, processList, processMap, processMap, returnsList, returnsMap, runMethod, runStringMethod, setFormatterType, write, writelnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cdlib.mrt.formatter.FormatterInf
format, getFormatterType
-
Field Details
-
map
-
-
Constructor Details
-
ANVLFormatter
- Throws:
TException
-
-
Method Details
-
printBegin
Description copied from class:FormatterAbsBeginning of formatting- Specified by:
printBeginin classFormatterAbs- Parameters:
stream- print output stream- Returns:
- starting level (used for indentation - typically 1)
- Throws:
TException
-
printEnd
Description copied from class:FormatterAbsEnd of formatting- Specified by:
printEndin classFormatterAbs- Parameters:
stream- output stream- Throws:
TException
-
printEnd_Concatenation
Example of ANVL output using concatenation of identical keys using ;- Parameters:
stream-- Throws:
TException
-
printStart
Description copied from class:FormatterAbsBeginning element entry. An example would be the element name in XML- Specified by:
printStartin classFormatterAbs- Parameters:
name- element nameisFirst- true=is first element of a list, false=subsequent element of listlvl- indentation levelstream- print output stream- Throws:
TException
-
printClose
Description copied from class:FormatterAbsClosing element entry. Example is closeing element in XML- Specified by:
printClosein classFormatterAbs- Parameters:
name- element namelvl- indentation levelstream- print output stream- Throws:
TException
-
print
protected void print(String name, String value, boolean isFirst, boolean isNumeric, int lvl, PrintStream stream) throws TException Description copied from class:FormatterAbsFormatted entry value- Specified by:
printin classFormatterAbs- Parameters:
name- name of entryvalue- entry valueisFirst- true=is first element of a list, false=subsequent element of listisNumeric- is the element numeric or boolean. Some formats require quotes around value unless it is numericlvl- indentation levelstream- print output stream- Throws:
TException
-