org.apache.rat.analysis.license
Class FullTextMatchingLicense
java.lang.Object
org.apache.rat.analysis.license.BaseLicense
org.apache.rat.analysis.license.FullTextMatchingLicense
- All Implemented Interfaces:
- IHeaderMatcher
- Direct Known Subclasses:
- GPL1License, GPL2License, GPL3License, MITLicense, OASISLicense
public class FullTextMatchingLicense
- extends BaseLicense
- implements IHeaderMatcher
Accumulates all letters and numbers contained inside the header and
compares it to the full text of a given license (after reducing it
to letters and numbers as well).
The text comparison is case insensitive but assumes only
characters in the US-ASCII charset are being matched.
- Since:
- Rat 0.9
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FullTextMatchingLicense
public FullTextMatchingLicense()
FullTextMatchingLicense
protected FullTextMatchingLicense(MetaData.Datum licenseFamilyCategory,
MetaData.Datum licenseFamilyName,
String notes,
String fullText)
setFullText
public final void setFullText(String text)
hasFullText
public final boolean hasFullText()
prune
protected final String prune(String text)
match
public boolean match(Document subject,
String line)
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 interface IHeaderMatcher
- Parameters:
subject
- TODOline
- next line of text, not null
- Returns:
- TODO
- Throws:
RatHeaderAnalysisException
reset
public void reset()
- Description copied from interface:
IHeaderMatcher
- Resets this matches.
Subsequent calls to
IHeaderMatcher.match(org.apache.rat.api.Document, java.lang.String)
will accumulate new text.
- Specified by:
reset
in interface IHeaderMatcher
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.