Package org.spdx.library
Class SpdxVerificationHelper
java.lang.Object
org.spdx.library.SpdxVerificationHelper
public class SpdxVerificationHelper extends Object
Holds static methods used for verify various property values
- Author:
- Gary O'Neall
-
Constructor Summary
Constructors Constructor Description SpdxVerificationHelper() -
Method Summary
Modifier and Type Method Description static booleanequalsWithNull(Object s1, Object s2)Returns true if s1 equals s2 taking into account the possibility of null valuesstatic booleanequivalentArray(Object[] s1, Object[] s2)Returns true if the array s1 contains the same objects as s2 independent of order and allowing for null valuesstatic booleanisValidExternalDocRef(String externalDocumentId)static booleanisValidUri(String uri)static StringverifyAnnotator(String annotator)static StringverifyChecksumString(String checksum, ChecksumAlgorithm algorithm, String specVersion)static StringverifyCreator(String creator)Verifies a creator string valuestatic StringverifyDate(String creationDate)static StringverifyDownloadLocation(String downloadLocation)Verify a download location per section 3.7.5 of the specstatic StringverifyNonStdLicenseid(String licenseId)static StringverifyOriginator(String originator)Verifies the originator stringstatic StringverifyReviewer(String reviewer)static booleanverifySpdxId(String id)static StringverifySupplier(String supplier)Verifies the supplier String
-
Constructor Details
-
SpdxVerificationHelper
public SpdxVerificationHelper()
-
-
Method Details
-
verifyNonStdLicenseid
-
verifyCreator
Verifies a creator string value- Parameters:
creator-- Returns:
-
verifyOriginator
Verifies the originator string- Parameters:
originator-- Returns:
-
verifySupplier
Verifies the supplier String- Parameters:
supplier-- Returns:
-
verifyDate
- Parameters:
creationDate-- Returns:
- error message or null if no error
-
verifyReviewer
- Parameters:
reviewer-- Returns:
-
equalsWithNull
Returns true if s1 equals s2 taking into account the possibility of null values- Parameters:
s1-s2-- Returns:
-
equivalentArray
Returns true if the array s1 contains the same objects as s2 independent of order and allowing for null values- Parameters:
s1-s2-- Returns:
-
verifyAnnotator
- Parameters:
annotator-- Returns:
-
isValidExternalDocRef
- Parameters:
externalDocumentId-- Returns:
-
isValidUri
-
verifyChecksumString
public static String verifyChecksumString(String checksum, ChecksumAlgorithm algorithm, String specVersion) -
verifyDownloadLocation
Verify a download location per section 3.7.5 of the spec- Parameters:
downloadLocation-- Returns:
- null if a valid string otherwise a description of the error
-
verifySpdxId
- Parameters:
id-- Returns:
- true if the ID is a valid SPDX ID reference
-