Package org.spdx.spreadsheetstore
Class AnnotationsSheet
java.lang.Object
org.spdx.spreadsheetstore.AbstractSheet
org.spdx.spreadsheetstore.AnnotationsSheet
Sheet containing all annotations
- Author:
- Gary O'Neall
-
Field Summary
Fields inherited from class org.spdx.spreadsheetstore.AbstractSheet
checkboxStyle, CHECKSUM_PATTERN, copyManager, dateStyle, documentUri, firstCellNum, firstRowNum, FONT_SIZE, greenWrapped, lastRowNum, modelStore, redWrapped, sheet, workbook, yellowWrapped
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationsSheet
(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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
static void
org.spdx.library.model.v2.Annotation
getAnnotation
(int rowNum) Retrieve an Annotation object from the specified rowgetElmementId
(int rowNum) Retrieve the SPDX element ID for the specified rowverify()
Verifies the integrity of the sheet's dataMethods inherited from class org.spdx.spreadsheetstore.AbstractSheet
addRow, checksumsToString, checksumToString, clear, createCenterStyle, createHeaderStyle, createLeftWrapStyle, csvToStrings, getFirstDataRow, getNumDataRows, getSheet, licensesToString, parseChecksum, resizeRows, stringsToCsv, strToChecksums
-
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
Description copied from class:AbstractSheet
Verifies the integrity of the sheet's data- Specified by:
verify
in classAbstractSheet
- Returns:
- A string describing any issues, or an empty string if valid.
-
create
-
add
public void add(org.spdx.library.model.v2.Annotation annotation, String elementId) throws SpreadsheetException - Parameters:
annotation
-- Throws:
SpreadsheetException
-
getElmementId
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
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.
-