Package org.spdx.tools
Class Verify
java.lang.Object
org.spdx.tools.Verify
public class Verify extends Object
Verifies an SPDX document and lists any verification errors
- Author:
- Gary O'Neall
-
Constructor Summary
Constructors Constructor Description Verify() -
Method Summary
Modifier and Type Method Description static voidmain(String[] args)voidusage()static List<String>verify(String filePath, SpdxToolsHelper.SerFileType fileType)Verify a an SPDX filestatic List<String>verifyRDFFile(String filePath)Verify an RDF/XML filestatic List<String>verifyTagFile(String filePath)Verify a tag/value file
-
Constructor Details
-
Verify
public Verify()
-
-
Method Details
-
main
- Parameters:
args- args[0] SPDX file path; args[1] [RDFXML|JSON|XLS|XLSX|YAML|TAG] an optional file type - if not present, file type of the to file will be used
-
verify
public static List<String> verify(String filePath, SpdxToolsHelper.SerFileType fileType) throws SpdxVerificationExceptionVerify a an SPDX file- Parameters:
filePath- File path to the SPDX file to be verifiedfileType-- Returns:
- A list of verification errors - if empty, the SPDX file is valid
- Throws:
InvalidFileNameExceptionIOExceptionSpdxVerificationExceptionErrors- where the SPDX file can not be parsed or the filename is invalid
-
verifyTagFile
Verify a tag/value file- Parameters:
filePath- File path to the SPDX Tag Value file to be verified- Returns:
- A list of verification errors - if empty, the SPDX file is valid
- Throws:
SpdxVerificationException- Errors where the SPDX Tag Value file can not be parsed or the filename is invalid
-
verifyRDFFile
Verify an RDF/XML file- Parameters:
filePath- File path to the SPDX RDF/XML file to be verified- Returns:
- SpdxDocument
- Throws:
SpdxVerificationException- Errors where the SPDX RDF/XML file can not be parsed or the filename is invalid
-
usage
public void usage()
-