org.apache.rat.analysis.license
Class AppliedApacheSoftwareLicense20

java.lang.Object
  extended by org.apache.rat.analysis.license.BaseLicense
      extended by org.apache.rat.analysis.license.CopyrightHeader
          extended by org.apache.rat.analysis.license.AppliedApacheSoftwareLicense20
All Implemented Interfaces:
IHeaderMatcher

public class AppliedApacheSoftwareLicense20
extends CopyrightHeader

Matches an applied ASL 2.0 License header, including a required initial copyright header line, conforming the template from the ASL 2.0 license itself.

Since:
Rat 0.9

Field Summary
static String ASL20_LICENSE_DEFN
           
protected static Pattern LICENSE_PATTERN
           
 
Fields inherited from class org.apache.rat.analysis.license.CopyrightHeader
COPYRIGHT_PREFIX_PATTERN_DEFN
 
Constructor Summary
AppliedApacheSoftwareLicense20()
           
AppliedApacheSoftwareLicense20(String copyrightOwner)
           
 
Method Summary
 boolean match(Document subject, String s)
          Matches the text accumulated to licenses.
protected static String prune(String text)
           
 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, reportOnLicense, setLicenseFamilyCategory, setLicenseFamilyName, setNotes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASL20_LICENSE_DEFN

public static final String ASL20_LICENSE_DEFN
See Also:
Constant Field Values

LICENSE_PATTERN

protected static final Pattern LICENSE_PATTERN
Constructor Detail

AppliedApacheSoftwareLicense20

public AppliedApacheSoftwareLicense20()

AppliedApacheSoftwareLicense20

public AppliedApacheSoftwareLicense20(String copyrightOwner)
Method Detail

prune

protected static String prune(String text)

match

public boolean match(Document subject,
                     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 interface IHeaderMatcher
Overrides:
match in class CopyrightHeader
Parameters:
subject - TODO
s - 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
Overrides:
reset in class CopyrightHeader


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.