Class SpdxComparer

java.lang.Object
org.spdx.compare.SpdxComparer

public class SpdxComparer
extends Object
Performs a comparison between two or more SPDX documents and holds the results of the comparison The main function to perform the comparison is compare(spdxdoc1, spdxdoc2) For reviewers, the comparison results are separated into unique reviewers for a give document which can be obtained by the method getUniqueReviewers(index1, index2). The uniqueness is determined by the reviewer name. If two documents contain reviewers with the same name but different dates or comments, the reviews are considered to be the same review with different data. The differences for these reviews can be obtained through the method getReviewerDifferences(index1, index2) For files, the comparison results are separated into unique files based on the file names which can be obtained by the method getUniqueFiles(index1, index2). If two documents contain files with the same name, but different data, the differences for these files can be obtained through the method getFileDifferences(index1, index2) Multi-threading considerations: This class is "mostly" threadsafe in that the calls to perform the comparison are synchronized and a flag is used to throw an error for any calls to getters when a compare is in progress. There is a small theoretical window in the getters where the compare operation is started in the middle of a get operation.
Author:
Gary O'Neall