Class AnnotationsSheet

java.lang.Object
org.spdx.spreadsheetstore.AbstractSheet
org.spdx.spreadsheetstore.AnnotationsSheet

public class AnnotationsSheet extends AbstractSheet
Sheet containing all annotations
Author:
Gary O'Neall
  • Constructor Details

    • AnnotationsSheet

      public AnnotationsSheet(org.apache.poi.ss.usermodel.Workbook workbook, String annotationsSheetName, org.spdx.storage.IModelStore modelStore, String documentUri, org.spdx.library.ModelCopyManager copyManager)
      Create an AnnotationsSheet instance
      Parameters:
      workbook - The Workbook object where the annotations sheet resides.
      annotationsSheetName - The name of the annotations sheet within the workbook.
      modelStore - The model store used for creating and managing SPDX objects.
      documentUri - The URI of the SPDX document associated with this sheet.
      copyManager - The copy manager used for handling SPDX object copies.
  • Method Details

    • verify

      public String verify()
      Description copied from class: AbstractSheet
      Verifies the integrity of the sheet's data
      Specified by:
      verify in class AbstractSheet
      Returns:
      A string describing any issues, or an empty string if valid.
    • create

      public static void create(org.apache.poi.ss.usermodel.Workbook wb, String sheetName)
    • add

      public void add(org.spdx.library.model.v2.Annotation annotation, String elementId) throws SpreadsheetException
      Parameters:
      annotation -
      Throws:
      SpreadsheetException
    • getElmementId

      public String getElmementId(int rowNum)
      Retrieve the SPDX element ID for the specified row
      Parameters:
      rowNum - The row number to retrieve the element ID from.
      Returns:
      The SPDX element ID as a string, or null if the row does not exist.
    • getAnnotation

      public org.spdx.library.model.v2.Annotation getAnnotation(int rowNum) throws SpreadsheetException
      Retrieve an Annotation object from the specified row
      Parameters:
      rowNum - The row number to retrieve the annotation from.
      Returns:
      The Annotation object populated with the data from the specified row.
      Throws:
      SpreadsheetException - If the row is missing, contains invalid data, or required fields are empty.