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.String
CLAUSE_DEFN
private static java.util.regex.Pattern
COPYRIGHT_PATTERN
private static java.lang.String
COPYRIGHT_PATTERN_DEFN
(package private) boolean
copyrightMatch
-
Constructor Summary
Constructors Constructor Description OASISLicense()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
match(Document subject, java.lang.String line)
Matches the text accumulated to licenses.void
reset()
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: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 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: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 classFullTextMatchingLicense
-
-