Class DefaultPolicy

java.lang.Object
org.apache.rat.policy.DefaultPolicy
All Implemented Interfaces:
IDocumentAnalyser

public class DefaultPolicy extends Object implements IDocumentAnalyser
A default Document Analyser that determines if the matched license is in the set of approved licenses.
  • Constructor Details

    • DefaultPolicy

      public DefaultPolicy(Collection<ILicenseFamily> approvedLicenseFamilies)
      Constructor with the list of approved license families.
      Parameters:
      approvedLicenseFamilies - the approved license families.
  • Method Details

    • add

      public void add(ILicenseFamily approvedLicense)
      Adds an ILicenseFamily to the list of approved licenses.
      Parameters:
      approvedLicense - license to be approved.
    • analyse

      public void analyse(Document document)
      Description copied from interface: IDocumentAnalyser
      Analyse the specified document.
      Specified by:
      analyse in interface IDocumentAnalyser
      Parameters:
      document - the document to analyze
    • getApprovedLicenseFamilies

      public SortedSet<ILicenseFamily> getApprovedLicenseFamilies()
      Gets an unmodifiable reference to the SortedSet of approved licenses that this policy is holding.
      Returns:
      sorted set of license family definitions.