Package org.spdx.spdxspreadsheet
Class DocumentInfoSheet
java.lang.Object
org.spdx.spdxspreadsheet.AbstractSheet
org.spdx.spdxspreadsheet.DocumentInfoSheet
- Direct Known Subclasses:
OriginsSheetV0d9d4,OriginsSheetV1d1,OriginsSheetV1d2,OriginsSheetV2d0
public abstract class DocumentInfoSheet extends AbstractSheet
Abstract class for sheet containing information about the origins of an SPDX document
Specific versions 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 DocumentInfoSheet(org.apache.poi.ss.usermodel.Workbook workbook, String sheetName, String version) -
Method Summary
Modifier and Type Method Description abstract voidaddDocument(SpdxDocument doc)Add all origin information from the documentstatic voidcreate(org.apache.poi.ss.usermodel.Workbook wb, String sheetName)abstract StringgetAuthorComments()abstract DategetCreated()abstract String[]getCreatedBy()protected DategetDataCellDateValue(int colNum)protected StringgetDataCellStringValue(int colNum)abstract StringgetDataLicense()protected org.apache.poi.ss.usermodel.RowgetDataRow()protected org.apache.poi.ss.usermodel.RowgetDataRow(int rowIndex)abstract StringgetDocumentComment()abstract String[]getDocumentContents()abstract StringgetDocumentName()abstract ExternalDocumentRef[]getExternalDocumentRefs()abstract StringgetLicenseListVersion()abstract StringgetNamespace()protected org.apache.poi.ss.usermodel.CellgetOrCreateDataCell(int colNum)abstract StringgetSpdxId()abstract StringgetSPDXVersion()static DocumentInfoSheetopenVersion(org.apache.poi.ss.usermodel.Workbook workbook, String originSheetName, String version)Open an existing worksheetabstract voidsetAuthorComments(String comments)abstract voidsetCreated(Date parse)abstract voidsetCreatedBy(String[] createdBys)protected voidsetDataCellDateValue(int colNum, Date value)protected voidsetDataCellStringValue(int colNum, String value)abstract voidsetDataLicense(String id)abstract voidsetDocumentComment(String docComment)abstract voidsetDocumentDescribes(String[] contents)Set the SPDX ID's for content described by this SPDX documentabstract voidsetDocumentName(String documentName)Set the document nameabstract voidsetExternalDocumentRefs(ExternalDocumentRef[] externalDocumentRefs)Set the external document refsabstract voidsetLicenseListVersion(String licenseVersion)abstract voidsetSpdxId(String id)Set the SPDX identified for the documentabstract voidsetSPDXVersion(String spdxVersion)Methods inherited from class org.spdx.spdxspreadsheet.AbstractSheet
addRow, clear, createCenterStyle, createHeaderStyle, createLeftWrapStyle, getFirstDataRow, getNumDataRows, getSheet, resizeRows, verify
-
Field Details
-
Constructor Details
-
Method Details
-
create
-
openVersion
public static DocumentInfoSheet openVersion(org.apache.poi.ss.usermodel.Workbook workbook, String originSheetName, String version)Open an existing worksheet- Parameters:
workbook-originSheetName-version- Spreadsheet version- Returns:
-
getDataRow
protected org.apache.poi.ss.usermodel.Row getDataRow() -
getDataRow
protected org.apache.poi.ss.usermodel.Row getDataRow(int rowIndex) -
getOrCreateDataCell
protected org.apache.poi.ss.usermodel.Cell getOrCreateDataCell(int colNum) -
setDataCellStringValue
-
setDataCellDateValue
-
getDataCellDateValue
-
getDataCellStringValue
-
setSPDXVersion
- Parameters:
spdxVersion-
-
setCreatedBy
- Parameters:
createdBys-
-
setDataLicense
- Parameters:
id-
-
setAuthorComments
- Parameters:
comments-
-
setCreated
- Parameters:
parse-
-
getCreated
- Returns:
-
getCreatedBy
- Returns:
-
getAuthorComments
- Returns:
-
getSPDXVersion
- Returns:
-
getDataLicense
- Returns:
-
getDocumentComment
- Returns:
-
setDocumentComment
- Parameters:
docComment-
-
getLicenseListVersion
- Returns:
-
setLicenseListVersion
- Parameters:
licenseVersion-
-
getNamespace
- Returns:
-
addDocument
Add all origin information from the document- Parameters:
doc-- Throws:
SpreadsheetException
-
getSpdxId
- Returns:
- SPDX Identifier for the document
-
setSpdxId
Set the SPDX identified for the document- Parameters:
id-
-
getDocumentName
- Returns:
- Document name
-
setDocumentName
Set the document name- Parameters:
documentName-
-
getDocumentContents
- Returns:
- SPDX ID's for content described by this SPDX document
-
setDocumentDescribes
Set the SPDX ID's for content described by this SPDX document- Parameters:
contents-
-
getExternalDocumentRefs
- Returns:
- External document refs
- Throws:
SpreadsheetException
-
setExternalDocumentRefs
public abstract void setExternalDocumentRefs(ExternalDocumentRef[] externalDocumentRefs) throws SpreadsheetExceptionSet the external document refs- Parameters:
externalDocumentRefs-- Throws:
SpreadsheetException
-