Package org.ossreviewtoolkit.model.utils
Class FindingsMatcher
-
- All Implemented Interfaces:
public final class FindingsMatcherA class for matching copyright findings to license findings. Copyright statements may be matched either to license findings located nearby in the same file or to a license found in a license file whereas the given rootLicenseMatcher determines whether a file is a license file.
-
-
Field Summary
Fields Modifier and Type Field Description public final static IntegerDEFAULT_TOLERANCE_LINESpublic final static IntegerDEFAULT_EXPAND_TOLERANCE_LINES
-
Constructor Summary
Constructors Constructor Description FindingsMatcher(RootLicenseMatcher rootLicenseMatcher, Integer toleranceLines, Integer expandToleranceLines)
-
Method Summary
Modifier and Type Method Description final FindingsMatcherResultmatch(Set<LicenseFinding> licenseFindings, Set<CopyrightFinding> copyrightFindings)Associate the copyrightFindings to the licenseFindings. -
-
Constructor Detail
-
FindingsMatcher
FindingsMatcher(RootLicenseMatcher rootLicenseMatcher, Integer toleranceLines, Integer expandToleranceLines)
-
-
Method Detail
-
match
final FindingsMatcherResult match(Set<LicenseFinding> licenseFindings, Set<CopyrightFinding> copyrightFindings)
Associate the copyrightFindings to the licenseFindings. Copyright findings are matched to license findings located nearby in the same file. Copyright findings that are not located close to a license finding are associated to the root licenses instead. The root licenses are the licenses found in any of the license files defined by rootLicenseMatcher.
-
-
-
-