format method
The formatting processor.
Implementation
@override
bool format() {
bool result = _generateSection(SbomSpdxSectionNames.documentCreation);
if (!result) {
SbomUtilities.error(
'SPDX SBOM Formatting - unable to generate a formatted SPDX document creation section in file $outputFile');
return false;
}
result = _generateSection(SbomSpdxSectionNames.package);
if (!result) {
SbomUtilities.error(
'SPDX SBOM Formatting - unable to generate a formatted SPDX package section in file $outputFile');
return false;
}
result = _generateSection(SbomSpdxSectionNames.file);
if (!result) {
SbomUtilities.error(
'SPDX SBOM Formatting - unable to generate a formatted SPDX file section in file $outputFile');
return false;
}
result = _generateSection(SbomSpdxSectionNames.relationship);
if (!result) {
SbomUtilities.error(
'SPDX SBOM Formatting - unable to generate a formatted SPDX relationship section in file $outputFile');
return false;
}
return true;
}