Package org.apache.rat.analysis.license
Class OASISLicense
- java.lang.Object
-
- org.apache.rat.analysis.license.BaseLicense
-
- org.apache.rat.analysis.license.FullTextMatchingLicense
-
- org.apache.rat.analysis.license.OASISLicense
-
- All Implemented Interfaces:
IHeaderMatcher
public class OASISLicense extends FullTextMatchingLicense
Looks for documents contain the OASIS copyright claim plus derivative work clause. Perhaps need to match more.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringCLAUSE_DEFNprivate static java.util.regex.PatternCOPYRIGHT_PATTERNprivate static java.lang.StringCOPYRIGHT_PATTERN_DEFN(package private) booleancopyrightMatch
-
Constructor Summary
Constructors Constructor Description OASISLicense()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatch(Document subject, java.lang.String line)Matches the text accumulated to licenses.voidreset()Resets this matches.-
Methods inherited from class org.apache.rat.analysis.license.FullTextMatchingLicense
hasFullText, setFullText
-
Methods inherited from class org.apache.rat.analysis.license.BaseLicense
getLicenseFamilyCategory, getLicenseFamilyName, getNotes, prune, reportOnLicense, setLicenseFamilyCategory, setLicenseFamilyName, setNotes
-
-
-
-
Field Detail
-
COPYRIGHT_PATTERN_DEFN
private static final java.lang.String COPYRIGHT_PATTERN_DEFN
- See Also:
- Constant Field Values
-
CLAUSE_DEFN
private static final java.lang.String CLAUSE_DEFN
- See Also:
- Constant Field Values
-
COPYRIGHT_PATTERN
private static final java.util.regex.Pattern COPYRIGHT_PATTERN
-
copyrightMatch
boolean copyrightMatch
-
-
Method Detail
-
match
public boolean match(Document subject, java.lang.String line) throws RatHeaderAnalysisException
Description copied from interface:IHeaderMatcherMatches the text accumulated to licenses. TODO probably a poor design choice - hope to fix later- Specified by:
matchin interfaceIHeaderMatcher- Overrides:
matchin classFullTextMatchingLicense- Parameters:
subject- current document.line- 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:IHeaderMatcherResets this matches. Subsequent calls toIHeaderMatcher.match(org.apache.rat.api.Document, java.lang.String)will accumulate new text.- Specified by:
resetin interfaceIHeaderMatcher- Overrides:
resetin classFullTextMatchingLicense
-
-