Class Defaults

java.lang.Object
org.apache.rat.Defaults

public class Defaults extends Object
A class that holds the list of licenses and approved licenses from one or more configuration files.
  • Field Details

    • PLAIN_STYLESHEET

      public static final String PLAIN_STYLESHEET
      The default XSLT stylesheet to produce a text output file.
      See Also:
      Constant Field Values
    • UNAPPROVED_LICENSES_STYLESHEET

      public static final String UNAPPROVED_LICENSES_STYLESHEET
      The default XSLT stylesheet to produce a list of unapproved licenses.
      See Also:
      Constant Field Values
  • Method Details

    • init

      public static void init()
      Initialize the system configuration reader..
    • builder

      public static Defaults.Builder builder()
      Gets a builder for a Defaults object.
      Returns:
      the Builder.
    • getPlainStyleSheet

      public static org.apache.commons.io.function.IOSupplier<InputStream> getPlainStyleSheet()
      Gets a supplier for the "plain" text stylesheet.
      Returns:
      an IOSupplier for the plain text stylesheet.
    • getUnapprovedLicensesStyleSheet

      public static org.apache.commons.io.function.IOSupplier<InputStream> getUnapprovedLicensesStyleSheet()
      Gets a supplier for the unapproved licences list stylesheet
      Returns:
      an IOSupplier for the unapproved licenses list stylesheet.
    • getLicenses

      public SortedSet<ILicense> getLicenses(LicenseSetFactory.LicenseFilter filter)
      Gets the sorted set of approved licenses for a given filter condition.
      Parameters:
      filter - define which type of licenses to return.
      Returns:
      sorted set of licenses.
    • getLicenseFamilies

      public SortedSet<ILicenseFamily> getLicenseFamilies(LicenseSetFactory.LicenseFilter filter)
      Gets the sorted set of approved licenses for a given filter condition.
      Parameters:
      filter - define which type of licenses to return.
      Returns:
      sorted set of license families.
    • getLicenseIds

      public SortedSet<String> getLicenseIds(LicenseSetFactory.LicenseFilter filter)
      Gets the sorted set of approved license ids for a given filter condition. If no licenses have been explicitly listed as approved, all licenses are assumed to be approved.
      Parameters:
      filter - define which type of licenses to return.
      Returns:
      The sorted set of approved licenseIds.