Package org.odpi.openmetadata.reports
Class EgeriaReport
java.lang.Object
org.odpi.openmetadata.reports.EgeriaReport
EgeriaReport provides utilities to allow a report to print to the screen and create a markdown file at the same time.
-
Constructor Summary
ConstructorDescriptionEgeriaReport
(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 TypeMethodDescriptionvoid
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, 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<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.
-
Constructor Details
-
EgeriaReport
Set up the parameters for the sample.- Parameters:
reportFileName
- name of file to wrote markdown content to- Throws:
IOException
- problem writing file
-
EgeriaReport
Set up the parameters for the sample.- Parameters:
reportFileName
- name of file to write markdown content toprintToConsole
- 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
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
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
Prints out the text for a subheading the report.- Parameters:
indentLevel
- number of spaces to indentreportTitle
- location of the platform- Throws:
IOException
- problem writing file
-
printReportSubheading
Prints out the text for a subheading the report.- Parameters:
indentLevel
- number of spaces to indenttitleText
- 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 indentelementLabel
- label of the elementelementText
- value of the element- Throws:
IOException
- problem writing file
-
printReportLine
Prints out the text for a single line of the report.- Parameters:
indentLevel
- number of spaces to indentreportText
- 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 indentfirstElement
- is the the first element (so column headings needed)guid
- unique identifierqualifiedName
- unique namedisplayName
- display namedescription
- 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 indenttableHeadings
- list of table headings - only needed if they are to be printedtableRow
- list of table values- Throws:
IOException
- problem writing report
-
printConnection
public void printConnection(int detailIndentLevel, String elementLabel, Connection connection) throws IOException Print out details of a connection.- Parameters:
detailIndentLevel
- how many spaces to includeelementLabel
- name of the connectorconnection
- connector's connection- Throws:
IOException
- problem writing report
-
printRegisteredServices
public void printRegisteredServices(int indentLevel, List<RegisteredOMAGService> registeredOMAGServices) throws IOException Print out the details of a registered service.- Parameters:
indentLevel
- spaces needed in the report lineregisteredOMAGServices
- list of registered services- Throws:
IOException
- problem writing the report
-
closeReport
This adds the last line to the report.- Throws:
IOException
- unable to write the report
-