public class FullTextMatchingLicense extends BaseLicense implements IHeaderMatcher
The text comparison is case insensitive but assumes only characters in the US-ASCII charset are being matched.
| Modifier and Type | Field and Description |
|---|---|
private java.lang.StringBuilder |
buffer |
private static int |
DEFAULT_INITIAL_LINE_LENGTH |
private java.lang.String |
firstLine |
private java.lang.String |
fullText |
private boolean |
seenFirstLine |
| Modifier | Constructor and Description |
|---|---|
|
FullTextMatchingLicense() |
protected |
FullTextMatchingLicense(MetaData.Datum licenseFamilyCategory,
MetaData.Datum licenseFamilyName,
java.lang.String notes,
java.lang.String fullText) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasFullText() |
private void |
init() |
boolean |
match(Document subject,
java.lang.String line)
Matches the text accumulated to licenses.
|
void |
reset()
Resets this matches.
|
void |
setFullText(java.lang.String text) |
getLicenseFamilyCategory, getLicenseFamilyName, getNotes, prune, reportOnLicense, setLicenseFamilyCategory, setLicenseFamilyName, setNotesprivate static final int DEFAULT_INITIAL_LINE_LENGTH
private java.lang.String fullText
private java.lang.String firstLine
private boolean seenFirstLine
private final java.lang.StringBuilder buffer
public FullTextMatchingLicense()
protected FullTextMatchingLicense(MetaData.Datum licenseFamilyCategory, MetaData.Datum licenseFamilyName, java.lang.String notes, java.lang.String fullText)
public final void setFullText(java.lang.String text)
public final boolean hasFullText()
public boolean match(Document subject, java.lang.String line) throws RatHeaderAnalysisException
IHeaderMatchermatch in interface IHeaderMatchersubject - current document.line - next line of text, not nullRatHeaderAnalysisException - in case of internal RAT errors.public void reset()
IHeaderMatcherIHeaderMatcher.match(org.apache.rat.api.Document, java.lang.String) will accumulate new text.reset in interface IHeaderMatcherprivate void init()