Package com.smeup.kokos.sdk.util
Class SmeupDataStructurePrinter
java.lang.Object
com.smeup.kokos.sdk.util.SmeupDataStructurePrinter
- Direct Known Subclasses:
SmeupDataStructureCorePrinter
- Author:
- mattia.bonardi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumData Types that used streaming methods -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<SmeupAction> protected final List<SmeupDataNode> protected SmeupCoverprotected booleanprotected DebugInfoprotected Stringprotected Stringprotected Stringprotected booleanprotected Instantprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected Languageprotected SmeupDataStructurePrinter.DATA_TYPEprotected SmeupLayoutprotected final com.fasterxml.jackson.databind.ObjectMapperprotected final List<SmeupMessage> protected Stringprotected SmeupSchprotected SmeupSetupprotected final List<SmeupVariable> -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected void_printCover(OutputStream out) protected void_printLayout(OutputStream out) protected voidprotected voidprotected void_printScheda(OutputStream out) protected void_printSetup(OutputStream out) protected voidstatic byte[]escapeSpecialCharacters(String input) voidprintAction(SmeupAction... actions) Add action or actions to the listvoidprintButtons(List<SmeupDataNode> buttons) Print buttonsvoidprintCover(SmeupCover cover) voidprintMessage(SmeupMessage... messages) Add message or messages to the listvoidprintRedirectFun(String redirectFun) voidprintSetup(SmeupSetup setup) Add setupvoidprintSmeupDataColumn(OutputStream out, SmeupDataColumn col) Print one column of SmeupDataDatasetvoidprintSmeupDataColumns(OutputStream out, List<SmeupDataColumn> columns) Print the columns of SmeupDataDatasetvoidprintSmeupDataNode(OutputStream out, SmeupDataNode node, boolean hasChildren) Print a SmeupDataNode to streamvoidPrint the closure of SmeupDataNode childrenvoidprintSmeupDataRow(OutputStream out, SmeupDataRow row) Print the SmeupDataDataset rowvoidPrint the final part of SmeupDataStructurevoidPrint the initial part of SmeupDataStructurevoidPrint Smeup LayoutvoidprintSmeupRawData(OutputStream out, String xml) Print the raw datavoidprintSmeupSch(SmeupSch sch) Print Smeup SchvoidprintVariable(SmeupVariable... variable) Add variable or variables to the liststatic byte[]utf8Encode(String s)
-
Field Details
-
language
-
debug
protected boolean debug -
EMPTY_ROW_FIELD
-
EMPTY_COLUMN_FIELD
-
EMPTY_NODE_FIELD
-
initialTimestamp
-
messages
-
actions
-
variables
-
redirectFun
-
sch
-
layout
-
setup
-
buttons
-
cover
-
firstElement
protected boolean firstElement -
lastElementWritten
-
isInitializationWritten
protected boolean isInitializationWritten -
isFinalizationWritten
protected boolean isFinalizationWritten -
isColumnWritten
protected boolean isColumnWritten -
isRowWritten
protected boolean isRowWritten -
isNodeWritten
protected boolean isNodeWritten -
mapper
protected final com.fasterxml.jackson.databind.ObjectMapper mapper -
debugInfo
-
-
Constructor Details
-
SmeupDataStructurePrinter
public SmeupDataStructurePrinter() -
SmeupDataStructurePrinter
-
-
Method Details
-
getDebugInfo
-
utf8Encode
-
escapeSpecialCharacters
-
printSmeupDataStructureInitialization
Print the initial part of SmeupDataStructure- Parameters:
out- streamfun- fun- Throws:
Exception- Exception
-
printSmeupDataStructureFinalization
Print the final part of SmeupDataStructure- Parameters:
out- streamfun- fun- Throws:
Exception- Exception
-
printSmeupDataNode
public void printSmeupDataNode(OutputStream out, SmeupDataNode node, boolean hasChildren) throws Exception Print a SmeupDataNode to stream- Parameters:
out- streamnode- nodehasChildren- children flag- Throws:
Exception- Exception
-
printSmeupDataNodeClosure
Print the closure of SmeupDataNode children- Parameters:
out- stream- Throws:
Exception- Exception
-
printSmeupDataColumns
Print the columns of SmeupDataDataset- Parameters:
out- streamcolumns- columns- Throws:
Exception- Exception
-
printSmeupDataColumn
Print one column of SmeupDataDataset- Parameters:
out- streamcol- column- Throws:
Exception- Exception
-
printSmeupDataRow
Print the SmeupDataDataset row- Parameters:
out- streamrow- row- Throws:
Exception- Exception
-
printSmeupRawData
Print the raw data- Parameters:
out- streamxml- cml- Throws:
Exception- Exception
-
printButtons
Print buttons- Parameters:
buttons- buttons
-
printSmeupSch
Print Smeup Sch- Parameters:
sch- sch
-
printSmeupLayout
Print Smeup Layout- Parameters:
lay- layout
-
printAction
Add action or actions to the list- Parameters:
actions- action/actions
-
printSetup
Add setup- Parameters:
setup- setup
-
printMessage
Add message or messages to the list- Parameters:
messages- message,messages
-
printVariable
Add variable or variables to the list- Parameters:
variable- variable/variables
-
printRedirectFun
-
printCover
-
getMessages
-
_printMessages
- Throws:
Exception
-
_printActions
- Throws:
Exception
-
_printSetup
- Throws:
Exception
-
_printLayout
- Throws:
Exception
-
_printScheda
- Throws:
Exception
-
_printButtons
- Throws:
Exception
-
_printVariables
- Throws:
Exception
-
_printRedirectFun
- Throws:
Exception
-
_printCover
- Throws:
Exception
-