Class EgeriaReport

java.lang.Object
org.odpi.openmetadata.reports.EgeriaReport

public class EgeriaReport extends Object
EgeriaReport provides utilities to allow a report to print to the screen and create a markdown file at the same time.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EgeriaReport(String reportFileName)
    Set up the parameters for the sample.
    EgeriaReport(String reportFileName, boolean printToConsole)
    Set up the parameters for the sample.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This adds the last line to the report.
    getHeadingLevel(int indentLevel)
    Set up the heading hash characters that represent the heading level of the markdown document.
    getSpaceIndent(int indentLevel)
    Work out how many spaces to indent a line in the report.
    void
    printConnection(int detailIndentLevel, String elementLabel, org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection)
    Print out details of a connection.
    void
    printElementInTable(int indentLevel, boolean firstElement, String guid, String qualifiedName, String displayName, String description)
    Prints out information about a metadata element as a single line in a table.
    void
    printElementInTable(int indentLevel, List<String> tableHeadings, List<String> tableRow)
    Prints out information about a metadata element as a single line in a table.
    void
    printRegisteredServices(int indentLevel, List<org.odpi.openmetadata.commonservices.ffdc.rest.RegisteredOMAGService> registeredOMAGServices)
    Print out the details of a registered service.
    void
    printReportLine(int indentLevel, String reportText)
    Prints out the text for a single line of the report.
    void
    printReportLine(int indentLevel, String elementLabel, String elementText)
    Prints out the text for a single line of the report.
    void
    printReportSubheading(int indentLevel, String titleText)
    Prints out the text for a subheading the report.
    void
    printReportTitle(int indentLevel, String reportTitle)
    Prints out the text for a subheading the report.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EgeriaReport

      public EgeriaReport(String reportFileName) throws IOException
      Set up the parameters for the sample.
      Parameters:
      reportFileName - name of file to wrote markdown content to
      Throws:
      IOException - problem writing file
    • EgeriaReport

      public EgeriaReport(String reportFileName, boolean printToConsole) throws IOException
      Set up the parameters for the sample.
      Parameters:
      reportFileName - name of file to write markdown content to
      printToConsole - flag to indicate whether the report should also print to the console as well as the report file.
      Throws:
      IOException - problem writing file
  • Method Details

    • getSpaceIndent

      public String getSpaceIndent(int indentLevel)
      Work out how many spaces to indent a line in the report. This is used in the stdout report.
      Parameters:
      indentLevel - required indentation
      Returns:
      string of blanks representing the indentation
    • getHeadingLevel

      public String getHeadingLevel(int indentLevel)
      Set up the heading hash characters that represent the heading level of the markdown document.
      Parameters:
      indentLevel - required heading level
      Returns:
      string to prepend to the heading text
    • printReportTitle

      public void printReportTitle(int indentLevel, String reportTitle) throws IOException
      Prints out the text for a subheading the report.
      Parameters:
      indentLevel - number of spaces to indent
      reportTitle - location of the platform
      Throws:
      IOException - problem writing file
    • printReportSubheading

      public void printReportSubheading(int indentLevel, String titleText) throws IOException
      Prints out the text for a subheading the report.
      Parameters:
      indentLevel - number of spaces to indent
      titleText - text to be included in the subheading
      Throws:
      IOException - problem writing file
    • printReportLine

      public void printReportLine(int indentLevel, String elementLabel, String elementText) throws IOException
      Prints out the text for a single line of the report.
      Parameters:
      indentLevel - number of spaces to indent
      elementLabel - label of the element
      elementText - value of the element
      Throws:
      IOException - problem writing file
    • printReportLine

      public void printReportLine(int indentLevel, String reportText) throws IOException
      Prints out the text for a single line of the report.
      Parameters:
      indentLevel - number of spaces to indent
      reportText - value to print
      Throws:
      IOException - problem writing file
    • printElementInTable

      public void printElementInTable(int indentLevel, boolean firstElement, String guid, String qualifiedName, String displayName, String description) throws IOException
      Prints out information about a metadata element as a single line in a table.
      Parameters:
      indentLevel - number of spaces to indent
      firstElement - is the the first element (so column headings needed)
      guid - unique identifier
      qualifiedName - unique name
      displayName - display name
      description - description
      Throws:
      IOException - problem writing report
    • printElementInTable

      public void printElementInTable(int indentLevel, List<String> tableHeadings, List<String> tableRow) throws IOException
      Prints out information about a metadata element as a single line in a table.
      Parameters:
      indentLevel - number of spaces to indent
      tableHeadings - list of table headings - only needed if they are to be printed
      tableRow - list of table values
      Throws:
      IOException - problem writing report
    • printConnection

      public void printConnection(int detailIndentLevel, String elementLabel, org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection) throws IOException
      Print out details of a connection.
      Parameters:
      detailIndentLevel - how many spaces to include
      elementLabel - name of the connector
      connection - connector's connection
      Throws:
      IOException - problem writing report
    • printRegisteredServices

      public void printRegisteredServices(int indentLevel, List<org.odpi.openmetadata.commonservices.ffdc.rest.RegisteredOMAGService> registeredOMAGServices) throws IOException
      Print out the details of a registered service.
      Parameters:
      indentLevel - spaces needed in the report line
      registeredOMAGServices - list of registered services
      Throws:
      IOException - problem writing the report
    • closeReport

      public void closeReport() throws IOException
      This adds the last line to the report.
      Throws:
      IOException - unable to write the report