Package org.spdx.spdxspreadsheet
Class PerFileSheet
java.lang.Object
org.spdx.spdxspreadsheet.AbstractSheet
org.spdx.spdxspreadsheet.PerFileSheet
- Direct Known Subclasses:
PerFileSheetV09d3,PerFileSheetV1d1,PerFileSheetV1d2,PerFileSheetV2d0,PerFileSheetV2d2
public abstract class PerFileSheet extends AbstractSheet
Abstract class for PerFileSheet. Specific version implementations are implemented
as subclasses.
- Author:
- Gary O'Neall
-
Field Summary
Fields inherited from class org.spdx.spdxspreadsheet.AbstractSheet
checkboxStyle, dateStyle, firstCellNum, firstRowNum, FONT_SIZE, greenWrapped, lastRowNum, redWrapped, sheet, workbook, yellowWrapped -
Constructor Summary
Constructors Constructor Description PerFileSheet(org.apache.poi.ss.usermodel.Workbook workbook, String sheetName, String version) -
Method Summary
Modifier and Type Method Description abstract voidadd(SpdxFile file, String pkgIds)Add the file to the spreadsheetstatic voidcreate(org.apache.poi.ss.usermodel.Workbook wb, String perFileSheetName)Create a blank worksheet NOTE: Replaces / deletes existing sheet by the same namestatic String[]csvToStrings(String csv)Converts a comma separated CSV string to an array of stringsabstract SpdxFilegetFileInfo(int rowNum, SpdxDocumentContainer container)Get the file information for a row in the PerFileSheetabstract String[]getPackageIds(int row)static PerFileSheetopenVersion(org.apache.poi.ss.usermodel.Workbook workbook, String perFileSheetName, String version)Open a specific version of the PerFileSheetstatic StringstringsToCsv(String[] strings)converts an array of strings to a comma separated listMethods inherited from class org.spdx.spdxspreadsheet.AbstractSheet
addRow, clear, createCenterStyle, createHeaderStyle, createLeftWrapStyle, getFirstDataRow, getNumDataRows, getSheet, resizeRows, verify
-
Field Details
-
Constructor Details
-
Method Details
-
openVersion
public static PerFileSheet openVersion(org.apache.poi.ss.usermodel.Workbook workbook, String perFileSheetName, String version)Open a specific version of the PerFileSheet- Parameters:
workbook-perFileSheetName-version- spreadsheet version- Returns:
-
stringsToCsv
converts an array of strings to a comma separated list- Parameters:
strings-- Returns:
-
csvToStrings
Converts a comma separated CSV string to an array of strings- Parameters:
csv-- Returns:
-
add
Add the file to the spreadsheet- Parameters:
file-pkgIds- string containing the package ID's which contain this file
-
getFileInfo
public abstract SpdxFile getFileInfo(int rowNum, SpdxDocumentContainer container) throws SpreadsheetExceptionGet the file information for a row in the PerFileSheet- Parameters:
rowNum-- Returns:
- Throws:
SpreadsheetException
-
create
Create a blank worksheet NOTE: Replaces / deletes existing sheet by the same name- Parameters:
wb-perFileSheetName-
-
getPackageIds
- Parameters:
row-- Returns:
-