Package org.spdx.spdxspreadsheet
Class SnippetSheet
java.lang.Object
org.spdx.spdxspreadsheet.AbstractSheet
org.spdx.spdxspreadsheet.SnippetSheet
public class SnippetSheet extends AbstractSheet
Sheet to hold all snippet information
- 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 SnippetSheet(org.apache.poi.ss.usermodel.Workbook workbook, String snippetSheetName) -
Method Summary
Modifier and Type Method Description voidadd(SpdxSnippet snippet)static voidcreate(org.apache.poi.ss.usermodel.Workbook wb, String sheetName)SpdxSnippetgetSnippet(int rowNum, SpdxDocumentContainer container)Get the SPDX snippet represented in the row rownum.StringgetSnippetFileId(int rowNum)Get the SpdxFromFileSNippet for the given rowStringverify()Methods inherited from class org.spdx.spdxspreadsheet.AbstractSheet
addRow, clear, createCenterStyle, createHeaderStyle, createLeftWrapStyle, getFirstDataRow, getNumDataRows, getSheet, resizeRows
-
Constructor Details
-
SnippetSheet
- Parameters:
workbook-snippetSheetName-
-
-
Method Details
-
verify
- Specified by:
verifyin classAbstractSheet
-
create
-
add
- Parameters:
snippet-- Throws:
SpreadsheetException
-
getSnippet
public SpdxSnippet getSnippet(int rowNum, SpdxDocumentContainer container) throws SpreadsheetExceptionGet the SPDX snippet represented in the row rownum. IMPORTANT: The Snippet From File will only be filled in if the associated file is found in the container. This property can be set after calling getSnippet if the model is not already populated with the file The ID from the Snippet From File can be obtained through thegetSnippetFileId(int rowNum)method- Parameters:
rowNum-- Returns:
- Snippet at the row rowNum or null if the row does not exist
- Throws:
SpreadsheetException
-
getSnippetFileId
Get the SpdxFromFileSNippet for the given row- Parameters:
rowNum-- Returns:
- Throws:
SpreadsheetException
-