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 void
print
(String name, String value, boolean isFirst, boolean isNumeric, int lvl, PrintStream stream) Formatted entry valueprotected int
printBegin
(StateInf state, PrintStream stream) Beginning of formattingprotected void
printClose
(String name, int lvl, PrintStream stream) Closing element entry.protected void
printEnd
(PrintStream stream) End of formattingprotected void
printEnd_Concatenation
(PrintStream stream) Example of ANVL output using concatenation of identical keys using ;void
printStart
(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, writeln
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:FormatterAbs
Beginning of formatting- Specified by:
printBegin
in classFormatterAbs
stream
- print output stream- Returns:
- starting level (used for indentation - typically 1)
- Throws:
TException
-
printEnd
Description copied from class:FormatterAbs
End of formatting- Specified by:
printEnd
in 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:FormatterAbs
Beginning element entry. An example would be the element name in XML- Specified by:
printStart
in 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:FormatterAbs
Closing element entry. Example is closeing element in XML- Specified by:
printClose
in 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:FormatterAbs
Formatted entry value- Specified by:
print
in 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
-