Package org.spdx.spreadsheetstore
Class ExtractedLicenseInfoSheet
java.lang.Object
org.spdx.spreadsheetstore.AbstractSheet
org.spdx.spreadsheetstore.ExtractedLicenseInfoSheet
- Direct Known Subclasses:
- ExtractedLicenseInfoSheetV1d1
Abstract class for extracted license info sheet.  Specific versions are implemented as subclasses.
- Author:
- Gary O'Neall
- 
Field SummaryFieldsFields inherited from class org.spdx.spreadsheetstore.AbstractSheetcheckboxStyle, CHECKSUM_PATTERN, copyManager, dateStyle, documentUri, firstCellNum, firstRowNum, FONT_SIZE, greenWrapped, lastRowNum, modelStore, redWrapped, sheet, workbook, yellowWrapped
- 
Constructor SummaryConstructorsConstructorDescriptionExtractedLicenseInfoSheet(org.apache.poi.ss.usermodel.Workbook workbook, String sheetName, String version, org.spdx.storage.IModelStore modelStore, String documentUri, org.spdx.library.ModelCopyManager copyManager) Create anExtractedLicenseInfoSheetinstance
- 
Method SummaryModifier and TypeMethodDescriptionabstract voidadd(String identifier, String extractedText, String licenseName, Collection<String> crossRefUrls, String comment) Add a new row to the NonStandardLicenses sheetstatic voidCreate a blank worksheet NOTE: Replaces / deletes existing sheet by the same nameabstract StringgetComment(int rowNum) Retrieves the comment for a specific row.abstract Collection<String> getCrossRefUrls(int rowNum) Retrieves the cross-reference URLs for a specific row.abstract StringgetExtractedText(int rowNum) Retrieve the extracted text for a specific row in the spreadsheetabstract StringgetIdentifier(int rowNum) Retrieve the license identifier for a specific row in the spreadsheetabstract StringgetLicenseName(int rowNum) Retrieves the license name for a specific row.static ExtractedLicenseInfoSheetopenVersion(org.apache.poi.ss.usermodel.Workbook workbook, String packageInfoSheetName, String version, org.spdx.storage.IModelStore modelStore, String documentUri, org.spdx.library.ModelCopyManager copyManager) Opens an existing extracted license info sheet for a specific versionMethods inherited from class org.spdx.spreadsheetstore.AbstractSheetaddRow, checksumsToString, checksumToString, clear, createCenterStyle, createHeaderStyle, createLeftWrapStyle, csvToStrings, getFirstDataRow, getNumDataRows, getSheet, licensesToString, parseChecksum, resizeRows, stringsToCsv, strToChecksums, verify
- 
Field Details- 
version
 
- 
- 
Constructor Details- 
ExtractedLicenseInfoSheetpublic ExtractedLicenseInfoSheet(org.apache.poi.ss.usermodel.Workbook workbook, String sheetName, String version, org.spdx.storage.IModelStore modelStore, String documentUri, org.spdx.library.ModelCopyManager copyManager) Create anExtractedLicenseInfoSheetinstance- Parameters:
- workbook- Workbook object where the sheet resides.
- sheetName- Sheet name within the workbook.
- version- Spreadsheet format version.
- modelStore- Model store for SPDX objects.
- documentUri- URI of the SPDX document.
- copyManager- Copy manager for SPDX object handling.
 
 
- 
- 
Method Details- 
openVersionpublic static ExtractedLicenseInfoSheet openVersion(org.apache.poi.ss.usermodel.Workbook workbook, String packageInfoSheetName, String version, org.spdx.storage.IModelStore modelStore, String documentUri, org.spdx.library.ModelCopyManager copyManager) Opens an existing extracted license info sheet for a specific version- Parameters:
- workbook- Workbook containing the sheet.
- packageInfoSheetName- Name of the sheet containing package information.
- version- Spreadsheet format version.
- modelStore- Model store for SPDX objects.
- documentUri- URI of the SPDX document.
- copyManager- Copy manager for SPDX object handling.
- Returns:
- An instance of ExtractedLicenseInfoSheet.
 
- 
createpublic static void create(org.apache.poi.ss.usermodel.Workbook wb, String nonStandardLicenseSheetName) Create a blank worksheet NOTE: Replaces / deletes existing sheet by the same name- Parameters:
- wb- Workbook where the sheet will be created.
- nonStandardLicenseSheetName- Name of the sheet to be created.
 
- 
getIdentifierRetrieve the license identifier for a specific row in the spreadsheet- Parameters:
- rowNum- Row number in the sheet.
- Returns:
- License identifier.
 
- 
getExtractedTextRetrieve the extracted text for a specific row in the spreadsheet- Parameters:
- rowNum- Row number in the sheet.
- Returns:
- Extracted license text.
 
- 
addpublic abstract void add(String identifier, String extractedText, String licenseName, Collection<String> crossRefUrls, String comment) Add a new row to the NonStandardLicenses sheet- Parameters:
- identifier- License ID
- extractedText- Extracted license text
- licenseName- optional license name
- crossRefUrls- optional cross reference URL's
- comment- optional comment
 
- 
getLicenseNameRetrieves the license name for a specific row.- Parameters:
- rowNum- Row number in the sheet.
- Returns:
- License name.
 
- 
getCrossRefUrlsRetrieves the cross-reference URLs for a specific row.- Parameters:
- rowNum- Row number in the sheet.
- Returns:
- A collection of cross-reference URLs.
 
- 
getCommentRetrieves the comment for a specific row.- Parameters:
- rowNum- Row number in the sheet.
- Returns:
- Comment as a string.
 
 
-