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
  • Field Details

  • Constructor Details

    • Verify

      public Verify()
  • Method Details

    • main

      public static void main(String[] args)
      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

      public static List<String> verifyTagFile(String filePath) throws SpdxVerificationException
      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

      public static List<String> verifyRDFFile(String filePath) throws SpdxVerificationException
      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()