Class UnknownLicense

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

public 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.

  • 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 State.i. If text is being cached this method should clear that cache.
      Specified by:
      reset in interface IHeaderMatcher
    • matches

      public IHeaderMatcher.State matches(String line)
      Description copied from interface: IHeaderMatcher
      Attempts to match line and returns the State after the match is attempted.
      Specified by:
      matches in interface IHeaderMatcher
      Parameters:
      line - next line of text, not null
      Returns:
      the new state after the matching was attempted.
    • finalizeState

      public IHeaderMatcher.State finalizeState()
      Description copied from interface: IHeaderMatcher
      Gets the final state for this matcher. This is called after the EOF on the input. At this point there should be no matchers in an State.i state.
      Specified by:
      finalizeState in interface IHeaderMatcher
    • currentState

      public IHeaderMatcher.State currentState()
      Description copied from interface: IHeaderMatcher
      Gets the the current state of the matcher. All matchers should be in State.i at the start.
      Specified by:
      currentState in interface IHeaderMatcher
      Returns:
      the current state of the matcher.
    • compareTo

      public int compareTo(ILicense arg0)
      Specified by:
      compareTo in interface Comparable<ILicense>
    • getLicenseFamily

      public ILicenseFamily getLicenseFamily()
      Specified by:
      getLicenseFamily in interface ILicense
      Returns:
      the ILicenseFamily implementation for this license.
    • getNotes

      public String getNotes()
      Specified by:
      getNotes in interface ILicense
      Returns:
      the notes 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.
    • derivedFrom

      public String derivedFrom()
      Specified by:
      derivedFrom in interface ILicense
      Returns:
      the id of a license that this license is derived from. May be null.