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 Details

  • Method Details

    • main

      public static void main​(String[] args)
      Parameters:
      args - Single argument SPDX file - can be tag/value or RDF
    • verify

      public static List<String> verify​(String filePath) throws SpdxVerificationException
      Verify a tag/value or 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:
      Errors - where the SPDX file can not be parsed or the filename is invalid
      SpdxVerificationException
    • 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