Package org.spdx.spreadsheetstore
Class ExternalRefsSheet
java.lang.Object
org.spdx.spreadsheetstore.AbstractSheet
org.spdx.spreadsheetstore.ExternalRefsSheet
Package external refs
- 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
ConstructorsConstructorDescriptionExternalRefsSheet
(org.apache.poi.ss.usermodel.Workbook workbook, String sheetName, org.spdx.storage.IModelStore modelStore, String documentUri, org.spdx.library.ModelCopyManager copyManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
static void
List
<org.spdx.library.model.v2.ExternalRef> Get all external references for a given package IDprotected String
refTypeToString
(org.spdx.library.model.v2.ReferenceType referenceType) Convert a reference type to the type used inprotected org.spdx.library.model.v2.ReferenceType
stringToRefType
(String refTypeStr) Convert a string to a reference typeverify()
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
-
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
- Parameters:
wb
-externalRefsSheetName
-
-
add
public void add(String packageId, org.spdx.library.model.v2.ExternalRef externalRef) throws SpreadsheetException - Parameters:
packageId
- Package ID for the package that contains this external refexternalRef
-- Throws:
SpreadsheetException
-
refTypeToString
Convert a reference type to the type used in- Parameters:
referenceType
-- Returns:
-
getExternalRefsForPkgid
public List<org.spdx.library.model.v2.ExternalRef> getExternalRefsForPkgid(String id) throws SpreadsheetException Get all external references for a given package ID- Parameters:
id
-- Returns:
- all external references for a given package ID
- Throws:
SpreadsheetException
-
stringToRefType
Convert a string to a reference type- Parameters:
refTypeStr
- A string representing the reference type. It can be a listed reference type name, a URI string, or a local name.- Returns:
- A
ReferenceType
object corresponding to the input string, ornull
if the string is not a valid reference type.
-