private static void copyOrigins(OriginsSheet originsSheet, SPDXDocument analysis) throws InvalidSPDXAnalysisException { Date createdDate = originsSheet.getCreated(); String created = format.format(createdDate); String[] createdBys = originsSheet.getCreatedBy(); String creatorComment = originsSheet.getAuthorComments(); SPDXCreatorInformation creator = new SPDXCreatorInformation(createdBys, created, creatorComment); String specVersion = originsSheet.getSPDXVersion(); analysis.setSpdxVersion(specVersion); String dataLicenseId = originsSheet.getDataLicense(); if (dataLicenseId == null || dataLicenseId.isEmpty() || dataLicenseId.equals(RdfToSpreadsheet.NOT_SUPPORTED_STRING)) { if (specVersion.equals(SPDXDocument.ONE_DOT_ZERO_SPDX_VERSION)) { dataLicenseId = SpdxRdfConstants.SPDX_DATA_LICENSE_ID_VERSION_1_0; } else { dataLicenseId = SpdxRdfConstants.SPDX_DATA_LICENSE_ID; } } SPDXStandardLicense dataLicense = null; try { dataLicense = (SPDXStandardLicense) SPDXLicenseInfoFactory.parseSPDXLicenseString(dataLicenseId); } catch (Exception ex) { try { dataLicense = (SPDXStandardLicense) SPDXLicenseInfoFactory.parseSPDXLicenseString( SpdxRdfConstants.SPDX_DATA_LICENSE_ID); } catch (InvalidLicenseStringException e) { throw (new InvalidSPDXAnalysisException("Unable to get document license")); } } analysis.setDataLicense(dataLicense); analysis.setCreationInfo(creator); }