Class SmeupDataStructurePrinter

java.lang.Object
com.smeup.kokos.sdk.util.SmeupDataStructurePrinter
Direct Known Subclasses:
SmeupDataStructureCorePrinter

public class SmeupDataStructurePrinter extends Object
Author:
mattia.bonardi
  • Field Details

    • language

      protected Language language
    • debug

      protected boolean debug
    • EMPTY_ROW_FIELD

      protected String EMPTY_ROW_FIELD
    • EMPTY_COLUMN_FIELD

      protected String EMPTY_COLUMN_FIELD
    • EMPTY_NODE_FIELD

      protected String EMPTY_NODE_FIELD
    • initialTimestamp

      protected Instant initialTimestamp
    • messages

      protected final List<SmeupMessage> messages
    • actions

      protected final List<SmeupAction> actions
    • variables

      protected final List<SmeupVariable> variables
    • redirectFun

      protected String redirectFun
    • sch

      protected SmeupSch sch
    • layout

      protected SmeupLayout layout
    • setup

      protected SmeupSetup setup
    • buttons

      protected final List<SmeupDataNode> buttons
    • cover

      protected SmeupCover cover
    • firstElement

      protected boolean firstElement
    • lastElementWritten

      protected SmeupDataStructurePrinter.DATA_TYPE 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

      protected DebugInfo debugInfo
  • Constructor Details

    • SmeupDataStructurePrinter

      public SmeupDataStructurePrinter()
    • SmeupDataStructurePrinter

      public SmeupDataStructurePrinter(ExecutionContext context)
  • Method Details

    • getDebugInfo

      public DebugInfo getDebugInfo()
    • utf8Encode

      public static byte[] utf8Encode(String s)
    • escapeSpecialCharacters

      public static byte[] escapeSpecialCharacters(String input)
    • printSmeupDataStructureInitialization

      public void printSmeupDataStructureInitialization(OutputStream out, Fun fun) throws Exception
      Print the initial part of SmeupDataStructure
      Parameters:
      out - stream
      fun - fun
      Throws:
      Exception - Exception
    • printSmeupDataStructureFinalization

      public void printSmeupDataStructureFinalization(OutputStream out, Fun fun) throws Exception
      Print the final part of SmeupDataStructure
      Parameters:
      out - stream
      fun - fun
      Throws:
      Exception - Exception
    • printSmeupDataNode

      public void printSmeupDataNode(OutputStream out, SmeupDataNode node, boolean hasChildren) throws Exception
      Print a SmeupDataNode to stream
      Parameters:
      out - stream
      node - node
      hasChildren - children flag
      Throws:
      Exception - Exception
    • printSmeupDataNodeClosure

      public void printSmeupDataNodeClosure(OutputStream out) throws Exception
      Print the closure of SmeupDataNode children
      Parameters:
      out - stream
      Throws:
      Exception - Exception
    • printSmeupDataColumns

      public void printSmeupDataColumns(OutputStream out, List<SmeupDataColumn> columns) throws Exception
      Print the columns of SmeupDataDataset
      Parameters:
      out - stream
      columns - columns
      Throws:
      Exception - Exception
    • printSmeupDataColumn

      public void printSmeupDataColumn(OutputStream out, SmeupDataColumn col) throws Exception
      Print one column of SmeupDataDataset
      Parameters:
      out - stream
      col - column
      Throws:
      Exception - Exception
    • printSmeupDataRow

      public void printSmeupDataRow(OutputStream out, SmeupDataRow row) throws Exception
      Print the SmeupDataDataset row
      Parameters:
      out - stream
      row - row
      Throws:
      Exception - Exception
    • printSmeupRawData

      public void printSmeupRawData(OutputStream out, String xml) throws Exception
      Print the raw data
      Parameters:
      out - stream
      xml - cml
      Throws:
      Exception - Exception
    • printButtons

      public void printButtons(List<SmeupDataNode> buttons)
      Print buttons
      Parameters:
      buttons - buttons
    • printSmeupSch

      public void printSmeupSch(SmeupSch sch)
      Print Smeup Sch
      Parameters:
      sch - sch
    • printSmeupLayout

      public void printSmeupLayout(SmeupLayout lay)
      Print Smeup Layout
      Parameters:
      lay - layout
    • printAction

      public void printAction(SmeupAction... actions)
      Add action or actions to the list
      Parameters:
      actions - action/actions
    • printSetup

      public void printSetup(SmeupSetup setup)
      Add setup
      Parameters:
      setup - setup
    • printMessage

      public void printMessage(SmeupMessage... messages)
      Add message or messages to the list
      Parameters:
      messages - message,messages
    • printVariable

      public void printVariable(SmeupVariable... variable)
      Add variable or variables to the list
      Parameters:
      variable - variable/variables
    • printRedirectFun

      public void printRedirectFun(String redirectFun)
    • printCover

      public void printCover(SmeupCover cover)
    • getMessages

      public List<SmeupMessage> getMessages()
    • _printMessages

      protected void _printMessages(OutputStream out) throws Exception
      Throws:
      Exception
    • _printActions

      protected void _printActions(OutputStream out) throws Exception
      Throws:
      Exception
    • _printSetup

      protected void _printSetup(OutputStream out) throws Exception
      Throws:
      Exception
    • _printLayout

      protected void _printLayout(OutputStream out) throws Exception
      Throws:
      Exception
    • _printScheda

      protected void _printScheda(OutputStream out) throws Exception
      Throws:
      Exception
    • _printButtons

      protected void _printButtons(OutputStream out) throws Exception
      Throws:
      Exception
    • _printVariables

      protected void _printVariables(OutputStream out) throws Exception
      Throws:
      Exception
    • _printRedirectFun

      protected void _printRedirectFun(OutputStream out) throws Exception
      Throws:
      Exception
    • _printCover

      protected void _printCover(OutputStream out) throws Exception
      Throws:
      Exception