Package org.spdx.library.model
Class SpdxFile.SpdxFileBuilder
java.lang.Object
org.spdx.library.model.SpdxFile.SpdxFileBuilder
- Enclosing class:
- SpdxFile
public static class SpdxFile.SpdxFileBuilder extends Object
-
Constructor Summary
Constructors Constructor Description SpdxFileBuilder(IModelStore modelStore, String documentUri, String id, ModelCopyManager copyManager, String name, AnyLicenseInfo concludedLicense, Collection<AnyLicenseInfo> licenseInfosFromFile, String copyrightText, Checksum sha1)
Build a file with the required parameters -
Method Summary
-
Constructor Details
-
SpdxFileBuilder
public SpdxFileBuilder(IModelStore modelStore, String documentUri, String id, @Nullable ModelCopyManager copyManager, String name, AnyLicenseInfo concludedLicense, Collection<AnyLicenseInfo> licenseInfosFromFile, String copyrightText, Checksum sha1)Build a file with the required parameters- Parameters:
modelStore
- Storage for the model objectsdocumentUri
- SPDX Document URI for a document associated with this modelid
- ID for this object - must be unique within the SPDX documentcopyManager
- if non-null, allows for copying of any properties set which use other model stores or document URI'sname
- - File nameconcludedLicense
- license concludedlicenseInfosFromFile
- collection of seen licensescopyrightText
- Copyright textsha1
- - Sha1 checksum value
-
-
Method Details
-
setAnnotations
- Parameters:
annotations
- Annotations- Returns:
- this to continue the build
-
addAnnotation
- Parameters:
annotation
- Annotation to add- Returns:
- this to continue the build
-
setRelationship
- Parameters:
relationships
- Relationships- Returns:
- this to continue the build
-
addRelationship
- Parameters:
relationship
- Relationship to add- Returns:
- this to continue the build
-
setComment
- Parameters:
comment
- Comment- Returns:
- this to continue the build
-
setLicenseComments
- Parameters:
licenseComments
-- Returns:
- this to continue the build
-
setChecksums
- Parameters:
checksums
- Checksum- Returns:
- this to continue the build
-
addChecksum
- Parameters:
checksum
- Checksum to add- Returns:
- this to continue the build
-
setFileContributors
- Parameters:
fileContributors
- Contributors to the file- Returns:
- this to continue the build
-
addFileContributor
- Parameters:
fileContributor
- File contributor to add- Returns:
- this to continue the build
-
setFileTypes
- Parameters:
fileTypes
- file types- Returns:
- this to continue the build
-
addFileType
- Parameters:
fileType
- file type to add- Returns:
- this to continue the build
-
setNoticeText
- Parameters:
noticeText
- Notice text found in the file- Returns:
- this to continue the build
-
setAttributionText
- Parameters:
attributionText
- Attribution text for the file- Returns:
- this to continue the build
-
addAttributionText
Add attribution to the attribution text collection- Parameters:
attribution
-- Returns:
-
build
- Throws:
InvalidSPDXAnalysisException
-