Package org.spdx.rdfparser
Class SPDXDocument.SPDXPackage
java.lang.Object
org.spdx.rdfparser.SPDXDocument.SPDXPackage
- Enclosing class:
- SPDXDocument
@Deprecated public class SPDXDocument.SPDXPackage extends Object
Deprecated.
Simple class representing an SPDX Package. This is stored in an RDF
model.
This package is initialized using an existing SPDXPackage in an
RDF document by constructing the package with the node representing the
SPDX package.
This class is provided for compatibility with version 1.2 of the library.
This class is replaced by model.SpdxPackage in version 2.0 and above.
- Author:
- Gary O'Neall
-
Constructor Summary
Constructors Constructor Description SPDXPackage(org.apache.jena.graph.Node pkgNode, SPDXDocument enclosingSpdxDocument)Deprecated.Construct a new SPDX package and populate the properties from the node -
Method Summary
Modifier and Type Method Description voidaddFile(SPDXFile file)Deprecated.Add a file to the packageSPDXDocument.SPDXPackageclone(SPDXDocument docToCloneTo, String packageUri)Deprecated.Clones a deep copy of all fields to a new SPDXPackage contained in the docToCloneTo SPDXDocument.AnyLicenseInfogetConcludedLicenses()Deprecated.StringgetDeclaredCopyright()Deprecated.AnyLicenseInfogetDeclaredLicense()Deprecated.StringgetDeclaredName()Deprecated.StringgetDescription()Deprecated.StringgetDownloadUrl()Deprecated.StringgetFileName()Deprecated.SPDXFile[]getFiles()Deprecated.StringgetHomePage()Deprecated.StringgetLicenseComment()Deprecated.AnyLicenseInfo[]getLicenseInfoFromFiles()Deprecated.StringgetOriginator()Deprecated.SPDXPackageInfogetPackageInfo()Deprecated.StringgetSha1()Deprecated.StringgetShortDescription()Deprecated.StringgetSourceInfo()Deprecated.StringgetSupplier()Deprecated.SpdxPackageVerificationCodegetVerificationCode()Deprecated.StringgetVersionInfo()Deprecated.voidremoveFile(String fileName)Deprecated.Removes all SPDX files by the given namevoidsetConcludedLicenses(AnyLicenseInfo detectedLicenses)Deprecated.voidsetDeclaredCopyright(String declaredCopyright)Deprecated.voidsetDeclaredLicense(AnyLicenseInfo declaredLicense)Deprecated.voidsetDeclaredName(String declaredName)Deprecated.voidsetDescription(String description)Deprecated.voidsetDownloadUrl(String url)Deprecated.voidsetFileName(String fileName)Deprecated.voidsetFiles(SPDXFile[] files)Deprecated.voidsetHomePage(String url)Deprecated.voidsetLicenseComment(String comments)Deprecated.voidsetLicenseInfoFromFiles(AnyLicenseInfo[] licenseInfo)Deprecated.voidsetOriginator(String originator)Deprecated.Set the originatorvoidsetSha1(String sha1)Deprecated.voidsetShortDescription(String shortDescription)Deprecated.voidsetSourceInfo(String sourceInfo)Deprecated.voidsetSupplier(String supplier)Deprecated.Set the SuppliervoidsetVerificationCode(SpdxPackageVerificationCode verificationCode)Deprecated.voidsetVersionInfo(String versionInfo)Deprecated.Set the version information of the packageList<String>verify()Deprecated.
-
Constructor Details
-
SPDXPackage
Deprecated.Construct a new SPDX package and populate the properties from the node- Parameters:
pkgNode- Node in the RDF graph representing the SPDX package
-
-
Method Details
-
getDeclaredName
Deprecated.- Returns:
- the declaredName
- Throws:
InvalidSPDXAnalysisException
-
setDeclaredName
Deprecated.- Parameters:
declaredName- the declaredName to set- Throws:
InvalidSPDXAnalysisException
-
getFileName
Deprecated.- Returns:
- the fileName
- Throws:
InvalidSPDXAnalysisException
-
setFileName
Deprecated.- Parameters:
fileName- the fileName to set- Throws:
InvalidSPDXAnalysisException
-
getSha1
Deprecated.- Returns:
- the sha1
- Throws:
InvalidSPDXAnalysisException
-
setSha1
Deprecated.- Parameters:
sha1- the sha1 to set- Throws:
InvalidSPDXAnalysisException
-
getSourceInfo
Deprecated.- Returns:
- the sourceInfo
- Throws:
InvalidSPDXAnalysisException
-
setSourceInfo
Deprecated.- Parameters:
sourceInfo- the sourceInfo to set- Throws:
InvalidSPDXAnalysisException
-
getVersionInfo
Deprecated.- Returns:
- Version information of the package
- Throws:
InvalidSPDXAnalysisException
-
setVersionInfo
Deprecated.Set the version information of the package- Parameters:
versionInfo-- Throws:
InvalidSPDXAnalysisException
-
getDeclaredLicense
Deprecated.- Returns:
- the declaredLicenses
- Throws:
InvalidSPDXAnalysisException
-
setDeclaredLicense
Deprecated.- Parameters:
declaredLicenses- the declaredLicenses to set- Throws:
InvalidSPDXAnalysisException
-
getConcludedLicenses
Deprecated.- Returns:
- the detectedLicenses
- Throws:
InvalidSPDXAnalysisException
-
setConcludedLicenses
public void setConcludedLicenses(AnyLicenseInfo detectedLicenses) throws InvalidSPDXAnalysisExceptionDeprecated.- Parameters:
detectedLicenses- the detectedLicenses to set- Throws:
InvalidSPDXAnalysisException
-
getLicenseComment
Deprecated.- Returns:
- the licenseComment
- Throws:
InvalidSPDXAnalysisException
-
setLicenseComment
Deprecated.- Parameters:
comments- the license comments to set- Throws:
InvalidSPDXAnalysisException
-
getDeclaredCopyright
Deprecated.- Returns:
- the declaredCopyright
- Throws:
InvalidSPDXAnalysisException
-
setDeclaredCopyright
Deprecated.- Parameters:
declaredCopyright- the declaredCopyright to set- Throws:
InvalidSPDXAnalysisException
-
getShortDescription
Deprecated.- Returns:
- the shortDescription
- Throws:
InvalidSPDXAnalysisException
-
setShortDescription
Deprecated.- Parameters:
shortDescription- the shortDescription to set- Throws:
InvalidSPDXAnalysisException
-
getDescription
Deprecated.- Returns:
- the description
- Throws:
InvalidSPDXAnalysisException
-
setDescription
Deprecated.- Parameters:
description- the description to set- Throws:
InvalidSPDXAnalysisException
-
setOriginator
Deprecated.Set the originator- Parameters:
originator- Either a valid originator string or NOASSERTION- Throws:
InvalidSPDXAnalysisException
-
setSupplier
Deprecated.Set the Supplier- Parameters:
supplier- Either a valid originator string or NOASSERTION- Throws:
InvalidSPDXAnalysisException
-
getOriginator
Deprecated.- Throws:
InvalidSPDXAnalysisException
-
getSupplier
Deprecated.- Throws:
InvalidSPDXAnalysisException
-
getFiles
Deprecated.- Returns:
- the files
- Throws:
InvalidSPDXAnalysisException
-
setFiles
Deprecated.- Parameters:
files- the files to set- Throws:
InvalidSPDXAnalysisException
-
addFile
Deprecated.Add a file to the package- Parameters:
file-- Throws:
InvalidSPDXAnalysisException
-
removeFile
Deprecated.Removes all SPDX files by the given name- Parameters:
fileName- Name of SPDX file to be removed- Throws:
InvalidSPDXAnalysisException
-
getDownloadUrl
Deprecated.- Throws:
InvalidSPDXAnalysisException
-
setDownloadUrl
Deprecated.- Throws:
InvalidSPDXAnalysisException
-
getHomePage
Deprecated.- Throws:
InvalidSPDXAnalysisException
-
setHomePage
Deprecated.- Throws:
InvalidSPDXAnalysisException
-
getVerificationCode
Deprecated.- Throws:
InvalidSPDXAnalysisException
-
setVerificationCode
public void setVerificationCode(SpdxPackageVerificationCode verificationCode) throws InvalidSPDXAnalysisExceptionDeprecated.- Throws:
InvalidSPDXAnalysisException
-
getPackageInfo
Deprecated.- Throws:
InvalidSPDXAnalysisException
-
setLicenseInfoFromFiles
public void setLicenseInfoFromFiles(AnyLicenseInfo[] licenseInfo) throws InvalidSPDXAnalysisExceptionDeprecated.- Throws:
InvalidSPDXAnalysisException
-
getLicenseInfoFromFiles
Deprecated.- Throws:
InvalidSPDXAnalysisException
-
clone
public SPDXDocument.SPDXPackage clone(SPDXDocument docToCloneTo, String packageUri) throws InvalidSPDXAnalysisExceptionDeprecated.Clones a deep copy of all fields to a new SPDXPackage contained in the docToCloneTo SPDXDocument. NOTE: This will overwrite any existing SPDXPackages contained within the SPDXDocument and the SPDXDocument must not contain any extracted licenses- Parameters:
docToCloneTo- SPDX Document to contain the result of the clonepackageUri- URI for the SPDX Package being created- Returns:
- A deep copy of this SPDXPackage contained within docToCloneTo
- Throws:
InvalidSPDXAnalysisException
-
verify
Deprecated.- Returns:
- Array list of any error messages found in verifying the package model
-