FOSSology  4.7.1
Open Source License Compliance by Open Source Software
FoScanner.ReportBase.ReportBase Class Reference
Inheritance diagram for FoScanner.ReportBase.ReportBase:
Inheritance graph
Collaboration diagram for FoScanner.ReportBase.ReportBase:
Collaboration graph

Public Member Functions

def __init__ (self, CliOptions cli_options, Scanners scanner)
 
None finalize_document (self)
 
None write_report (self, str file_name)
 

Public Attributes

 cli_options
 
 scanner
 

Detailed Description

Interface contract for report generators.

Every report class must accept ``cli_options`` and ``scanner`` at
construction time and implement :meth:`finalize_document` and
:meth:`write_report`.

Definition at line 18 of file ReportBase.py.

Constructor & Destructor Documentation

◆ __init__()

def FoScanner.ReportBase.ReportBase.__init__ (   self,
CliOptions  cli_options,
Scanners  scanner 
)
:param cli_options: Resolved CLI options for the current run.
:param scanner:     Scanner instance holding scan results.

Reimplemented in FoScanner.SpdxReport.SpdxReport, FoScanner.Spdx3Report.Spdx3Report, and FoScanner.DashboardReport.DashboardReport.

Definition at line 27 of file ReportBase.py.

Member Function Documentation

◆ finalize_document()

None FoScanner.ReportBase.ReportBase.finalize_document (   self)
Process scan results and assemble the internal document model.

Called after all scans have completed but before writing.

Reimplemented in FoScanner.SpdxReport.SpdxReport, FoScanner.Spdx3Report.Spdx3Report, and FoScanner.DashboardReport.DashboardReport.

Definition at line 36 of file ReportBase.py.

◆ write_report()

None FoScanner.ReportBase.ReportBase.write_report (   self,
str  file_name 
)
Validate and serialize the report to *file_name*.

:param file_name: Destination path for the generated report.
:raises RuntimeError: If validation or serialization fails.

Reimplemented in FoScanner.SpdxReport.SpdxReport, FoScanner.Spdx3Report.Spdx3Report, and FoScanner.DashboardReport.DashboardReport.

Definition at line 44 of file ReportBase.py.

Member Data Documentation

◆ cli_options

FoScanner.ReportBase.ReportBase.cli_options
:param cli_options: Resolved CLI options for the current run.
:param scanner:     Scanner instance holding scan results.

Definition at line 32 of file ReportBase.py.


The documentation for this class was generated from the following file: