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 boolean
equalsWithNull(Object s1, Object s2)
Returns true if s1 equals s2 taking into account the possibility of null valuesstatic boolean
equivalentArray(Object[] s1, Object[] s2)
Returns true if the array s1 contains the same objects as s2 independent of order and allowing for null valuesstatic boolean
isValidExternalDocRef(String externalDocumentId)
static boolean
isValidUri(String uri)
static String
verifyAnnotator(String annotator)
static String
verifyChecksumString(String checksum, ChecksumAlgorithm algorithm)
static String
verifyCreator(String creator)
Verifies a creator string valuestatic String
verifyDate(String creationDate)
static String
verifyDownloadLocation(String downloadLocation)
Verify a download location per section 3.7.5 of the specstatic String
verifyNonStdLicenseid(String licenseId)
static String
verifyOriginator(String originator)
Verifies the originator stringstatic String
verifyReviewer(String reviewer)
static boolean
verifySpdxId(String id)
static String
verifySupplier(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:
-
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
-
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
-