Class UnknownLicense

java.lang.Object
org.apache.rat.analysis.UnknownLicense
All Implemented Interfaces:
Comparable<ILicense>, IHeaderMatcher, ILicense

public final class UnknownLicense extends Object implements ILicense
An ILicense implementation that represents an unknown license.

The UnknownLicense is used during processing to report that a document license can not be determined.

  • Field Details

    • INSTANCE

      public static final UnknownLicense INSTANCE
      The single instance of this class.
  • Method Details

    • getId

      public String getId()
      Description copied from interface: IHeaderMatcher
      Get the identifier for this matcher.

      All matchers must have unique identifiers

      Specified by:
      getId in interface IHeaderMatcher
      Returns:
      the identifier for this matcher.
    • reset

      public void reset()
      Description copied from interface: IHeaderMatcher
      Resets this state of this matcher to its initial state in preparation for use with another document scan. In most cases this method does not need to do anything.
      Specified by:
      reset in interface IHeaderMatcher
    • matches

      public boolean matches(IHeaders headers)
      Description copied from interface: IHeaderMatcher
      Attempts to match text in the IHeaders instance.
      Specified by:
      matches in interface IHeaderMatcher
      Parameters:
      headers - the representations of the headers to check
      Returns:
      true if the matcher matches the text, false otherwise.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getLicenseFamily

      public ILicenseFamily getLicenseFamily()
      Description copied from interface: ILicense
      Gets the license family.
      Specified by:
      getLicenseFamily in interface ILicense
      Returns:
      the ILicenseFamily implementation for this license.
    • getNote

      public String getNote()
      Description copied from interface: ILicense
      Gets the note associated with the license.
      Specified by:
      getNote in interface ILicense
      Returns:
      the note associated with this license. May be null or empty.
    • getName

      public String getName()
      Description copied from interface: ILicense
      Returns the name of this license. If no name was specified then the name of the family is returned.
      Specified by:
      getName in interface ILicense
      Returns:
      the name of this license.
    • getMatcher

      public IHeaderMatcher getMatcher()
      Description copied from interface: ILicense
      Get the header matcher for this license.
      Specified by:
      getMatcher in interface ILicense
      Returns:
      the header matcher for this license.