Package org.apache.rat.analysis.license
Class AppliedApacheSoftwareLicense20
- java.lang.Object
-
- org.apache.rat.analysis.license.BaseLicense
-
- org.apache.rat.analysis.license.CopyrightHeader
-
- org.apache.rat.analysis.license.AppliedApacheSoftwareLicense20
-
- All Implemented Interfaces:
IHeaderMatcher
public class AppliedApacheSoftwareLicense20 extends CopyrightHeader
Matches an applied AL 2.0 License header, including a required initial copyright header line, conforming the template from the AL 2.0 license itself.- Since:
- Rat 0.9
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ASL20_LICENSE_DEFN
private FullTextMatchingLicense
textMatcher
-
Fields inherited from class org.apache.rat.analysis.license.CopyrightHeader
COPYRIGHT_PREFIX_PATTERN_DEFN
-
-
Constructor Summary
Constructors Constructor Description AppliedApacheSoftwareLicense20()
AppliedApacheSoftwareLicense20(java.lang.String copyrightOwner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
match(Document subject, java.lang.String s)
Matches the text accumulated to licenses.void
reset()
Resets this matches.-
Methods inherited from class org.apache.rat.analysis.license.CopyrightHeader
getCopyRightOwner, hasCopyrightPattern, isCopyrightMatch, matchCopyright, setCopyrightOwner
-
Methods inherited from class org.apache.rat.analysis.license.BaseLicense
getLicenseFamilyCategory, getLicenseFamilyName, getNotes, prune, reportOnLicense, setLicenseFamilyCategory, setLicenseFamilyName, setNotes
-
-
-
-
Field Detail
-
ASL20_LICENSE_DEFN
public static final java.lang.String ASL20_LICENSE_DEFN
- See Also:
- Constant Field Values
-
textMatcher
private final FullTextMatchingLicense textMatcher
-
-
Method Detail
-
match
public boolean match(Document subject, java.lang.String s) throws RatHeaderAnalysisException
Description copied from interface:IHeaderMatcher
Matches the text accumulated to licenses. TODO probably a poor design choice - hope to fix later- Specified by:
match
in interfaceIHeaderMatcher
- Overrides:
match
in classCopyrightHeader
- Parameters:
subject
- current document.s
- next line of text, not null- Returns:
- whether the current line matched in the document.
- Throws:
RatHeaderAnalysisException
- in case of internal RAT errors.
-
reset
public void reset()
Description copied from interface:IHeaderMatcher
Resets this matches. Subsequent calls toIHeaderMatcher.match(org.apache.rat.api.Document, java.lang.String)
will accumulate new text.- Specified by:
reset
in interfaceIHeaderMatcher
- Overrides:
reset
in classCopyrightHeader
-
-