creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pottlin...@apache.org
Subject [03/51] [partial] creadur-site git commit: Init with current RAT docs.
Date Fri, 09 Sep 2016 21:54:11 GMT
http://git-wip-us.apache.org/repos/asf/creadur-site/blob/88439734/apache-rat-core/xref-test/org/apache/rat/analysis/MockLicenseMatcher.html
----------------------------------------------------------------------
diff --git a/apache-rat-core/xref-test/org/apache/rat/analysis/MockLicenseMatcher.html b/apache-rat-core/xref-test/org/apache/rat/analysis/MockLicenseMatcher.html
new file mode 100644
index 0000000..ffa1a8a
--- /dev/null
+++ b/apache-rat-core/xref-test/org/apache/rat/analysis/MockLicenseMatcher.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<title>MockLicenseMatcher xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../testapidocs/org/apache/rat/analysis/MockLicenseMatcher.html">View Javadoc</a></div><pre>
+<a class="jxr_linenumber" name="L1" href="#L1">1</a>   <em class="jxr_comment">/*</em>
+<a class="jxr_linenumber" name="L2" href="#L2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one   *</em>
+<a class="jxr_linenumber" name="L3" href="#L3">3</a>   <em class="jxr_comment"> * or more contributor license agreements.  See the NOTICE file *</em>
+<a class="jxr_linenumber" name="L4" href="#L4">4</a>   <em class="jxr_comment"> * distributed with this work for additional information        *</em>
+<a class="jxr_linenumber" name="L5" href="#L5">5</a>   <em class="jxr_comment"> * regarding copyright ownership.  The ASF licenses this file   *</em>
+<a class="jxr_linenumber" name="L6" href="#L6">6</a>   <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the            *</em>
+<a class="jxr_linenumber" name="L7" href="#L7">7</a>   <em class="jxr_comment"> * "License"); you may not use this file except in compliance   *</em>
+<a class="jxr_linenumber" name="L8" href="#L8">8</a>   <em class="jxr_comment"> * with the License.  You may obtain a copy of the License at   *</em>
+<a class="jxr_linenumber" name="L9" href="#L9">9</a>   <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L10" href="#L10">10</a>  <em class="jxr_comment"> *   <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a>                 *</em>
+<a class="jxr_linenumber" name="L11" href="#L11">11</a>  <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L12" href="#L12">12</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,   *</em>
+<a class="jxr_linenumber" name="L13" href="#L13">13</a>  <em class="jxr_comment"> * software distributed under the License is distributed on an  *</em>
+<a class="jxr_linenumber" name="L14" href="#L14">14</a>  <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *</em>
+<a class="jxr_linenumber" name="L15" href="#L15">15</a>  <em class="jxr_comment"> * KIND, either express or implied.  See the License for the    *</em>
+<a class="jxr_linenumber" name="L16" href="#L16">16</a>  <em class="jxr_comment"> * specific language governing permissions and limitations      *</em>
+<a class="jxr_linenumber" name="L17" href="#L17">17</a>  <em class="jxr_comment"> * under the License.                                           *</em>
+<a class="jxr_linenumber" name="L18" href="#L18">18</a>  <em class="jxr_comment"> */</em> 
+<a class="jxr_linenumber" name="L19" href="#L19">19</a>  <strong class="jxr_keyword">package</strong> org.apache.rat.analysis;
+<a class="jxr_linenumber" name="L20" href="#L20">20</a>  
+<a class="jxr_linenumber" name="L21" href="#L21">21</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.api.Document;
+<a class="jxr_linenumber" name="L22" href="#L22">22</a>  
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> java.util.ArrayList;
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> java.util.List;
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../org/apache/rat/analysis/MockLicenseMatcher.html">MockLicenseMatcher</a> <strong class="jxr_keyword">implements</strong> IHeaderMatcher {
+<a class="jxr_linenumber" name="L27" href="#L27">27</a>  
+<a class="jxr_linenumber" name="L28" href="#L28">28</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">final</strong> List&lt;String&gt; lines = <strong class="jxr_keyword">new</strong> ArrayList&lt;String&gt;();
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> resets = 0;
+<a class="jxr_linenumber" name="L30" href="#L30">30</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> result = <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="L31" href="#L31">31</a>  
+<a class="jxr_linenumber" name="L32" href="#L32">32</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> match(Document subject, String line) {
+<a class="jxr_linenumber" name="L33" href="#L33">33</a>          lines.add(line);
+<a class="jxr_linenumber" name="L34" href="#L34">34</a>          <strong class="jxr_keyword">return</strong> result;
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>      }
+<a class="jxr_linenumber" name="L36" href="#L36">36</a>  
+<a class="jxr_linenumber" name="L37" href="#L37">37</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> reset() {
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>          resets++;
+<a class="jxr_linenumber" name="L39" href="#L39">39</a>      }
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>  
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>  }
+</pre>
+<hr/>
+<div id="footer">Copyright &#169; 2006&#x2013;2016 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/creadur-site/blob/88439734/apache-rat-core/xref-test/org/apache/rat/analysis/generation/GeneratedLicenseNotRequiredTest.html
----------------------------------------------------------------------
diff --git a/apache-rat-core/xref-test/org/apache/rat/analysis/generation/GeneratedLicenseNotRequiredTest.html b/apache-rat-core/xref-test/org/apache/rat/analysis/generation/GeneratedLicenseNotRequiredTest.html
new file mode 100644
index 0000000..209e275
--- /dev/null
+++ b/apache-rat-core/xref-test/org/apache/rat/analysis/generation/GeneratedLicenseNotRequiredTest.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<title>GeneratedLicenseNotRequiredTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../testapidocs/org/apache/rat/analysis/generation/GeneratedLicenseNotRequiredTest.html">View Javadoc</a></div><pre>
+<a class="jxr_linenumber" name="L1" href="#L1">1</a>   <em class="jxr_comment">/*</em>
+<a class="jxr_linenumber" name="L2" href="#L2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one   *</em>
+<a class="jxr_linenumber" name="L3" href="#L3">3</a>   <em class="jxr_comment"> * or more contributor license agreements.  See the NOTICE file *</em>
+<a class="jxr_linenumber" name="L4" href="#L4">4</a>   <em class="jxr_comment"> * distributed with this work for additional information        *</em>
+<a class="jxr_linenumber" name="L5" href="#L5">5</a>   <em class="jxr_comment"> * regarding copyright ownership.  The ASF licenses this file   *</em>
+<a class="jxr_linenumber" name="L6" href="#L6">6</a>   <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the            *</em>
+<a class="jxr_linenumber" name="L7" href="#L7">7</a>   <em class="jxr_comment"> * "License"); you may not use this file except in compliance   *</em>
+<a class="jxr_linenumber" name="L8" href="#L8">8</a>   <em class="jxr_comment"> * with the License.  You may obtain a copy of the License at   *</em>
+<a class="jxr_linenumber" name="L9" href="#L9">9</a>   <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L10" href="#L10">10</a>  <em class="jxr_comment"> *   <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a>                 *</em>
+<a class="jxr_linenumber" name="L11" href="#L11">11</a>  <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L12" href="#L12">12</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,   *</em>
+<a class="jxr_linenumber" name="L13" href="#L13">13</a>  <em class="jxr_comment"> * software distributed under the License is distributed on an  *</em>
+<a class="jxr_linenumber" name="L14" href="#L14">14</a>  <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *</em>
+<a class="jxr_linenumber" name="L15" href="#L15">15</a>  <em class="jxr_comment"> * KIND, either express or implied.  See the License for the    *</em>
+<a class="jxr_linenumber" name="L16" href="#L16">16</a>  <em class="jxr_comment"> * specific language governing permissions and limitations      *</em>
+<a class="jxr_linenumber" name="L17" href="#L17">17</a>  <em class="jxr_comment"> * under the License.                                           *</em>
+<a class="jxr_linenumber" name="L18" href="#L18">18</a>  <em class="jxr_comment"> */</em> 
+<a class="jxr_linenumber" name="L19" href="#L19">19</a>  <strong class="jxr_keyword">package</strong> org.apache.rat.analysis.generation;
+<a class="jxr_linenumber" name="L20" href="#L20">20</a>  
+<a class="jxr_linenumber" name="L21" href="#L21">21</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.api.Document;
+<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.document.MockLocation;
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.report.claim.impl.xml.MockClaimReporter;
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> org.junit.Before;
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  
+<a class="jxr_linenumber" name="L27" href="#L27">27</a>  <strong class="jxr_keyword">import</strong> java.util.regex.Pattern;
+<a class="jxr_linenumber" name="L28" href="#L28">28</a>  
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertFalse;
+<a class="jxr_linenumber" name="L30" href="#L30">30</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertTrue;
+<a class="jxr_linenumber" name="L31" href="#L31">31</a>  
+<a class="jxr_linenumber" name="L32" href="#L32">32</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/rat/analysis/generation/GeneratedLicenseNotRequiredTest.html">GeneratedLicenseNotRequiredTest</a> {
+<a class="jxr_linenumber" name="L33" href="#L33">33</a>  
+<a class="jxr_linenumber" name="L34" href="#L34">34</a>      <strong class="jxr_keyword">private</strong> GeneratedLicenseNotRequired license;
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>      <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/rat/report/claim/impl/xml/MockClaimReporter.html">MockClaimReporter</a> reporter;
+<a class="jxr_linenumber" name="L36" href="#L36">36</a>      
+<a class="jxr_linenumber" name="L37" href="#L37">37</a>      @Before
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setUp() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L39" href="#L39">39</a>          Pattern[] patterns = {Pattern.compile(<span class="jxr_string">".*Generated"</span>)};
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>          license = <strong class="jxr_keyword">new</strong> GeneratedLicenseNotRequired(patterns);
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>          reporter = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/rat/report/claim/impl/xml/MockClaimReporter.html">MockClaimReporter</a>();
+<a class="jxr_linenumber" name="L42" href="#L42">42</a>      }
+<a class="jxr_linenumber" name="L43" href="#L43">43</a>  
+<a class="jxr_linenumber" name="L44" href="#L44">44</a>      @Test
+<a class="jxr_linenumber" name="L45" href="#L45">45</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> match() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L46" href="#L46">46</a>          <strong class="jxr_keyword">final</strong> Document subject = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/rat/document/MockLocation.html">MockLocation</a>(<span class="jxr_string">"subject"</span>);
+<a class="jxr_linenumber" name="L47" href="#L47">47</a>          assertFalse(<span class="jxr_string">"Does not match regex"</span>, license.match(subject, <span class="jxr_string">"Not at all"</span>));
+<a class="jxr_linenumber" name="L48" href="#L48">48</a>          assertTrue(<span class="jxr_string">"Matches regex"</span>, license.match(subject, <span class="jxr_string">"This is Generated"</span>));
+<a class="jxr_linenumber" name="L49" href="#L49">49</a>      }
+<a class="jxr_linenumber" name="L50" href="#L50">50</a>  }
+</pre>
+<hr/>
+<div id="footer">Copyright &#169; 2006&#x2013;2016 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/creadur-site/blob/88439734/apache-rat-core/xref-test/org/apache/rat/analysis/generation/JavaDocLicenseNotRequiredTest.html
----------------------------------------------------------------------
diff --git a/apache-rat-core/xref-test/org/apache/rat/analysis/generation/JavaDocLicenseNotRequiredTest.html b/apache-rat-core/xref-test/org/apache/rat/analysis/generation/JavaDocLicenseNotRequiredTest.html
new file mode 100644
index 0000000..d55c210
--- /dev/null
+++ b/apache-rat-core/xref-test/org/apache/rat/analysis/generation/JavaDocLicenseNotRequiredTest.html
@@ -0,0 +1,95 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<title>JavaDocLicenseNotRequiredTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../testapidocs/org/apache/rat/analysis/generation/JavaDocLicenseNotRequiredTest.html">View Javadoc</a></div><pre>
+<a class="jxr_linenumber" name="L1" href="#L1">1</a>   <em class="jxr_comment">/*</em>
+<a class="jxr_linenumber" name="L2" href="#L2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one   *</em>
+<a class="jxr_linenumber" name="L3" href="#L3">3</a>   <em class="jxr_comment"> * or more contributor license agreements.  See the NOTICE file *</em>
+<a class="jxr_linenumber" name="L4" href="#L4">4</a>   <em class="jxr_comment"> * distributed with this work for additional information        *</em>
+<a class="jxr_linenumber" name="L5" href="#L5">5</a>   <em class="jxr_comment"> * regarding copyright ownership.  The ASF licenses this file   *</em>
+<a class="jxr_linenumber" name="L6" href="#L6">6</a>   <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the            *</em>
+<a class="jxr_linenumber" name="L7" href="#L7">7</a>   <em class="jxr_comment"> * "License"); you may not use this file except in compliance   *</em>
+<a class="jxr_linenumber" name="L8" href="#L8">8</a>   <em class="jxr_comment"> * with the License.  You may obtain a copy of the License at   *</em>
+<a class="jxr_linenumber" name="L9" href="#L9">9</a>   <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L10" href="#L10">10</a>  <em class="jxr_comment"> *   <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a>                 *</em>
+<a class="jxr_linenumber" name="L11" href="#L11">11</a>  <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L12" href="#L12">12</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,   *</em>
+<a class="jxr_linenumber" name="L13" href="#L13">13</a>  <em class="jxr_comment"> * software distributed under the License is distributed on an  *</em>
+<a class="jxr_linenumber" name="L14" href="#L14">14</a>  <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *</em>
+<a class="jxr_linenumber" name="L15" href="#L15">15</a>  <em class="jxr_comment"> * KIND, either express or implied.  See the License for the    *</em>
+<a class="jxr_linenumber" name="L16" href="#L16">16</a>  <em class="jxr_comment"> * specific language governing permissions and limitations      *</em>
+<a class="jxr_linenumber" name="L17" href="#L17">17</a>  <em class="jxr_comment"> * under the License.                                           *</em>
+<a class="jxr_linenumber" name="L18" href="#L18">18</a>  <em class="jxr_comment"> */</em>
+<a class="jxr_linenumber" name="L19" href="#L19">19</a>  <strong class="jxr_keyword">package</strong> org.apache.rat.analysis.generation;
+<a class="jxr_linenumber" name="L20" href="#L20">20</a>  
+<a class="jxr_linenumber" name="L21" href="#L21">21</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.io.IOUtils;
+<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.api.Document;
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.document.MockLocation;
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.report.claim.impl.xml.MockClaimReporter;
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.test.utils.Resources;
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">import</strong> org.junit.Before;
+<a class="jxr_linenumber" name="L27" href="#L27">27</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
+<a class="jxr_linenumber" name="L28" href="#L28">28</a>  
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <strong class="jxr_keyword">import</strong> java.io.BufferedReader;
+<a class="jxr_linenumber" name="L30" href="#L30">30</a>  <strong class="jxr_keyword">import</strong> java.io.File;
+<a class="jxr_linenumber" name="L31" href="#L31">31</a>  <strong class="jxr_keyword">import</strong> java.io.FileReader;
+<a class="jxr_linenumber" name="L32" href="#L32">32</a>  
+<a class="jxr_linenumber" name="L33" href="#L33">33</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertFalse;
+<a class="jxr_linenumber" name="L34" href="#L34">34</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertTrue;
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>  
+<a class="jxr_linenumber" name="L36" href="#L36">36</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/rat/analysis/generation/JavaDocLicenseNotRequiredTest.html">JavaDocLicenseNotRequiredTest</a> {
+<a class="jxr_linenumber" name="L37" href="#L37">37</a>  
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>      <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/rat/report/claim/impl/xml/MockClaimReporter.html">MockClaimReporter</a> reporter;
+<a class="jxr_linenumber" name="L39" href="#L39">39</a>      <strong class="jxr_keyword">private</strong> JavaDocLicenseNotRequired license;
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>  
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>      @Before
+<a class="jxr_linenumber" name="L42" href="#L42">42</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setUp() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L43" href="#L43">43</a>          license = <strong class="jxr_keyword">new</strong> JavaDocLicenseNotRequired();
+<a class="jxr_linenumber" name="L44" href="#L44">44</a>          reporter = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/rat/report/claim/impl/xml/MockClaimReporter.html">MockClaimReporter</a>();
+<a class="jxr_linenumber" name="L45" href="#L45">45</a>      }
+<a class="jxr_linenumber" name="L46" href="#L46">46</a>  
+<a class="jxr_linenumber" name="L47" href="#L47">47</a>      @Test
+<a class="jxr_linenumber" name="L48" href="#L48">48</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> matchIndexDoc() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L49" href="#L49">49</a>          <strong class="jxr_keyword">boolean</strong> result = readAndMatch(<span class="jxr_string">"index.html"</span>);
+<a class="jxr_linenumber" name="L50" href="#L50">50</a>          assertTrue(<span class="jxr_string">"Is a javadoc"</span>, result);
+<a class="jxr_linenumber" name="L51" href="#L51">51</a>      }
+<a class="jxr_linenumber" name="L52" href="#L52">52</a>  
+<a class="jxr_linenumber" name="L53" href="#L53">53</a>      @Test
+<a class="jxr_linenumber" name="L54" href="#L54">54</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> matchClassDoc() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L55" href="#L55">55</a>          <strong class="jxr_keyword">boolean</strong> result = readAndMatch(<span class="jxr_string">"ArchiveElement.html"</span>);
+<a class="jxr_linenumber" name="L56" href="#L56">56</a>          assertTrue(<span class="jxr_string">"Is a javadoc"</span>, result);
+<a class="jxr_linenumber" name="L57" href="#L57">57</a>      }
+<a class="jxr_linenumber" name="L58" href="#L58">58</a>  
+<a class="jxr_linenumber" name="L59" href="#L59">59</a>      @Test
+<a class="jxr_linenumber" name="L60" href="#L60">60</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> matchNonJavaDoc() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L61" href="#L61">61</a>          <strong class="jxr_keyword">boolean</strong> result = readAndMatch(<span class="jxr_string">"notjavadoc.html"</span>);
+<a class="jxr_linenumber" name="L62" href="#L62">62</a>          assertFalse(<span class="jxr_string">"Not javadocs and so should return null"</span>, result);
+<a class="jxr_linenumber" name="L63" href="#L63">63</a>      }
+<a class="jxr_linenumber" name="L64" href="#L64">64</a>  
+<a class="jxr_linenumber" name="L65" href="#L65">65</a>      <strong class="jxr_keyword">boolean</strong> readAndMatch(String name) <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L66" href="#L66">66</a>          File file = Resources.getResourceFile(<span class="jxr_string">"javadocs/"</span> + name);
+<a class="jxr_linenumber" name="L67" href="#L67">67</a>          <strong class="jxr_keyword">boolean</strong> result = false;
+<a class="jxr_linenumber" name="L68" href="#L68">68</a>          BufferedReader in = <strong class="jxr_keyword">null</strong>;
+<a class="jxr_linenumber" name="L69" href="#L69">69</a>          <strong class="jxr_keyword">try</strong> {
+<a class="jxr_linenumber" name="L70" href="#L70">70</a>              in = <strong class="jxr_keyword">new</strong> BufferedReader(<strong class="jxr_keyword">new</strong> FileReader(file));
+<a class="jxr_linenumber" name="L71" href="#L71">71</a>              String line = in.readLine();
+<a class="jxr_linenumber" name="L72" href="#L72">72</a>              <strong class="jxr_keyword">final</strong> Document subject = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/rat/document/MockLocation.html">MockLocation</a>(<span class="jxr_string">"subject"</span>);
+<a class="jxr_linenumber" name="L73" href="#L73">73</a>              <strong class="jxr_keyword">while</strong> (line != <strong class="jxr_keyword">null</strong> &amp;&amp; !result) {
+<a class="jxr_linenumber" name="L74" href="#L74">74</a>                  result = license.match(subject, line);
+<a class="jxr_linenumber" name="L75" href="#L75">75</a>                  line = in.readLine();
+<a class="jxr_linenumber" name="L76" href="#L76">76</a>              }
+<a class="jxr_linenumber" name="L77" href="#L77">77</a>          } <strong class="jxr_keyword">finally</strong> {
+<a class="jxr_linenumber" name="L78" href="#L78">78</a>                  IOUtils.closeQuietly(in);
+<a class="jxr_linenumber" name="L79" href="#L79">79</a>          }
+<a class="jxr_linenumber" name="L80" href="#L80">80</a>              <strong class="jxr_keyword">return</strong> result;
+<a class="jxr_linenumber" name="L81" href="#L81">81</a>          }
+<a class="jxr_linenumber" name="L82" href="#L82">82</a>      }
+</pre>
+<hr/>
+<div id="footer">Copyright &#169; 2006&#x2013;2016 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/creadur-site/blob/88439734/apache-rat-core/xref-test/org/apache/rat/analysis/generation/package-frame.html
----------------------------------------------------------------------
diff --git a/apache-rat-core/xref-test/org/apache/rat/analysis/generation/package-frame.html b/apache-rat-core/xref-test/org/apache/rat/analysis/generation/package-frame.html
new file mode 100644
index 0000000..c7f0b58
--- /dev/null
+++ b/apache-rat-core/xref-test/org/apache/rat/analysis/generation/package-frame.html
@@ -0,0 +1,27 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+		<title>Apache Creadur Rat::Core 0.13-SNAPSHOT Reference Package org.apache.rat.analysis.generation</title>
+		<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />
+	</head>
+	<body>
+
+		<h3>
+        	<a href="package-summary.html" target="classFrame">org.apache.rat.analysis.generation</a>
+      	</h3>
+
+      	<h3>Classes</h3>
+
+      	<ul>
+      		          	<li>
+            	<a href="GeneratedLicenseNotRequiredTest.html" target="classFrame">GeneratedLicenseNotRequiredTest</a>
+          	</li>
+          	          	<li>
+            	<a href="JavaDocLicenseNotRequiredTest.html" target="classFrame">JavaDocLicenseNotRequiredTest</a>
+          	</li>
+          	      	</ul>
+
+	</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/creadur-site/blob/88439734/apache-rat-core/xref-test/org/apache/rat/analysis/generation/package-summary.html
----------------------------------------------------------------------
diff --git a/apache-rat-core/xref-test/org/apache/rat/analysis/generation/package-summary.html b/apache-rat-core/xref-test/org/apache/rat/analysis/generation/package-summary.html
new file mode 100644
index 0000000..4a5c3fd
--- /dev/null
+++ b/apache-rat-core/xref-test/org/apache/rat/analysis/generation/package-summary.html
@@ -0,0 +1,74 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+		<title>Apache Creadur Rat::Core 0.13-SNAPSHOT Reference Package org.apache.rat.analysis.generation</title>
+		<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />
+	</head>
+	<body>
+		      	<div class="overview">
+        	<ul>
+          		<li>
+            		<a href="../../../../../overview-summary.html">Overview</a>
+          		</li>
+          		<li class="selected">Package</li>
+        	</ul>
+      	</div>
+      	<div class="framenoframe">
+        	<ul>
+          		<li>
+            		<a href="../../../../../index.html" target="_top">FRAMES</a>
+          		</li>
+          		<li>
+            		<a href="package-summary.html" target="_top">NO FRAMES</a>
+          		</li>
+        	</ul>
+      	</div>
+		
+		      	<h2>Package org.apache.rat.analysis.generation</h2>
+
+		<table class="summary">
+        	<thead>
+          		<tr>
+            		<th>Class Summary</th>
+          		</tr>
+        	</thead>
+        	<tbody>
+        		            	<tr>
+              		<td>
+                		<a href="GeneratedLicenseNotRequiredTest.html" target="classFrame">GeneratedLicenseNotRequiredTest</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="JavaDocLicenseNotRequiredTest.html" target="classFrame">JavaDocLicenseNotRequiredTest</a>
+              		</td>
+            	</tr>
+				        	</tbody>
+      	</table>
+		
+		      	<div class="overview">
+        	<ul>
+          		<li>
+            		<a href="../../../../../overview-summary.html">Overview</a>
+          		</li>
+          		<li class="selected">Package</li>
+        	</ul>
+      	</div>
+      	<div class="framenoframe">
+        	<ul>
+          		<li>
+            		<a href="../../../../../index.html" target="_top">FRAMES</a>
+          		</li>
+          		<li>
+            		<a href="package-summary.html" target="_top">NO FRAMES</a>
+          		</li>
+        	</ul>
+      	</div>
+				<hr />
+		<div id="footer">
+			Copyright &#169; 2006&#x2013;2016 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.
+		</div>
+	</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/creadur-site/blob/88439734/apache-rat-core/xref-test/org/apache/rat/analysis/license/ApacheSoftwareLicense20Test.html
----------------------------------------------------------------------
diff --git a/apache-rat-core/xref-test/org/apache/rat/analysis/license/ApacheSoftwareLicense20Test.html b/apache-rat-core/xref-test/org/apache/rat/analysis/license/ApacheSoftwareLicense20Test.html
new file mode 100644
index 0000000..880c7f1
--- /dev/null
+++ b/apache-rat-core/xref-test/org/apache/rat/analysis/license/ApacheSoftwareLicense20Test.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<title>ApacheSoftwareLicense20Test xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../testapidocs/org/apache/rat/analysis/license/ApacheSoftwareLicense20Test.html">View Javadoc</a></div><pre>
+<a class="jxr_linenumber" name="L1" href="#L1">1</a>   <em class="jxr_comment">/*</em>
+<a class="jxr_linenumber" name="L2" href="#L2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one   *</em>
+<a class="jxr_linenumber" name="L3" href="#L3">3</a>   <em class="jxr_comment"> * or more contributor license agreements.  See the NOTICE file *</em>
+<a class="jxr_linenumber" name="L4" href="#L4">4</a>   <em class="jxr_comment"> * distributed with this work for additional information        *</em>
+<a class="jxr_linenumber" name="L5" href="#L5">5</a>   <em class="jxr_comment"> * regarding copyright ownership.  The ASF licenses this file   *</em>
+<a class="jxr_linenumber" name="L6" href="#L6">6</a>   <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the            *</em>
+<a class="jxr_linenumber" name="L7" href="#L7">7</a>   <em class="jxr_comment"> * "License"); you may not use this file except in compliance   *</em>
+<a class="jxr_linenumber" name="L8" href="#L8">8</a>   <em class="jxr_comment"> * with the License.  You may obtain a copy of the License at   *</em>
+<a class="jxr_linenumber" name="L9" href="#L9">9</a>   <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L10" href="#L10">10</a>  <em class="jxr_comment"> *   <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a>                 *</em>
+<a class="jxr_linenumber" name="L11" href="#L11">11</a>  <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L12" href="#L12">12</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,   *</em>
+<a class="jxr_linenumber" name="L13" href="#L13">13</a>  <em class="jxr_comment"> * software distributed under the License is distributed on an  *</em>
+<a class="jxr_linenumber" name="L14" href="#L14">14</a>  <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *</em>
+<a class="jxr_linenumber" name="L15" href="#L15">15</a>  <em class="jxr_comment"> * KIND, either express or implied.  See the License for the    *</em>
+<a class="jxr_linenumber" name="L16" href="#L16">16</a>  <em class="jxr_comment"> * specific language governing permissions and limitations      *</em>
+<a class="jxr_linenumber" name="L17" href="#L17">17</a>  <em class="jxr_comment"> * under the License.                                           *</em>
+<a class="jxr_linenumber" name="L18" href="#L18">18</a>  <em class="jxr_comment"> */</em> 
+<a class="jxr_linenumber" name="L19" href="#L19">19</a>  <strong class="jxr_keyword">package</strong> org.apache.rat.analysis.license;
+<a class="jxr_linenumber" name="L20" href="#L20">20</a>  
+<a class="jxr_linenumber" name="L21" href="#L21">21</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.api.Document;
+<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.document.MockLocation;
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.report.claim.impl.xml.MockClaimReporter;
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> org.junit.Before;
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  
+<a class="jxr_linenumber" name="L27" href="#L27">27</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertFalse;
+<a class="jxr_linenumber" name="L28" href="#L28">28</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertTrue;
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>  
+<a class="jxr_linenumber" name="L30" href="#L30">30</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/rat/analysis/license/ApacheSoftwareLicense20Test.html">ApacheSoftwareLicense20Test</a> {
+<a class="jxr_linenumber" name="L31" href="#L31">31</a>  
+<a class="jxr_linenumber" name="L32" href="#L32">32</a>      <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/rat/report/claim/impl/xml/MockClaimReporter.html">MockClaimReporter</a> reporter;
+<a class="jxr_linenumber" name="L33" href="#L33">33</a>  
+<a class="jxr_linenumber" name="L34" href="#L34">34</a>      @Before
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setUp() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L36" href="#L36">36</a>          reporter = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/rat/report/claim/impl/xml/MockClaimReporter.html">MockClaimReporter</a>();
+<a class="jxr_linenumber" name="L37" href="#L37">37</a>      }
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>  
+<a class="jxr_linenumber" name="L39" href="#L39">39</a>      @Test
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> matches() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>          ApacheSoftwareLicense20 worker = <strong class="jxr_keyword">new</strong> ApacheSoftwareLicense20();
+<a class="jxr_linenumber" name="L42" href="#L42">42</a>          assertTrue(worker.matches(ApacheSoftwareLicense20.FIRST_LICENSE_LINE));
+<a class="jxr_linenumber" name="L43" href="#L43">43</a>          assertTrue(worker.matches(<span class="jxr_string">"    Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L44" href="#L44">44</a>          assertTrue(worker.matches(<span class="jxr_string">"Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L45" href="#L45">45</a>          assertTrue(worker.matches(<span class="jxr_string">" * Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L46" href="#L46">46</a>          assertTrue(worker.matches(<span class="jxr_string">" // Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L47" href="#L47">47</a>          assertTrue(worker.matches(<span class="jxr_string">" /* Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L48" href="#L48">48</a>          assertTrue(worker.matches(<span class="jxr_string">"    Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L49" href="#L49">49</a>          assertTrue(worker.matches(<span class="jxr_string">" ## Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L50" href="#L50">50</a>          assertTrue(worker.matches(<span class="jxr_string">" ## Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;) ##);"</span>));
+<a class="jxr_linenumber" name="L51" href="#L51">51</a>          assertFalse(worker.matches(<span class="jxr_string">"'Behold, Telemachus! (nor fear the sight,)"</span>));
+<a class="jxr_linenumber" name="L52" href="#L52">52</a>      }
+<a class="jxr_linenumber" name="L53" href="#L53">53</a>  
+<a class="jxr_linenumber" name="L54" href="#L54">54</a>      @Test
+<a class="jxr_linenumber" name="L55" href="#L55">55</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> match() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L56" href="#L56">56</a>          ApacheSoftwareLicense20 worker = <strong class="jxr_keyword">new</strong> ApacheSoftwareLicense20();
+<a class="jxr_linenumber" name="L57" href="#L57">57</a>          <strong class="jxr_keyword">final</strong> Document subject = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/rat/document/MockLocation.html">MockLocation</a>(<span class="jxr_string">"subject"</span>);
+<a class="jxr_linenumber" name="L58" href="#L58">58</a>          assertTrue(worker.match(subject, ApacheSoftwareLicense20.FIRST_LICENSE_LINE));
+<a class="jxr_linenumber" name="L59" href="#L59">59</a>          assertTrue(worker.match(subject, <span class="jxr_string">"    Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L60" href="#L60">60</a>          assertTrue(worker.match(subject, <span class="jxr_string">"Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L61" href="#L61">61</a>          assertTrue(worker.match(subject, <span class="jxr_string">" * Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L62" href="#L62">62</a>          assertTrue(worker.match(subject, <span class="jxr_string">" // Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L63" href="#L63">63</a>          assertTrue(worker.match(subject, <span class="jxr_string">" /* Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L64" href="#L64">64</a>          assertTrue(worker.match(subject, <span class="jxr_string">"    Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L65" href="#L65">65</a>          assertTrue(worker.match(subject, <span class="jxr_string">" ## Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);"</span>));
+<a class="jxr_linenumber" name="L66" href="#L66">66</a>          assertTrue(worker.match(subject, <span class="jxr_string">" ## Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;) ##);"</span>));
+<a class="jxr_linenumber" name="L67" href="#L67">67</a>          assertFalse(worker.match(subject, <span class="jxr_string">"'Behold, Telemachus! (nor fear the sight,)"</span>));
+<a class="jxr_linenumber" name="L68" href="#L68">68</a>      }
+<a class="jxr_linenumber" name="L69" href="#L69">69</a>  
+<a class="jxr_linenumber" name="L70" href="#L70">70</a>  }
+</pre>
+<hr/>
+<div id="footer">Copyright &#169; 2006&#x2013;2016 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/creadur-site/blob/88439734/apache-rat-core/xref-test/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.html
----------------------------------------------------------------------
diff --git a/apache-rat-core/xref-test/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.html b/apache-rat-core/xref-test/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.html
new file mode 100644
index 0000000..a977918
--- /dev/null
+++ b/apache-rat-core/xref-test/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.html
@@ -0,0 +1,122 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<title>AppliedApacheSoftwareLicense20Test xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../testapidocs/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.html">View Javadoc</a></div><pre>
+<a class="jxr_linenumber" name="L1" href="#L1">1</a>   <em class="jxr_comment">/*</em>
+<a class="jxr_linenumber" name="L2" href="#L2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one   *</em>
+<a class="jxr_linenumber" name="L3" href="#L3">3</a>   <em class="jxr_comment"> * or more contributor license agreements.  See the NOTICE file *</em>
+<a class="jxr_linenumber" name="L4" href="#L4">4</a>   <em class="jxr_comment"> * distributed with this work for additional information        *</em>
+<a class="jxr_linenumber" name="L5" href="#L5">5</a>   <em class="jxr_comment"> * regarding copyright ownership.  The ASF licenses this file   *</em>
+<a class="jxr_linenumber" name="L6" href="#L6">6</a>   <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the            *</em>
+<a class="jxr_linenumber" name="L7" href="#L7">7</a>   <em class="jxr_comment"> * "License"); you may not use this file except in compliance   *</em>
+<a class="jxr_linenumber" name="L8" href="#L8">8</a>   <em class="jxr_comment"> * with the License.  You may obtain a copy of the License at   *</em>
+<a class="jxr_linenumber" name="L9" href="#L9">9</a>   <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L10" href="#L10">10</a>  <em class="jxr_comment"> *   <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a>                 *</em>
+<a class="jxr_linenumber" name="L11" href="#L11">11</a>  <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L12" href="#L12">12</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,   *</em>
+<a class="jxr_linenumber" name="L13" href="#L13">13</a>  <em class="jxr_comment"> * software distributed under the License is distributed on an  *</em>
+<a class="jxr_linenumber" name="L14" href="#L14">14</a>  <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *</em>
+<a class="jxr_linenumber" name="L15" href="#L15">15</a>  <em class="jxr_comment"> * KIND, either express or implied.  See the License for the    *</em>
+<a class="jxr_linenumber" name="L16" href="#L16">16</a>  <em class="jxr_comment"> * specific language governing permissions and limitations      *</em>
+<a class="jxr_linenumber" name="L17" href="#L17">17</a>  <em class="jxr_comment"> * under the License.                                           *</em>
+<a class="jxr_linenumber" name="L18" href="#L18">18</a>  <em class="jxr_comment"> */</em>
+<a class="jxr_linenumber" name="L19" href="#L19">19</a>  <strong class="jxr_keyword">package</strong> org.apache.rat.analysis.license;
+<a class="jxr_linenumber" name="L20" href="#L20">20</a>  
+<a class="jxr_linenumber" name="L21" href="#L21">21</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.io.IOUtils;
+<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.api.Document;
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.document.MockLocation;
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.report.claim.impl.xml.MockClaimReporter;
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.test.utils.Resources;
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">import</strong> org.junit.Before;
+<a class="jxr_linenumber" name="L27" href="#L27">27</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
+<a class="jxr_linenumber" name="L28" href="#L28">28</a>  
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <strong class="jxr_keyword">import</strong> java.io.BufferedReader;
+<a class="jxr_linenumber" name="L30" href="#L30">30</a>  <strong class="jxr_keyword">import</strong> java.io.StringReader;
+<a class="jxr_linenumber" name="L31" href="#L31">31</a>  
+<a class="jxr_linenumber" name="L32" href="#L32">32</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertFalse;
+<a class="jxr_linenumber" name="L33" href="#L33">33</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertTrue;
+<a class="jxr_linenumber" name="L34" href="#L34">34</a>  
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.html">AppliedApacheSoftwareLicense20Test</a> {
+<a class="jxr_linenumber" name="L36" href="#L36">36</a>  
+<a class="jxr_linenumber" name="L37" href="#L37">37</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String HEADER
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>              = <span class="jxr_string">"/*\n"</span>
+<a class="jxr_linenumber" name="L39" href="#L39">39</a>              + <span class="jxr_string">" *  Copyright 2012-2013 FooBar.\n"</span>
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>              + <span class="jxr_string">" *\n"</span>
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>              + <span class="jxr_string">" *  Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;);\n"</span>
+<a class="jxr_linenumber" name="L42" href="#L42">42</a>              + <span class="jxr_string">" *  you may not use this file except in compliance with the License.\n"</span>
+<a class="jxr_linenumber" name="L43" href="#L43">43</a>              + <span class="jxr_string">" *\n"</span>
+<a class="jxr_linenumber" name="L44" href="#L44">44</a>              + <span class="jxr_string">" *  You may obtain a copy of the License at\n"</span>
+<a class="jxr_linenumber" name="L45" href="#L45">45</a>              + <span class="jxr_string">" *       http://www.apache.org/licenses/LICENSE-2.0\n"</span>
+<a class="jxr_linenumber" name="L46" href="#L46">46</a>              + <span class="jxr_string">" *\n"</span>
+<a class="jxr_linenumber" name="L47" href="#L47">47</a>              + <span class="jxr_string">" *  Unless required by applicable law or agreed to in writing, software\n"</span>
+<a class="jxr_linenumber" name="L48" href="#L48">48</a>              + <span class="jxr_string">" *  distributed under the License is distributed on an \&quot;AS IS\&quot; BASIS,\n"</span>
+<a class="jxr_linenumber" name="L49" href="#L49">49</a>              + <span class="jxr_string">" *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"</span>
+<a class="jxr_linenumber" name="L50" href="#L50">50</a>              + <span class="jxr_string">" *  See the License for the specific language governing permissions and\n"</span>
+<a class="jxr_linenumber" name="L51" href="#L51">51</a>              + <span class="jxr_string">" *  limitations under the License.\n"</span>
+<a class="jxr_linenumber" name="L52" href="#L52">52</a>              + <span class="jxr_string">" */\n"</span>;
+<a class="jxr_linenumber" name="L53" href="#L53">53</a>  
+<a class="jxr_linenumber" name="L54" href="#L54">54</a>      <strong class="jxr_keyword">private</strong> AppliedApacheSoftwareLicense20 license;
+<a class="jxr_linenumber" name="L55" href="#L55">55</a>  
+<a class="jxr_linenumber" name="L56" href="#L56">56</a>      <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/rat/report/claim/impl/xml/MockClaimReporter.html">MockClaimReporter</a> reporter;
+<a class="jxr_linenumber" name="L57" href="#L57">57</a>  
+<a class="jxr_linenumber" name="L58" href="#L58">58</a>      @Before
+<a class="jxr_linenumber" name="L59" href="#L59">59</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setUp() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L60" href="#L60">60</a>          license = <strong class="jxr_keyword">new</strong> AppliedApacheSoftwareLicense20(<span class="jxr_string">"FooBar"</span>);
+<a class="jxr_linenumber" name="L61" href="#L61">61</a>          reporter = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/rat/report/claim/impl/xml/MockClaimReporter.html">MockClaimReporter</a>();
+<a class="jxr_linenumber" name="L62" href="#L62">62</a>      }
+<a class="jxr_linenumber" name="L63" href="#L63">63</a>  
+<a class="jxr_linenumber" name="L64" href="#L64">64</a>      @Test
+<a class="jxr_linenumber" name="L65" href="#L65">65</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> match() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L66" href="#L66">66</a>          BufferedReader in = <strong class="jxr_keyword">new</strong> BufferedReader(<strong class="jxr_keyword">new</strong> StringReader(HEADER));
+<a class="jxr_linenumber" name="L67" href="#L67">67</a>          String line = in.readLine();
+<a class="jxr_linenumber" name="L68" href="#L68">68</a>          <strong class="jxr_keyword">boolean</strong> result = false;
+<a class="jxr_linenumber" name="L69" href="#L69">69</a>          <strong class="jxr_keyword">final</strong> Document subject = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/rat/document/MockLocation.html">MockLocation</a>(<span class="jxr_string">"subject"</span>);
+<a class="jxr_linenumber" name="L70" href="#L70">70</a>          <strong class="jxr_keyword">while</strong> (line != <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="L71" href="#L71">71</a>              result = license.match(subject, line);
+<a class="jxr_linenumber" name="L72" href="#L72">72</a>              line = in.readLine();
+<a class="jxr_linenumber" name="L73" href="#L73">73</a>          }
+<a class="jxr_linenumber" name="L74" href="#L74">74</a>          assertTrue(<span class="jxr_string">"Applied AL2.0 license should be matched"</span>, result);
+<a class="jxr_linenumber" name="L75" href="#L75">75</a>          license.reset();
+<a class="jxr_linenumber" name="L76" href="#L76">76</a>          result = license.match(subject, <span class="jxr_string">"New line"</span>);
+<a class="jxr_linenumber" name="L77" href="#L77">77</a>          assertFalse(<span class="jxr_string">"After reset, content should build up again"</span>, result);
+<a class="jxr_linenumber" name="L78" href="#L78">78</a>      }
+<a class="jxr_linenumber" name="L79" href="#L79">79</a>  
+<a class="jxr_linenumber" name="L80" href="#L80">80</a>      @Test
+<a class="jxr_linenumber" name="L81" href="#L81">81</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> noMatch() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L82" href="#L82">82</a>          BufferedReader in = <strong class="jxr_keyword">null</strong>;
+<a class="jxr_linenumber" name="L83" href="#L83">83</a>          <strong class="jxr_keyword">try</strong> {
+<a class="jxr_linenumber" name="L84" href="#L84">84</a>              in = Resources.getBufferedResourceReader(<span class="jxr_string">"elements/Source.java"</span>);
+<a class="jxr_linenumber" name="L85" href="#L85">85</a>              String line = in.readLine();
+<a class="jxr_linenumber" name="L86" href="#L86">86</a>              <strong class="jxr_keyword">boolean</strong> result = false;
+<a class="jxr_linenumber" name="L87" href="#L87">87</a>              <strong class="jxr_keyword">final</strong> Document subject = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/rat/document/MockLocation.html">MockLocation</a>(<span class="jxr_string">"subject"</span>);
+<a class="jxr_linenumber" name="L88" href="#L88">88</a>              <strong class="jxr_keyword">while</strong> (line != <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="L89" href="#L89">89</a>                  result = license.match(subject, line);
+<a class="jxr_linenumber" name="L90" href="#L90">90</a>                  line = in.readLine();
+<a class="jxr_linenumber" name="L91" href="#L91">91</a>              }
+<a class="jxr_linenumber" name="L92" href="#L92">92</a>              assertFalse(<span class="jxr_string">"Applied AL2.0 license should not be matched"</span>, result);
+<a class="jxr_linenumber" name="L93" href="#L93">93</a>              license.reset();
+<a class="jxr_linenumber" name="L94" href="#L94">94</a>          } <strong class="jxr_keyword">finally</strong> {
+<a class="jxr_linenumber" name="L95" href="#L95">95</a>              IOUtils.closeQuietly(in);
+<a class="jxr_linenumber" name="L96" href="#L96">96</a>          }
+<a class="jxr_linenumber" name="L97" href="#L97">97</a>      }
+<a class="jxr_linenumber" name="L98" href="#L98">98</a>  
+<a class="jxr_linenumber" name="L99" href="#L99">99</a>      @Test(timeout = 2000) <em class="jxr_comment">// may need to be adjusted if many more files are added</em>
+<a class="jxr_linenumber" name="L100" href="#L100">100</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> goodFiles() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L101" href="#L101">101</a>         DirectoryScanner.testFilesInDir(<span class="jxr_string">"appliedAL20/good"</span>, license, <strong class="jxr_keyword">true</strong>);
+<a class="jxr_linenumber" name="L102" href="#L102">102</a>     }
+<a class="jxr_linenumber" name="L103" href="#L103">103</a> 
+<a class="jxr_linenumber" name="L104" href="#L104">104</a>     @Test(timeout = 2000) <em class="jxr_comment">// may need to be adjusted if many more files are added</em>
+<a class="jxr_linenumber" name="L105" href="#L105">105</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> baddFiles() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L106" href="#L106">106</a>         DirectoryScanner.testFilesInDir(<span class="jxr_string">"appliedAL20/bad"</span>, license, false);
+<a class="jxr_linenumber" name="L107" href="#L107">107</a>     }
+<a class="jxr_linenumber" name="L108" href="#L108">108</a> 
+<a class="jxr_linenumber" name="L109" href="#L109">109</a> }
+</pre>
+<hr/>
+<div id="footer">Copyright &#169; 2006&#x2013;2016 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/creadur-site/blob/88439734/apache-rat-core/xref-test/org/apache/rat/analysis/license/CDDL1LicenseTest.html
----------------------------------------------------------------------
diff --git a/apache-rat-core/xref-test/org/apache/rat/analysis/license/CDDL1LicenseTest.html b/apache-rat-core/xref-test/org/apache/rat/analysis/license/CDDL1LicenseTest.html
new file mode 100644
index 0000000..1d73212
--- /dev/null
+++ b/apache-rat-core/xref-test/org/apache/rat/analysis/license/CDDL1LicenseTest.html
@@ -0,0 +1,101 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<title>CDDL1LicenseTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../testapidocs/org/apache/rat/analysis/license/CDDL1LicenseTest.html">View Javadoc</a></div><pre>
+<a class="jxr_linenumber" name="L1" href="#L1">1</a>   <em class="jxr_comment">/*</em>
+<a class="jxr_linenumber" name="L2" href="#L2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one   *</em>
+<a class="jxr_linenumber" name="L3" href="#L3">3</a>   <em class="jxr_comment"> * or more contributor license agreements.  See the NOTICE file *</em>
+<a class="jxr_linenumber" name="L4" href="#L4">4</a>   <em class="jxr_comment"> * distributed with this work for additional information        *</em>
+<a class="jxr_linenumber" name="L5" href="#L5">5</a>   <em class="jxr_comment"> * regarding copyright ownership.  The ASF licenses this file   *</em>
+<a class="jxr_linenumber" name="L6" href="#L6">6</a>   <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the            *</em>
+<a class="jxr_linenumber" name="L7" href="#L7">7</a>   <em class="jxr_comment"> * "License"); you may not use this file except in compliance   *</em>
+<a class="jxr_linenumber" name="L8" href="#L8">8</a>   <em class="jxr_comment"> * with the License.  You may obtain a copy of the License at   *</em>
+<a class="jxr_linenumber" name="L9" href="#L9">9</a>   <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L10" href="#L10">10</a>  <em class="jxr_comment"> *   <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a>                 *</em>
+<a class="jxr_linenumber" name="L11" href="#L11">11</a>  <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L12" href="#L12">12</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,   *</em>
+<a class="jxr_linenumber" name="L13" href="#L13">13</a>  <em class="jxr_comment"> * software distributed under the License is distributed on an  *</em>
+<a class="jxr_linenumber" name="L14" href="#L14">14</a>  <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *</em>
+<a class="jxr_linenumber" name="L15" href="#L15">15</a>  <em class="jxr_comment"> * KIND, either express or implied.  See the License for the    *</em>
+<a class="jxr_linenumber" name="L16" href="#L16">16</a>  <em class="jxr_comment"> * specific language governing permissions and limitations      *</em>
+<a class="jxr_linenumber" name="L17" href="#L17">17</a>  <em class="jxr_comment"> * under the License.                                           *</em>
+<a class="jxr_linenumber" name="L18" href="#L18">18</a>  <em class="jxr_comment"> */</em>
+<a class="jxr_linenumber" name="L19" href="#L19">19</a>  <strong class="jxr_keyword">package</strong> org.apache.rat.analysis.license;
+<a class="jxr_linenumber" name="L20" href="#L20">20</a>  
+<a class="jxr_linenumber" name="L21" href="#L21">21</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.analysis.IHeaderMatcher;
+<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.api.Document;
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.document.MockLocation;
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> org.junit.Before;
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <strong class="jxr_keyword">import</strong> org.junit.BeforeClass;
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
+<a class="jxr_linenumber" name="L27" href="#L27">27</a>  
+<a class="jxr_linenumber" name="L28" href="#L28">28</a>  <strong class="jxr_keyword">import</strong> java.util.HashMap;
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <strong class="jxr_keyword">import</strong> java.util.Map;
+<a class="jxr_linenumber" name="L30" href="#L30">30</a>  
+<a class="jxr_linenumber" name="L31" href="#L31">31</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertEquals;
+<a class="jxr_linenumber" name="L32" href="#L32">32</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertFalse;
+<a class="jxr_linenumber" name="L33" href="#L33">33</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertTrue;
+<a class="jxr_linenumber" name="L34" href="#L34">34</a>  
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/rat/analysis/license/CDDL1LicenseTest.html">CDDL1LicenseTest</a> {
+<a class="jxr_linenumber" name="L36" href="#L36">36</a>  
+<a class="jxr_linenumber" name="L37" href="#L37">37</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String LICENSE_LINE =
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>              <span class="jxr_string">" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n\n"</span>
+<a class="jxr_linenumber" name="L39" href="#L39">39</a>                      + <span class="jxr_string">"Copyright 2011-2013 Tirasa. All rights reserved.\n\n"</span>
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>                      + <span class="jxr_string">"The contents of this file are subject to the terms of the Common Development\n"</span>
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>                      + <span class="jxr_string">"and Distribution License(\&quot;CDDL\&quot;) (the \&quot;License\&quot;). You may not use this file\n"</span>
+<a class="jxr_linenumber" name="L42" href="#L42">42</a>                      + <span class="jxr_string">"except in compliance with the License.\n\n"</span>
+<a class="jxr_linenumber" name="L43" href="#L43">43</a>                      + <span class="jxr_string">"You can obtain a copy of the License at https://oss.oracle.com/licenses/CDDL\n"</span>
+<a class="jxr_linenumber" name="L44" href="#L44">44</a>                      + <span class="jxr_string">"See the License for the specific language governing permissions and limitations\n"</span>
+<a class="jxr_linenumber" name="L45" href="#L45">45</a>                      + <span class="jxr_string">"under the License."</span>;
+<a class="jxr_linenumber" name="L46" href="#L46">46</a>  
+<a class="jxr_linenumber" name="L47" href="#L47">47</a>      <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L48" href="#L48">48</a>  <em class="jxr_javadoccomment">     * To ease testing provide a map with a given license version and the string to test for.</em>
+<a class="jxr_linenumber" name="L49" href="#L49">49</a>  <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L50" href="#L50">50</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> Map&lt;IHeaderMatcher, String&gt; licenseStringMap;
+<a class="jxr_linenumber" name="L51" href="#L51">51</a>  
+<a class="jxr_linenumber" name="L52" href="#L52">52</a>      <strong class="jxr_keyword">private</strong> Document subject;
+<a class="jxr_linenumber" name="L53" href="#L53">53</a>  
+<a class="jxr_linenumber" name="L54" href="#L54">54</a>      @BeforeClass
+<a class="jxr_linenumber" name="L55" href="#L55">55</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong> initLicensesUnderTest() {
+<a class="jxr_linenumber" name="L56" href="#L56">56</a>          licenseStringMap = <strong class="jxr_keyword">new</strong> HashMap&lt;IHeaderMatcher, String&gt;();
+<a class="jxr_linenumber" name="L57" href="#L57">57</a>          licenseStringMap.put(<strong class="jxr_keyword">new</strong> CDDL1License(), LICENSE_LINE);
+<a class="jxr_linenumber" name="L58" href="#L58">58</a>          assertEquals(1, licenseStringMap.entrySet().size());
+<a class="jxr_linenumber" name="L59" href="#L59">59</a>      }
+<a class="jxr_linenumber" name="L60" href="#L60">60</a>  
+<a class="jxr_linenumber" name="L61" href="#L61">61</a>      @Before
+<a class="jxr_linenumber" name="L62" href="#L62">62</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">void</strong> initSubject() {
+<a class="jxr_linenumber" name="L63" href="#L63">63</a>          <strong class="jxr_keyword">this</strong>.subject = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/rat/document/MockLocation.html">MockLocation</a>(<span class="jxr_string">"subject"</span>);
+<a class="jxr_linenumber" name="L64" href="#L64">64</a>      }
+<a class="jxr_linenumber" name="L65" href="#L65">65</a>  
+<a class="jxr_linenumber" name="L66" href="#L66">66</a>      @Test
+<a class="jxr_linenumber" name="L67" href="#L67">67</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNegativeMatches() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L68" href="#L68">68</a>          <strong class="jxr_keyword">for</strong> (Map.Entry&lt;IHeaderMatcher, String&gt; licenseUnderTest : licenseStringMap.entrySet()) {
+<a class="jxr_linenumber" name="L69" href="#L69">69</a>              assertFalse(licenseUnderTest.getKey().match(subject, <span class="jxr_string">"'Behold, Telemachus! (nor fear the sight,)"</span>));
+<a class="jxr_linenumber" name="L70" href="#L70">70</a>          }
+<a class="jxr_linenumber" name="L71" href="#L71">71</a>      }
+<a class="jxr_linenumber" name="L72" href="#L72">72</a>  
+<a class="jxr_linenumber" name="L73" href="#L73">73</a>      @Test
+<a class="jxr_linenumber" name="L74" href="#L74">74</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testPositiveMatchInDocument() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L75" href="#L75">75</a>          <strong class="jxr_keyword">for</strong> (Map.Entry&lt;IHeaderMatcher, String&gt; licenseUnderTest : licenseStringMap.entrySet()) {
+<a class="jxr_linenumber" name="L76" href="#L76">76</a>              assertTrue(licenseUnderTest.getKey().match(subject, <span class="jxr_string">"\t"</span> + licenseUnderTest.getValue()));
+<a class="jxr_linenumber" name="L77" href="#L77">77</a>              assertTrue(licenseUnderTest.getKey().match(subject, <span class="jxr_string">"     "</span> + licenseUnderTest.getValue()));
+<a class="jxr_linenumber" name="L78" href="#L78">78</a>              assertTrue(licenseUnderTest.getKey().match(subject, licenseUnderTest.getValue()));
+<a class="jxr_linenumber" name="L79" href="#L79">79</a>              assertTrue(licenseUnderTest.getKey().match(subject, <span class="jxr_string">" * "</span> + licenseUnderTest.getValue()));
+<a class="jxr_linenumber" name="L80" href="#L80">80</a>              assertTrue(licenseUnderTest.getKey().match(subject, <span class="jxr_string">" // "</span> + licenseUnderTest.getValue()));
+<a class="jxr_linenumber" name="L81" href="#L81">81</a>              assertTrue(licenseUnderTest.getKey().match(subject, <span class="jxr_string">" /* "</span> + licenseUnderTest.getValue()));
+<a class="jxr_linenumber" name="L82" href="#L82">82</a>              assertTrue(licenseUnderTest.getKey().match(subject, <span class="jxr_string">" /** "</span> + licenseUnderTest.getValue()));
+<a class="jxr_linenumber" name="L83" href="#L83">83</a>              assertTrue(licenseUnderTest.getKey().match(subject, <span class="jxr_string">"    "</span> + licenseUnderTest.getValue()));
+<a class="jxr_linenumber" name="L84" href="#L84">84</a>              assertTrue(licenseUnderTest.getKey().match(subject, <span class="jxr_string">" ## "</span> + licenseUnderTest.getValue()));
+<a class="jxr_linenumber" name="L85" href="#L85">85</a>              assertTrue(licenseUnderTest.getKey().match(subject, <span class="jxr_string">" ## "</span> + licenseUnderTest.getValue() + <span class="jxr_string">" ##"</span>));
+<a class="jxr_linenumber" name="L86" href="#L86">86</a>          }
+<a class="jxr_linenumber" name="L87" href="#L87">87</a>      }
+<a class="jxr_linenumber" name="L88" href="#L88">88</a>  }
+</pre>
+<hr/>
+<div id="footer">Copyright &#169; 2006&#x2013;2016 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/creadur-site/blob/88439734/apache-rat-core/xref-test/org/apache/rat/analysis/license/CopyrightHeaderTest.html
----------------------------------------------------------------------
diff --git a/apache-rat-core/xref-test/org/apache/rat/analysis/license/CopyrightHeaderTest.html b/apache-rat-core/xref-test/org/apache/rat/analysis/license/CopyrightHeaderTest.html
new file mode 100644
index 0000000..5e46ba5
--- /dev/null
+++ b/apache-rat-core/xref-test/org/apache/rat/analysis/license/CopyrightHeaderTest.html
@@ -0,0 +1,89 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<title>CopyrightHeaderTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../testapidocs/org/apache/rat/analysis/license/CopyrightHeaderTest.html">View Javadoc</a></div><pre>
+<a class="jxr_linenumber" name="L1" href="#L1">1</a>   <em class="jxr_comment">/*</em>
+<a class="jxr_linenumber" name="L2" href="#L2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one   *</em>
+<a class="jxr_linenumber" name="L3" href="#L3">3</a>   <em class="jxr_comment"> * or more contributor license agreements.  See the NOTICE file *</em>
+<a class="jxr_linenumber" name="L4" href="#L4">4</a>   <em class="jxr_comment"> * distributed with this work for additional information        *</em>
+<a class="jxr_linenumber" name="L5" href="#L5">5</a>   <em class="jxr_comment"> * regarding copyright ownership.  The ASF licenses this file   *</em>
+<a class="jxr_linenumber" name="L6" href="#L6">6</a>   <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the            *</em>
+<a class="jxr_linenumber" name="L7" href="#L7">7</a>   <em class="jxr_comment"> * "License"); you may not use this file except in compliance   *</em>
+<a class="jxr_linenumber" name="L8" href="#L8">8</a>   <em class="jxr_comment"> * with the License.  You may obtain a copy of the License at   *</em>
+<a class="jxr_linenumber" name="L9" href="#L9">9</a>   <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L10" href="#L10">10</a>  <em class="jxr_comment"> *   <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a>                 *</em>
+<a class="jxr_linenumber" name="L11" href="#L11">11</a>  <em class="jxr_comment"> *                                                              *</em>
+<a class="jxr_linenumber" name="L12" href="#L12">12</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,   *</em>
+<a class="jxr_linenumber" name="L13" href="#L13">13</a>  <em class="jxr_comment"> * software distributed under the License is distributed on an  *</em>
+<a class="jxr_linenumber" name="L14" href="#L14">14</a>  <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *</em>
+<a class="jxr_linenumber" name="L15" href="#L15">15</a>  <em class="jxr_comment"> * KIND, either express or implied.  See the License for the    *</em>
+<a class="jxr_linenumber" name="L16" href="#L16">16</a>  <em class="jxr_comment"> * specific language governing permissions and limitations      *</em>
+<a class="jxr_linenumber" name="L17" href="#L17">17</a>  <em class="jxr_comment"> * under the License.                                           *</em>
+<a class="jxr_linenumber" name="L18" href="#L18">18</a>  <em class="jxr_comment"> */</em> 
+<a class="jxr_linenumber" name="L19" href="#L19">19</a>  <strong class="jxr_keyword">package</strong> org.apache.rat.analysis.license;
+<a class="jxr_linenumber" name="L20" href="#L20">20</a>  
+<a class="jxr_linenumber" name="L21" href="#L21">21</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.api.Document;
+<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.api.MetaData;
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.document.MockLocation;
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.rat.report.claim.impl.xml.MockClaimReporter;
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <strong class="jxr_keyword">import</strong> org.junit.Before;
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
+<a class="jxr_linenumber" name="L27" href="#L27">27</a>  
+<a class="jxr_linenumber" name="L28" href="#L28">28</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertFalse;
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertTrue;
+<a class="jxr_linenumber" name="L30" href="#L30">30</a>  
+<a class="jxr_linenumber" name="L31" href="#L31">31</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/rat/analysis/license/CopyrightHeaderTest.html">CopyrightHeaderTest</a> {
+<a class="jxr_linenumber" name="L32" href="#L32">32</a>  
+<a class="jxr_linenumber" name="L33" href="#L33">33</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String[] MATCHING_HEADERS =
+<a class="jxr_linenumber" name="L34" href="#L34">34</a>              { <span class="jxr_string">"/*  Copyright 2012 FooBar.*/"</span>
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>              , <span class="jxr_string">"/*  copyright 2012 foobar.*/"</span>
+<a class="jxr_linenumber" name="L36" href="#L36">36</a>              , <span class="jxr_string">"/*  Copyright 2012-2013 FooBar.*/"</span> };
+<a class="jxr_linenumber" name="L37" href="#L37">37</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String[] NON_MATCHING_HEADERS =
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>              { <span class="jxr_string">"/*  Copyright*/"</span>
+<a class="jxr_linenumber" name="L39" href="#L39">39</a>              , <span class="jxr_string">"/*  Copyright FooBar.*/"</span>
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>              , <span class="jxr_string">"/*  Copyright 2013*/"</span>
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>              , <span class="jxr_string">"/*  Copyright 123a*/"</span>
+<a class="jxr_linenumber" name="L42" href="#L42">42</a>              , <span class="jxr_string">"/*  Copyright 123f oobar*/"</span>
+<a class="jxr_linenumber" name="L43" href="#L43">43</a>              , <span class="jxr_string">"/*  Copyright 2013FooBar*/"</span>
+<a class="jxr_linenumber" name="L44" href="#L44">44</a>              , <span class="jxr_string">"/*  Copyright 2012 2013 FooBar.*/"</span> };
+<a class="jxr_linenumber" name="L45" href="#L45">45</a>  
+<a class="jxr_linenumber" name="L46" href="#L46">46</a>      <strong class="jxr_keyword">private</strong> CopyrightHeader header;
+<a class="jxr_linenumber" name="L47" href="#L47">47</a>      <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/rat/report/claim/impl/xml/MockClaimReporter.html">MockClaimReporter</a> reporter;
+<a class="jxr_linenumber" name="L48" href="#L48">48</a>      <strong class="jxr_keyword">private</strong> Document subject = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/rat/document/MockLocation.html">MockLocation</a>(<span class="jxr_string">"subject"</span>);
+<a class="jxr_linenumber" name="L49" href="#L49">49</a>  
+<a class="jxr_linenumber" name="L50" href="#L50">50</a>      @Before
+<a class="jxr_linenumber" name="L51" href="#L51">51</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setUp() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L52" href="#L52">52</a>          header = <strong class="jxr_keyword">new</strong> CopyrightHeader(MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_ASL,MetaData.RAT_LICENSE_FAMILY_NAME_DATUM_APACHE_LICENSE_VERSION_2_0,<span class="jxr_string">""</span>,<span class="jxr_string">"FooBar"</span>);
+<a class="jxr_linenumber" name="L53" href="#L53">53</a>          reporter = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/rat/report/claim/impl/xml/MockClaimReporter.html">MockClaimReporter</a>();
+<a class="jxr_linenumber" name="L54" href="#L54">54</a>          subject = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/rat/document/MockLocation.html">MockLocation</a>(<span class="jxr_string">"subject"</span>);
+<a class="jxr_linenumber" name="L55" href="#L55">55</a>      }
+<a class="jxr_linenumber" name="L56" href="#L56">56</a>  
+<a class="jxr_linenumber" name="L57" href="#L57">57</a>      @Test
+<a class="jxr_linenumber" name="L58" href="#L58">58</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> match() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L59" href="#L59">59</a>          <strong class="jxr_keyword">for</strong> (String line : MATCHING_HEADERS) {
+<a class="jxr_linenumber" name="L60" href="#L60">60</a>              assertTrue(<span class="jxr_string">"Copyright Header should be matched"</span>, header.match(subject, line));
+<a class="jxr_linenumber" name="L61" href="#L61">61</a>              header.reset();
+<a class="jxr_linenumber" name="L62" href="#L62">62</a>              assertFalse(<span class="jxr_string">"After reset, content should build up again"</span>, header.match(subject, <span class="jxr_string">"New line"</span>));
+<a class="jxr_linenumber" name="L63" href="#L63">63</a>              header.reset();
+<a class="jxr_linenumber" name="L64" href="#L64">64</a>          }
+<a class="jxr_linenumber" name="L65" href="#L65">65</a>      }
+<a class="jxr_linenumber" name="L66" href="#L66">66</a>  
+<a class="jxr_linenumber" name="L67" href="#L67">67</a>      @Test
+<a class="jxr_linenumber" name="L68" href="#L68">68</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> noMatch() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L69" href="#L69">69</a>          <strong class="jxr_keyword">for</strong> (String line : NON_MATCHING_HEADERS) {
+<a class="jxr_linenumber" name="L70" href="#L70">70</a>              assertFalse(<span class="jxr_string">"Copyright Header shouldn't be matched"</span>, header.match(subject, line));
+<a class="jxr_linenumber" name="L71" href="#L71">71</a>              header.reset();
+<a class="jxr_linenumber" name="L72" href="#L72">72</a>              assertTrue(<span class="jxr_string">"After reset, content should build up again"</span>, header.match(subject, MATCHING_HEADERS[0]));
+<a class="jxr_linenumber" name="L73" href="#L73">73</a>              header.reset();
+<a class="jxr_linenumber" name="L74" href="#L74">74</a>          }
+<a class="jxr_linenumber" name="L75" href="#L75">75</a>      }
+<a class="jxr_linenumber" name="L76" href="#L76">76</a>  }
+</pre>
+<hr/>
+<div id="footer">Copyright &#169; 2006&#x2013;2016 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</div>
+</body>
+</html>


Mime
View raw message