Package org.spdx.tools
Class Verify
java.lang.Object
org.spdx.tools.Verify
Verifies an SPDX document and lists any verification errors
- Author:
- Gary O'Neall
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoidusage()verify(String filePath, SpdxToolsHelper.SerFileType fileType) Verify a an SPDX fileverifyRDFFile(String filePath) Verify an RDF/XML fileverifyTagFile(String filePath) Verify a tag/value file
-
Field Details
-
JSON_SCHEMA_RESOURCE_V2_3
- See Also:
-
JSON_SCHEMA_RESOURCE_V2_2
- See Also:
-
JSON_SCHEMA_RESOURCE_V3
- See Also:
-
-
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 SpdxVerificationException Verify a an SPDX file- Parameters:
filePath- File path to the SPDX file to be verified- Returns:
- A list of verification errors - if empty, the SPDX file is valid
- Throws:
SpdxVerificationException- 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()
-