incubator-rat-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r636144 [5/7] - in /incubator/rat/import: ./ rat/ rat/src/ rat/src/java/ rat/src/java/rat/ rat/src/java/rat/analysis/ rat/src/java/rat/analysis/generation/ rat/src/java/rat/analysis/license/ rat/src/java/rat/analysis/util/ rat/src/java/rat/...
Date Tue, 11 Mar 2008 23:09:27 GMT
Added: incubator/rat/import/rat/src/test/javadocs/ArchiveElement.html
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/javadocs/ArchiveElement.html?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/javadocs/ArchiveElement.html (added)
+++ incubator/rat/import/rat/src/test/javadocs/ArchiveElement.html Tue Mar 11 16:08:58 2008
@@ -0,0 +1,417 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_08) on Sun Oct 01 15:23:55 GMT 2006 -->
+<TITLE>
+ArchiveElement
+</TITLE>
+
+<META NAME="keywords" CONTENT="rat.ArchiveElement class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+    parent.document.title="ArchiveElement";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+  <TR ALIGN="center" VALIGN="top">
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+  </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV CLASS&nbsp;
+&nbsp;<A HREF="../rat/DirectoryLastComparator.html" title="class in rat"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+  <A HREF="../index.html?rat/ArchiveElement.html" target="_top"><B>FRAMES</B></A>  &nbsp;
+&nbsp;<A HREF="ArchiveElement.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+  <!--
+  if(window==top) {
+    document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+  }
+  //-->
+</SCRIPT>
+<NOSCRIPT>
+  <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+rat</FONT>
+<BR>
+Class ArchiveElement</H2>
+<PRE>
+java.lang.Object
+  <IMG SRC="../resources/inherit.gif" ALT="extended by "><B>rat.ArchiveElement</B>
+</PRE>
+<DL>
+<DT><B>All Implemented Interfaces:</B> <DD>java.lang.Comparable</DD>
+</DL>
+<HR>
+<DL>
+<DT><PRE>public class <B>ArchiveElement</B><DT>extends java.lang.Object</DL>
+</PRE>
+
+<P>
+<HR>
+
+<P>
+<!-- =========== FIELD SUMMARY =========== -->
+
+<A NAME="field_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Field Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>protected &nbsp;java.io.File</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../rat/ArchiveElement.html#file">file</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../rat/ArchiveElement.html#name">name</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+
+<A NAME="constructor_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Constructor Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../rat/ArchiveElement.html#ArchiveElement(java.io.File)">ArchiveElement</A></B>(java.io.File&nbsp;file)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../rat/ArchiveElement.html#accept(rat.IElementVisitor)">accept</A></B>(rat.IElementVisitor&nbsp;visitor)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;int</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../rat/ArchiveElement.html#compareTo(java.lang.Object)">compareTo</A></B>(java.lang.Object&nbsp;subject)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../rat/ArchiveElement.html#getName()">getName</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../rat/ArchiveElement.html#getPath()">getPath</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>protected &nbsp;java.io.Reader</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../rat/ArchiveElement.html#getReader()">getReader</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../rat/ArchiveElement.html#toString()">toString</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ============ FIELD DETAIL =========== -->
+
+<A NAME="field_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Field Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="file"><!-- --></A><H3>
+file</H3>
+<PRE>
+protected final java.io.File <B>file</B></PRE>
+<DL>
+<DL>
+</DL>
+</DL>
+<HR>
+
+<A NAME="name"><!-- --></A><H3>
+name</H3>
+<PRE>
+protected final java.lang.String <B>name</B></PRE>
+<DL>
+<DL>
+</DL>
+</DL>
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+
+<A NAME="constructor_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Constructor Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="ArchiveElement(java.io.File)"><!-- --></A><H3>
+ArchiveElement</H3>
+<PRE>
+public <B>ArchiveElement</B>(java.io.File&nbsp;file)</PRE>
+<DL>
+</DL>
+
+<!-- ============ METHOD DETAIL ========== -->
+
+<A NAME="method_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Method Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="accept(rat.IElementVisitor)"><!-- --></A><H3>
+accept</H3>
+<PRE>
+public void <B>accept</B>(rat.IElementVisitor&nbsp;visitor)</PRE>
+<DL>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="toString()"><!-- --></A><H3>
+toString</H3>
+<PRE>
+public java.lang.String <B>toString</B>()</PRE>
+<DL>
+<DD><DL>
+<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
+</DD>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="getName()"><!-- --></A><H3>
+getName</H3>
+<PRE>
+public final java.lang.String <B>getName</B>()</PRE>
+<DL>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="getPath()"><!-- --></A><H3>
+getPath</H3>
+<PRE>
+public final java.lang.String <B>getPath</B>()</PRE>
+<DL>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="getReader()"><!-- --></A><H3>
+getReader</H3>
+<PRE>
+protected final java.io.Reader <B>getReader</B>()
+                                  throws java.io.IOException</PRE>
+<DL>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+
+<DT><B>Throws:</B>
+<DD><CODE>java.io.IOException</CODE></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="compareTo(java.lang.Object)"><!-- --></A><H3>
+compareTo</H3>
+<PRE>
+public int <B>compareTo</B>(java.lang.Object&nbsp;subject)</PRE>
+<DL>
+<DD><DL>
+<DT><B>Specified by:</B><DD><CODE>compareTo</CODE> in interface <CODE>java.lang.Comparable</CODE></DL>
+</DD>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+  <TR ALIGN="center" VALIGN="top">
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+  </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV CLASS&nbsp;
+&nbsp;<A HREF="../rat/DirectoryLastComparator.html" title="class in rat"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+  <A HREF="../index.html?rat/ArchiveElement.html" target="_top"><B>FRAMES</B></A>  &nbsp;
+&nbsp;<A HREF="ArchiveElement.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+  <!--
+  if(window==top) {
+    document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+  }
+  //-->
+</SCRIPT>
+<NOSCRIPT>
+  <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>

Added: incubator/rat/import/rat/src/test/javadocs/index.html
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/javadocs/index.html?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/javadocs/index.html (added)
+++ incubator/rat/import/rat/src/test/javadocs/index.html Tue Mar 11 16:08:58 2008
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc on Sun Oct 01 15:23:59 GMT 2006-->
+<TITLE>
+Generated Documentation (Untitled)
+</TITLE>
+<SCRIPT type="text/javascript">
+    targetPage = "" + window.location.search;
+    if (targetPage != "" && targetPage != "undefined")
+       targetPage = targetPage.substring(1);
+    function loadFrames() {
+        if (targetPage != "" && targetPage != "undefined")
+             top.classFrame.location = top.targetPage;
+    }
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+</HEAD>
+<FRAMESET cols="20%,80%" title="" onLoad="top.loadFrames()">
+<FRAMESET rows="30%,70%" title="" onLoad="top.loadFrames()">
+<FRAME src="overview-frame.html" name="packageListFrame" title="All Packages">
+<FRAME src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)">
+</FRAMESET>
+<FRAME src="overview-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes">
+<NOFRAMES>
+<H2>
+Frame Alert</H2>
+
+<P>
+This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
+<BR>
+Link to<A HREF="overview-summary.html">Non-frame version.</A>
+</NOFRAMES>
+</FRAMESET>
+</HTML>

Added: incubator/rat/import/rat/src/test/javadocs/notjavadoc.html
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/javadocs/notjavadoc.html?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/javadocs/notjavadoc.html (added)
+++ incubator/rat/import/rat/src/test/javadocs/notjavadoc.html Tue Mar 11 16:08:58 2008
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>This is not a java doc!</title>
+</head>
+<body>
+Not a java doc
+</body>
+</html>
\ No newline at end of file

Added: incubator/rat/import/rat/src/test/rat/FileNameComparatorTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/FileNameComparatorTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/FileNameComparatorTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/FileNameComparatorTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat;
+
+import java.io.File;
+
+import rat.FileNameComparator;
+
+import junit.framework.TestCase;
+
+public class FileNameComparatorTest extends TestCase {
+
+    FileNameComparator comparator;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        comparator = new FileNameComparator();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testCompare() {
+        final int compare = comparator.compare(new File("src/tests/elements/LICENSE"), new File("src/tests/elements/NOTICE"));
+        assertTrue("LICENSE is before NOTICE", compare < 0);
+    }
+
+}

Added: incubator/rat/import/rat/src/test/rat/ReportTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/ReportTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/ReportTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/ReportTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat;
+
+import java.io.File;
+import java.io.StringWriter;
+
+import junit.framework.TestCase;
+import rat.analysis.util.HeaderMatcherMultiplexer;
+
+public class ReportTest extends TestCase {
+
+    private static final String ELEMENTS_REPORTS = 
+            "\n" + 
+            "*****************************************************\n" + 
+            "Summary\n" + 
+            "-------\n" + 
+            "Notes: 2\n" + 
+            "Binaries: 1\n" + 
+            "Archives: 1\n" + 
+            "Standards: 4\n" + 
+            "\n" + 
+            "Apache Licensed: 2\n" + 
+            "Generated Documents: 0\n" + 
+            "\n" + 
+            "JavaDocs are generated and so license header is optional\n" + 
+            "Generated files do not required license headers\n" + 
+            "\n" + 
+            "2 Unknown Licenses\n" + 
+            "\n" + 
+            "*******************************\n" + 
+            "\n" + 
+            "Archives (+ indicates readable, $ unreadable): \n" + 
+            "\n" + 
+            " + src/test/elements/dummy.jar\n" + 
+            " \n" + 
+            "*****************************************************\n" + 
+            "  Files with AL headers will be marked L\n" + 
+            "  Binary files (which do not require AL headers) will be marked B\n" + 
+            "  Compressed archives will be marked A\n" + 
+            "  Notices, licenses etc will be marked N\n" + 
+            "  B     src/test/elements/Image.png\n" + 
+            "  N     src/test/elements/LICENSE\n" + 
+            "  N     src/test/elements/NOTICE\n" + 
+            " !????? src/test/elements/Source.java\n" + 
+            "  AL    src/test/elements/Text.txt\n" + 
+            "  AL    src/test/elements/Xml.xml\n" + 
+            "  A     src/test/elements/dummy.jar\n" + 
+            " !????? src/test/elements/sub/Empty.txt\n" + 
+            " \n" + 
+            " *****************************************************\n" + 
+            " Printing headers for files without AL header...\n" + 
+            " \n" + 
+            " \n" + 
+            " =======================================================================\n" + 
+            " ==src/test/elements/Source.java\n" + 
+            " =======================================================================\n" + 
+            " package elements;\n" + 
+            "\n" + 
+            "public class Source {\n" + 
+            "\n" + 
+            "}\n" + 
+            "\n" + 
+            " =======================================================================\n" + 
+            " ==src/test/elements/sub/Empty.txt\n" + 
+            " =======================================================================\n" + 
+            " ";
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testPlainReport() throws Exception {
+        StringWriter out = new StringWriter();
+        HeaderMatcherMultiplexer matcherMultiplexer = new HeaderMatcherMultiplexer(Defaults.DEFAULT_MATCHERS);
+        Report.report(out, new DirectoryWalker(new File("src/test/elements")),
+                Defaults.getPlainStyleSheet(), matcherMultiplexer, null);
+        String result = out.getBuffer().toString();
+        assertEquals("Report created",
+                     ELEMENTS_REPORTS.replaceAll("\n",
+                                                 System.getProperty("line.separator")),
+                     result);
+    }
+}

Added: incubator/rat/import/rat/src/test/rat/ReportTransformerTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/ReportTransformerTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/ReportTransformerTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/ReportTransformerTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.StringReader;
+import java.io.StringWriter;
+
+import junit.framework.TestCase;
+
+public class ReportTransformerTest extends TestCase {
+    
+    private static final String SIMPLE_CONTENT =  
+        "<?xml version='1.0'?>" +
+        "<directory name='sub'>" +
+        "<standard name='Empty.txt'>" +
+        "<license code='?????' name='UNKNOWN' version='' approved='false' generated='false'></license>" +
+        "</standard>" +
+        "<directory name='.svn' restricted='true'/>" +
+        "</directory>";
+
+    StringWriter writer;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        writer = new StringWriter();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testTransform() throws Exception {
+        StringReader in = new StringReader(SIMPLE_CONTENT);
+        ReportTransformer transformer = new ReportTransformer(writer, 
+                new BufferedReader(new FileReader(new File("src/java/rat/plain-rat.xsl"))), 
+                in);
+        transformer.transform();
+    }
+
+}

Added: incubator/rat/import/rat/src/test/rat/analysis/MockLicenseMatcher.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/analysis/MockLicenseMatcher.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/analysis/MockLicenseMatcher.java (added)
+++ incubator/rat/import/rat/src/test/rat/analysis/MockLicenseMatcher.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.analysis;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import rat.report.claim.IClaimReporter;
+
+public class MockLicenseMatcher implements IHeaderMatcher {
+
+	public final List lines = new ArrayList();
+	public int resets = 0;
+    public boolean result = true;
+	
+	public boolean match(String subject, String line, IClaimReporter reporter) {
+		lines.add(line);
+		return result;  
+	}
+
+	public void reset() {
+		resets++;
+	}
+
+}

Added: incubator/rat/import/rat/src/test/rat/analysis/generation/GeneratedLicenseNotRequiredTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/analysis/generation/GeneratedLicenseNotRequiredTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/analysis/generation/GeneratedLicenseNotRequiredTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/analysis/generation/GeneratedLicenseNotRequiredTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.analysis.generation;
+
+import java.util.regex.Pattern;
+
+import junit.framework.TestCase;
+import rat.report.claim.impl.xml.MockClaimReporter;
+
+public class GeneratedLicenseNotRequiredTest extends TestCase {
+
+    GeneratedLicenseNotRequired license;
+    MockClaimReporter reporter;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        Pattern[] patterns = {Pattern.compile(".*Generated")};
+        license = new GeneratedLicenseNotRequired(patterns);
+        reporter = new MockClaimReporter();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testMatch() throws Exception {
+        assertFalse("Does not match regex", license.match("subject", "Not at all", reporter));
+        assertTrue("Matches regex", license.match("subject", "This is Generated", reporter));
+    }
+}

Added: incubator/rat/import/rat/src/test/rat/analysis/generation/JavaDocLicenseNotRequiredTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/analysis/generation/JavaDocLicenseNotRequiredTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/analysis/generation/JavaDocLicenseNotRequiredTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/analysis/generation/JavaDocLicenseNotRequiredTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.analysis.generation;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+
+import junit.framework.TestCase;
+import rat.report.claim.impl.xml.MockClaimReporter;
+
+public class JavaDocLicenseNotRequiredTest extends TestCase {
+
+    MockClaimReporter reporter;
+    JavaDocLicenseNotRequired license;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        license = new JavaDocLicenseNotRequired();
+        reporter = new MockClaimReporter();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+    
+    public void testMatchIndexDoc() throws Exception {
+        boolean result = readAndMatch("index.html");
+        assertTrue("Is a javadoc", result);
+    }
+
+    public void testMatchClassDoc() throws Exception {
+        boolean result = readAndMatch("ArchiveElement.html");
+        assertTrue("Is a javadoc", result);
+    }
+
+    public void testMatchNonJavaDoc() throws Exception {
+        boolean result = readAndMatch("notjavadoc.html");
+        assertFalse("Not javadocs and so should return null", result);
+    }
+    
+    boolean readAndMatch(String name) throws Exception {
+        File file = new File("src/test/javadocs/" + name);
+        boolean result = false;
+        BufferedReader in = new BufferedReader(new FileReader(file));
+        String line = in.readLine();
+        while (line != null && !result) {
+            result = license.match("subject", line, reporter);
+            line = in.readLine();
+        }
+        return result;
+    }
+}

Added: incubator/rat/import/rat/src/test/rat/analysis/license/ApacheSoftwareLicense20Test.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/analysis/license/ApacheSoftwareLicense20Test.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/analysis/license/ApacheSoftwareLicense20Test.java (added)
+++ incubator/rat/import/rat/src/test/rat/analysis/license/ApacheSoftwareLicense20Test.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.analysis.license;
+
+import junit.framework.TestCase;
+import rat.report.claim.impl.xml.MockClaimReporter;
+
+public class ApacheSoftwareLicense20Test extends TestCase {
+
+    MockClaimReporter reporter;
+    
+	protected void setUp() throws Exception {
+		super.setUp();
+        reporter = new MockClaimReporter();
+	}
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+	
+	public void testMatches() throws Exception {
+		ApacheSoftwareLicense20 worker = new ApacheSoftwareLicense20();
+		assertTrue(worker.matches(ApacheSoftwareLicense20.FIRST_LICENSE_LINE));
+		assertTrue(worker.matches("    Licensed under the Apache License, Version 2.0 (the \"License\");"));
+		assertTrue(worker.matches("Licensed under the Apache License, Version 2.0 (the \"License\");"));
+		assertTrue(worker.matches(" * Licensed under the Apache License, Version 2.0 (the \"License\");"));
+		assertTrue(worker.matches(" // Licensed under the Apache License, Version 2.0 (the \"License\");"));
+		assertTrue(worker.matches(" /* Licensed under the Apache License, Version 2.0 (the \"License\");"));
+		assertTrue(worker.matches("    Licensed under the Apache License, Version 2.0 (the \"License\");"));
+		assertTrue(worker.matches(" ## Licensed under the Apache License, Version 2.0 (the \"License\");"));
+		assertTrue(worker.matches(" ## Licensed under the Apache License, Version 2.0 (the \"License\") ##);"));
+		assertFalse(worker.matches("'Behold, Telemachus! (nor fear the sight,)"));
+	}
+	
+	public void testMatch() throws Exception {
+		ApacheSoftwareLicense20 worker = new ApacheSoftwareLicense20();
+		assertTrue(worker.match("subject", ApacheSoftwareLicense20.FIRST_LICENSE_LINE, reporter));
+        assertTrue(worker.match("subject", "    Licensed under the Apache License, Version 2.0 (the \"License\");", reporter));
+        assertTrue(worker.match("subject", "Licensed under the Apache License, Version 2.0 (the \"License\");", reporter));
+        assertTrue(worker.match("subject", " * Licensed under the Apache License, Version 2.0 (the \"License\");", reporter));
+        assertTrue(worker.match("subject", " // Licensed under the Apache License, Version 2.0 (the \"License\");", reporter));
+        assertTrue(worker.match("subject", " /* Licensed under the Apache License, Version 2.0 (the \"License\");", reporter));
+        assertTrue(worker.match("subject", "    Licensed under the Apache License, Version 2.0 (the \"License\");", reporter));
+        assertTrue(worker.match("subject", " ## Licensed under the Apache License, Version 2.0 (the \"License\");", reporter));
+        assertTrue(worker.match("subject", " ## Licensed under the Apache License, Version 2.0 (the \"License\") ##);", reporter));
+        assertFalse(worker.match("subject", "'Behold, Telemachus! (nor fear the sight,)", reporter));
+	}
+    
+}

Added: incubator/rat/import/rat/src/test/rat/analysis/license/MockStandardLicense.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/analysis/license/MockStandardLicense.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/analysis/license/MockStandardLicense.java (added)
+++ incubator/rat/import/rat/src/test/rat/analysis/license/MockStandardLicense.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.analysis.license;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+public class MockStandardLicense extends BaseLicense {
+
+    public List visitors = new ArrayList();
+    
+    public MockStandardLicense() {
+        super("", "", "");
+    }
+}

Added: incubator/rat/import/rat/src/test/rat/analysis/license/OASISLicenseTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/analysis/license/OASISLicenseTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/analysis/license/OASISLicenseTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/analysis/license/OASISLicenseTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.analysis.license;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.StringReader;
+
+import junit.framework.TestCase;
+import rat.report.claim.impl.xml.MockClaimReporter;
+
+public class OASISLicenseTest extends TestCase {
+    
+    private static final String LICENSE = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+            "<!--\n" +
+            "\n" +
+            "\n" +
+            "OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.\n" +
+            "\n" +
+            "\n" +
+            "OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director\n." +
+            "\n" +
+            "Copyright (C) OASIS Open (2004-2005). All Rights Reserved.\n" +
+            "\n" +
+            "This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.\n" +
+            "\n" +
+            "\n" +
+            "The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.\n" +
+            "\n" +
+            "\n" +
+            "This document and the information contained herein is provided on an \"AS IS\" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\n" +
+            "-->\n";
+    
+    OASISLicense license;
+    
+    MockClaimReporter reporter;
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        license = new OASISLicense();
+        reporter = new MockClaimReporter();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testMatch() throws Exception {
+        BufferedReader in = new BufferedReader(new StringReader(LICENSE));
+        String line = in.readLine();
+        boolean result = false;
+        while (line != null) {
+            result = license.match("subject", line, reporter);
+            line = in.readLine();
+        }
+        assertTrue("OASIS license should be matched", result);
+        license.reset();
+        result = license.match("subject", "New line", reporter);
+        assertFalse("After reset, content should build up again", result);
+    }
+
+    public void testNoMatch() throws Exception {
+        final File file = new File ("src/test/elements/Source.java");
+        BufferedReader in = new BufferedReader(new BufferedReader(new FileReader(file)));
+        String line = in.readLine();
+        boolean result = false;
+        while (line != null) {
+            result = license.match("subject", line, reporter);
+            line = in.readLine();
+        }
+        assertFalse("OASIS license should not be matched", result);
+        license.reset();
+    }
+   
+}

Added: incubator/rat/import/rat/src/test/rat/analysis/license/W3CLicenseTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/analysis/license/W3CLicenseTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/analysis/license/W3CLicenseTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/analysis/license/W3CLicenseTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.analysis.license;
+
+import junit.framework.TestCase;
+import rat.report.claim.impl.xml.MockClaimReporter;
+
+public class W3CLicenseTest extends TestCase {
+
+    public static final String COPYRIGHT_URL 
+    = "http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231";
+    
+    public static final String COPYRIGHT_URL_COMMENTED
+    = "# http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 #";
+    
+    public static final String COPYRIGHT_URL_XML
+    = "<!-- http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 -->";
+    
+    W3CLicense license;
+    MockClaimReporter reporter;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        license = new W3CLicense();
+        reporter = new MockClaimReporter();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testMatch() throws Exception {
+        assertTrue("Expected matcher to return license", license.match("subject", COPYRIGHT_URL, reporter));
+        assertTrue("Expected matcher to return license", license.match("subject", COPYRIGHT_URL_COMMENTED, reporter));
+        assertTrue("Expected matcher to return license", license.match("subject", COPYRIGHT_URL_XML, reporter));
+        assertFalse("Return null if the license isn't matched", license.match("subject", "Bogus", reporter));
+    }
+}

Added: incubator/rat/import/rat/src/test/rat/analysis/util/MatcherMultiplexerTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/analysis/util/MatcherMultiplexerTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/analysis/util/MatcherMultiplexerTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/analysis/util/MatcherMultiplexerTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.analysis.util;
+
+import junit.framework.TestCase;
+import rat.analysis.IHeaderMatcher;
+import rat.analysis.MockLicenseMatcher;
+import rat.analysis.util.HeaderMatcherMultiplexer;
+import rat.report.claim.impl.xml.MockClaimReporter;
+
+public class MatcherMultiplexerTest extends TestCase {
+
+	private static final String LINE_ONE = "Line One";
+	private static final String LINE_TWO = "Line Two";
+	
+    MockClaimReporter reporter;
+	MockLicenseMatcher matcherOne;
+	MockLicenseMatcher matcherTwo;
+
+	HeaderMatcherMultiplexer multiplexer;
+	
+	protected void setUp() throws Exception {
+		super.setUp();
+		matcherOne = new MockLicenseMatcher();
+		matcherTwo = new MockLicenseMatcher();
+		IHeaderMatcher[] matchers = {matcherOne, matcherTwo};
+		multiplexer = new HeaderMatcherMultiplexer(matchers);
+        reporter = new MockClaimReporter();
+	}
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+	
+	public void testMatcherLine() throws Exception {
+        matcherOne.result = false;
+        matcherTwo.result = false;
+		multiplexer.match("subject", LINE_ONE, reporter);
+		assertEquals("One line", 1, matcherOne.lines.size());
+		assertEquals("Same as line passed", LINE_ONE, matcherOne.lines.get(0));
+		assertEquals("One line", 1, matcherTwo.lines.size());
+		assertEquals("Same as line passed", LINE_ONE, matcherTwo.lines.get(0));
+		multiplexer.match("subject", LINE_TWO, reporter);
+		assertEquals("One line", 2, matcherOne.lines.size());
+		assertEquals("Same as line passed", LINE_TWO, matcherOne.lines.get(1));
+		assertEquals("One line", 2, matcherTwo.lines.size());
+		assertEquals("Same as line passed", LINE_TWO, matcherTwo.lines.get(1));
+	}
+	
+	public void testReset() {
+		multiplexer.reset();
+		assertEquals("Reset once", 1, matcherOne.resets);
+		assertEquals("Reset once", 1, matcherTwo.resets);
+		multiplexer.reset();
+		assertEquals("Reset twice", 2, matcherOne.resets);
+		assertEquals("Reset twice", 2, matcherTwo.resets);
+	}
+}

Added: incubator/rat/import/rat/src/test/rat/document/DocumentUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/DocumentUtilsTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/DocumentUtilsTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/DocumentUtilsTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.Collection;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.collections.CollectionUtils;
+
+import rat.document.impl.zip.ZipDocumentFactory;
+
+public class DocumentUtilsTest extends TestCase {
+
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testDocumentsContained() throws Exception {
+        IDocumentCollection documents 
+        = ZipDocumentFactory.load(new File("src/test/elements/dummy.jar"));
+        Collection contents = DocumentUtils.documentsContained(documents);
+        assertEquals("8 documents in jar", 8, contents.size());
+        CollectionUtils.transform(contents, DocumentUtils.toNameTransformer());
+        String[] names = {"Image.png", "LICENSE", "NOTICE", "Source.java", "Text.txt", "Xml.xml", 
+                "MANIFEST.MF", "Empty.txt"};
+        assertTrue(CollectionUtils.isEqualCollection(Arrays.asList(names), contents));
+    }
+}

Added: incubator/rat/import/rat/src/test/rat/document/MockArchiveDocument.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/MockArchiveDocument.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/MockArchiveDocument.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/MockArchiveDocument.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document;
+
+import java.io.IOException;
+import java.io.Reader;
+
+public class MockArchiveDocument implements IDocument {
+
+    public IDocumentCollection contents;
+    public String name;
+    
+    public MockArchiveDocument() {}
+    public MockArchiveDocument(String name) {
+        this.name = name;
+    }
+    
+    public MockArchiveDocument(String name, IDocumentCollection contents) {
+        super();
+        this.contents = contents;
+        this.name = name;
+    }
+    
+    public IDocumentCollection readArchive() throws IOException {
+        return contents;
+    }
+
+    public Reader reader() throws IOException {
+        throw new CompositeDocumentException();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+}

Added: incubator/rat/import/rat/src/test/rat/document/MockDocument.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/MockDocument.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/MockDocument.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/MockDocument.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document;
+
+import java.io.IOException;
+import java.io.Reader;
+
+public class MockDocument implements IDocument {
+
+    public Reader reader;
+    public String name;
+    public IDocumentCollection documentCollection;
+
+    public MockDocument() {
+        this(null, "name");
+    }
+
+    public MockDocument(String name) {
+        this(null, name);
+    }
+    
+    public MockDocument(Reader reader, String name) {
+        super();
+        this.reader = reader;
+        this.name = name;
+    }
+
+    public Reader reader() throws IOException {
+        return reader;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public IDocumentCollection readArchive() throws IOException {
+        return documentCollection;
+    }
+}

Added: incubator/rat/import/rat/src/test/rat/document/MockDocumentAnalyser.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/MockDocumentAnalyser.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/MockDocumentAnalyser.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/MockDocumentAnalyser.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MockDocumentAnalyser implements IDocumentAnalyser {
+
+    public List matches = new ArrayList();
+    
+    public void analyse(IDocument document) throws RatDocumentAnalysisException {
+        matches.add(document);
+    }
+
+}

Added: incubator/rat/import/rat/src/test/rat/document/MockDocumentCollection.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/MockDocumentCollection.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/MockDocumentCollection.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/MockDocumentCollection.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+public class MockDocumentCollection implements IDocumentCollection {
+
+    public Collection documents;
+    public Collection subdirectories;
+    public String name;
+    public String url;
+
+    public MockDocumentCollection() {
+        this(new ArrayList(), new ArrayList(), "name", "url");
+    }
+    
+    public MockDocumentCollection(Collection documents, Collection subdirectories, String name, String url) {
+        super();
+        this.documents = documents;
+        this.subdirectories = subdirectories;
+        this.name = name;
+        this.url = url;
+    }
+
+    public Iterator documentIterator() {
+        return documents.iterator();
+    }
+
+    public Iterator subcollectionIterator() {
+        return subdirectories.iterator();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getURL() {
+        return url;
+    }
+}

Added: incubator/rat/import/rat/src/test/rat/document/MockDocumentMatcher.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/MockDocumentMatcher.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/MockDocumentMatcher.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/MockDocumentMatcher.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MockDocumentMatcher implements IDocumentMatcher {
+
+    public boolean returnValue = false;
+    public List matches = new ArrayList();
+    
+    public MockDocumentMatcher() {}
+    public MockDocumentMatcher(boolean returnValue) {
+        this.returnValue = returnValue;
+    }
+    
+    public boolean matches(IDocument document) {
+        matches.add(document);
+        return returnValue;
+    }
+
+}

Added: incubator/rat/import/rat/src/test/rat/document/MockLocation.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/MockLocation.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/MockLocation.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/MockLocation.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document;
+
+public class MockLocation implements IResource {
+
+    public String name;
+    public String url;
+    
+    public MockLocation() {
+        this("name", "url");
+    }
+    
+    public MockLocation(String name, String url) {
+        super();
+        this.name = name;
+        this.url = url;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getURL() {
+        return url;
+    }
+
+}

Added: incubator/rat/import/rat/src/test/rat/document/ToNameTransformerTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/ToNameTransformerTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/ToNameTransformerTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/ToNameTransformerTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document;
+
+import junit.framework.TestCase;
+
+public class ToNameTransformerTest extends TestCase {
+
+    ToNameTransformer transformer = new ToNameTransformer();
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testTransformLocation() {
+        MockLocation location = new MockLocation();
+        Object result = transformer.transform(location);
+        assertNotNull("Transform into name", result);
+        assertEquals("Transform into name", location.name, result);
+    }
+
+    public void testTransformNull() {
+        Object result = transformer.transform(null);
+        assertNull("Null transforms to null", result);
+    }
+}

Added: incubator/rat/import/rat/src/test/rat/document/impl/SingularFileDocumentTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/impl/SingularFileDocumentTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/impl/SingularFileDocumentTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/impl/SingularFileDocumentTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document.impl;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.Reader;
+
+import junit.framework.TestCase;
+import rat.document.UnreadableArchiveException;
+
+public class SingularFileDocumentTest extends TestCase {
+
+    MonolithicFileDocument document;
+    File file;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        file = new File("src/test/elements/Source.java");
+        document = new MonolithicFileDocument(file);
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testReadArchive() throws Exception {
+        try {
+            document.readArchive();
+            fail("Source is not archive: Exception should have been thrown");
+        } catch (UnreadableArchiveException e) {
+            // expected
+        }
+    }
+
+    public void testReader() throws Exception {
+        Reader reader = document.reader();
+        assertNotNull("Reader should be returned", reader);
+        assertEquals("First file line expected", "package elements;", 
+                 new BufferedReader(reader).readLine());
+    }
+
+    public void testGetName() {
+        final String name = document.getName();
+        assertNotNull("Name is set", name);
+        assertEquals("Name is filename", "src/test/elements/Source.java", name);
+    }
+
+}

Added: incubator/rat/import/rat/src/test/rat/document/impl/guesser/ArchiveGuesserTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/impl/guesser/ArchiveGuesserTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/impl/guesser/ArchiveGuesserTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/impl/guesser/ArchiveGuesserTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document.impl.guesser;
+
+import rat.document.MockDocument;
+import junit.framework.TestCase;
+
+public class ArchiveGuesserTest extends TestCase {
+
+    ArchiveGuesser guesser;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        this.guesser = new ArchiveGuesser();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+    
+
+    public void testMatches() {
+        assertTrue(guesser.matches(new MockDocument("42.jar")));
+        assertTrue(guesser.matches(new MockDocument("42.tar.gz")));
+        assertTrue(guesser.matches(new MockDocument("42.zip")));
+        assertTrue(guesser.matches(new MockDocument("42.tar")));
+        assertTrue(guesser.matches(new MockDocument("42.bz")));
+        assertTrue(guesser.matches(new MockDocument("42.bz2")));
+    }
+    
+    public void testIsArchive() {
+        assertTrue(ArchiveGuesser.isArchive("42.jar"));
+        assertTrue(ArchiveGuesser.isArchive("42.tar.gz"));
+        assertTrue(ArchiveGuesser.isArchive("42.zip"));
+        assertTrue(ArchiveGuesser.isArchive("42.tar"));
+        assertTrue(ArchiveGuesser.isArchive("42.bz"));
+        assertTrue(ArchiveGuesser.isArchive("42.bz2"));
+    }
+    
+
+}

Added: incubator/rat/import/rat/src/test/rat/document/impl/guesser/BinaryGuesserTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/impl/guesser/BinaryGuesserTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/impl/guesser/BinaryGuesserTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/impl/guesser/BinaryGuesserTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document.impl.guesser;
+
+import rat.document.MockDocument;
+import junit.framework.TestCase;
+
+public class BinaryGuesserTest extends TestCase {
+
+    BinaryGuesser guesser;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        guesser = new BinaryGuesser();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+    
+    public void testMatches() {
+        assertTrue(guesser.matches(new MockDocument("image.png")));
+        assertTrue(guesser.matches(new MockDocument("image.pdf")));
+        assertTrue(guesser.matches(new MockDocument("image.gif")));
+        assertTrue(guesser.matches(new MockDocument("image.giff")));
+        assertTrue(guesser.matches(new MockDocument("image.tif")));
+        assertTrue(guesser.matches(new MockDocument("image.tiff")));
+        assertTrue(guesser.matches(new MockDocument("image.jpg")));
+        assertTrue(guesser.matches(new MockDocument("image.jpeg")));
+        assertTrue(guesser.matches(new MockDocument("image.exe")));
+        assertTrue(guesser.matches(new MockDocument("Whatever.class")));
+        assertTrue(guesser.matches(new MockDocument("data.dat")));
+        assertTrue(guesser.matches(new MockDocument("libicudata.so.34.")));
+    }
+
+    public void testIsBinary() {
+        assertTrue(BinaryGuesser.isBinary("image.png"));
+        assertTrue(BinaryGuesser.isBinary("image.pdf"));
+        assertTrue(BinaryGuesser.isBinary("image.gif"));
+        assertTrue(BinaryGuesser.isBinary("image.giff"));
+        assertTrue(BinaryGuesser.isBinary("image.tif"));
+        assertTrue(BinaryGuesser.isBinary("image.tiff"));
+        assertTrue(BinaryGuesser.isBinary("image.jpg"));
+        assertTrue(BinaryGuesser.isBinary("image.jpeg"));
+        assertTrue(BinaryGuesser.isBinary("image.exe"));
+        assertTrue(BinaryGuesser.isBinary("Whatever.class"));
+        assertTrue(BinaryGuesser.isBinary("data.dat"));
+        assertTrue(BinaryGuesser.isBinary("libicudata.so.34."));
+    }
+}

Added: incubator/rat/import/rat/src/test/rat/document/impl/guesser/GuessUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/impl/guesser/GuessUtilsTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/impl/guesser/GuessUtilsTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/impl/guesser/GuessUtilsTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document.impl.guesser;
+
+import junit.framework.TestCase;
+
+public class GuessUtilsTest extends TestCase {
+
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testNormalise() throws Exception {
+        assertEquals("LICENSE", GuessUtils.normalise("license"));
+        assertEquals("LICENSE.TXT", GuessUtils.normalise("license.txt"));
+        assertEquals("LICENSE.TXT", GuessUtils.normalise("some/path/license.txt"));
+        assertEquals("LICENSE.TXT", GuessUtils.normalise("/license.txt"));
+        assertEquals("LICENSE.TXT", GuessUtils.normalise("some\\path\\license.txt"));
+        assertEquals("", GuessUtils.normalise("/"));
+    }
+}

Added: incubator/rat/import/rat/src/test/rat/document/impl/guesser/NoteGuesserTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/impl/guesser/NoteGuesserTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/impl/guesser/NoteGuesserTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/impl/guesser/NoteGuesserTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document.impl.guesser;
+
+import rat.document.MockDocument;
+import junit.framework.TestCase;
+
+public class NoteGuesserTest extends TestCase {
+
+    NoteGuesser guesser;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        this.guesser = new NoteGuesser();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testMatches() {
+        assertTrue(guesser.matches(new MockDocument("LICENSE")));
+        assertTrue(guesser.matches(new MockDocument("LICENSE.txt")));
+        assertTrue(guesser.matches(new MockDocument("NOTICE")));
+        assertTrue(guesser.matches(new MockDocument("NOTICE.txt")));
+        assertTrue(guesser.matches(new MockDocument("README")));
+        assertTrue(guesser.matches(new MockDocument("README.txt")));
+    }
+
+    public void testIsNote() {
+        assertTrue(NoteGuesser.isNote("LICENSE"));
+        assertTrue(NoteGuesser.isNote("LICENSE.txt"));
+        assertTrue(NoteGuesser.isNote("NOTICE"));
+        assertTrue(NoteGuesser.isNote("NOTICE.txt"));
+        assertTrue(NoteGuesser.isNote("README"));
+        assertTrue(NoteGuesser.isNote("README.txt"));
+    }
+    
+    public void testIsNoteWithPath() {
+        assertTrue(NoteGuesser.isNote("src/test/LICENSE"));
+        assertTrue(NoteGuesser.isNote("src/test/LICENSE.txt"));
+        assertTrue(NoteGuesser.isNote("src/test/NOTICE"));
+        assertTrue(NoteGuesser.isNote("src/test/NOTICE.txt"));
+        assertTrue(NoteGuesser.isNote("src/test/README"));
+        assertTrue(NoteGuesser.isNote("src/test/README.txt"));
+        assertTrue(NoteGuesser.isNote("src\\test\\LICENSE"));
+        assertTrue(NoteGuesser.isNote("src\\test\\LICENSE.txt"));
+        assertTrue(NoteGuesser.isNote("src\\test\\NOTICE"));
+        assertTrue(NoteGuesser.isNote("src\\test\\NOTICE.txt"));
+        assertTrue(NoteGuesser.isNote("src\\test\\README"));
+        assertTrue(NoteGuesser.isNote("src\\test\\README.txt"));
+    }
+}

Added: incubator/rat/import/rat/src/test/rat/document/impl/util/ConditionalAnalyserTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/impl/util/ConditionalAnalyserTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/impl/util/ConditionalAnalyserTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/impl/util/ConditionalAnalyserTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document.impl.util;
+
+import rat.document.MockDocument;
+import rat.document.MockDocumentAnalyser;
+import rat.document.MockDocumentMatcher;
+import junit.framework.TestCase;
+
+public class ConditionalAnalyserTest extends TestCase {
+
+    MockDocumentAnalyser analyser;
+    MockDocument document;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        analyser = new MockDocumentAnalyser();
+        document = new MockDocument();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testMatch() throws Exception {
+        MockDocumentMatcher matcher = new MockDocumentMatcher(true);
+        ConditionalAnalyser conditionalAnalyser = new ConditionalAnalyser(matcher, analyser);
+        assertTrue("Returns match value", conditionalAnalyser.matches(document));
+        assertEquals("Document analysed", 1, analyser.matches.size());
+        assertEquals("Document analysed", document, analyser.matches.get(0));
+        assertEquals("Document matched", 1, matcher.matches.size());
+        assertEquals("Document matched", document, matcher.matches.get(0));
+    }
+
+    public void testNoMatch() throws Exception {
+        MockDocumentMatcher matcher = new MockDocumentMatcher(false);
+        ConditionalAnalyser conditionalAnalyser = new ConditionalAnalyser(matcher, analyser);
+        assertFalse("Returns match value", conditionalAnalyser.matches(document));
+        assertEquals("Not Documents analysed", 0, analyser.matches.size());
+        assertEquals("Document matched", 1, matcher.matches.size());
+        assertEquals("Document matched", document, matcher.matches.get(0));
+    }
+
+}

Added: incubator/rat/import/rat/src/test/rat/document/impl/util/DocumentAnalyserMultiplexerTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/impl/util/DocumentAnalyserMultiplexerTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/impl/util/DocumentAnalyserMultiplexerTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/impl/util/DocumentAnalyserMultiplexerTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document.impl.util;
+
+import rat.document.IDocumentAnalyser;
+import rat.document.MockDocument;
+import rat.document.MockDocumentAnalyser;
+import junit.framework.TestCase;
+
+public class DocumentAnalyserMultiplexerTest extends TestCase {
+
+    DocumentAnalyserMultiplexer multiplexer;
+    IDocumentAnalyser[] analysers;
+    MockDocument document;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        IDocumentAnalyser[] analysers = {
+                new MockDocumentAnalyser(), 
+                new MockDocumentAnalyser(),
+                new MockDocumentAnalyser()
+        };
+        this.analysers = analysers;
+        document = new MockDocument();
+        multiplexer = new DocumentAnalyserMultiplexer(analysers);
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testAnalyse() throws Exception {
+        multiplexer.analyse(document);
+        MockDocumentAnalyser analyser =  (MockDocumentAnalyser) (analysers[0]);
+        assertEquals("Call made to analyser", 1, analyser.matches.size());
+        assertEquals("Call made to analyser", document, analyser.matches.get(0));
+        analyser =  (MockDocumentAnalyser) (analysers[1]);
+        assertEquals("Call made to analyser", 1, analyser.matches.size());
+        assertEquals("Call made to analyser", document, analyser.matches.get(0));
+        analyser =  (MockDocumentAnalyser) (analysers[2]);
+        assertEquals("Call made to analyser", 1, analyser.matches.size());
+        assertEquals("Call made to analyser", document, analyser.matches.get(0));
+    }
+
+}

Added: incubator/rat/import/rat/src/test/rat/document/impl/util/DocumentMatcherMultiplexerTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/impl/util/DocumentMatcherMultiplexerTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/impl/util/DocumentMatcherMultiplexerTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/impl/util/DocumentMatcherMultiplexerTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document.impl.util;
+
+import junit.framework.TestCase;
+import rat.document.IDocumentMatcher;
+import rat.document.MockDocument;
+import rat.document.MockDocumentMatcher;
+
+public class DocumentMatcherMultiplexerTest extends TestCase {
+
+    DocumentMatcherMultiplexer multiplexer;
+    MockDocumentMatcher documentOne;
+    MockDocumentMatcher documentTwo;
+    MockDocumentMatcher documentThree;
+    MockDocumentMatcher documentFour;
+    MockDocument document;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        documentOne = new MockDocumentMatcher();
+        documentTwo = new MockDocumentMatcher();
+        documentThree = new MockDocumentMatcher();
+        documentFour = new MockDocumentMatcher();
+        IDocumentMatcher[] documents = {documentOne, documentTwo, documentThree, documentFour};
+        multiplexer = new DocumentMatcherMultiplexer(documents);
+        document = new MockDocument();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testMatchesAll() throws Exception {
+        documentOne.returnValue = false;
+        documentTwo.returnValue = false;
+        documentThree.returnValue = false;
+        documentFour.returnValue = true;
+        assertTrue("Matches", multiplexer.matches(document));
+        assertEquals("Matcher called with document", 1, documentOne.matches.size());
+        assertEquals("Matcher called with document", document, documentOne.matches.get(0));
+        assertEquals("Matcher called with document", 1, documentTwo.matches.size());
+        assertEquals("Matcher called with document", document, documentTwo.matches.get(0));
+        assertEquals("Matcher called with document", 1, documentThree.matches.size());
+        assertEquals("Matcher called with document", document, documentThree.matches.get(0));
+        assertEquals("Matcher called with document", 1, documentFour.matches.size());
+        assertEquals("Matcher called with document", document, documentFour.matches.get(0));
+    }
+    
+    public void testIgnoreAfterMatch() throws Exception {
+        documentOne.returnValue = false;
+        documentTwo.returnValue = false;
+        documentThree.returnValue = true;
+        documentFour.returnValue = false;
+        assertTrue("Matches", multiplexer.matches(document));
+        assertEquals("Matcher called with document", 1, documentOne.matches.size());
+        assertEquals("Matcher called with document", document, documentOne.matches.get(0));
+        assertEquals("Matcher called with document", 1, documentTwo.matches.size());
+        assertEquals("Matcher called with document", document, documentTwo.matches.get(0));
+        assertEquals("Matcher called with document", 1, documentThree.matches.size());
+        assertEquals("Matcher called with document", document, documentThree.matches.get(0));
+        assertEquals("Matcher not called", 0, documentFour.matches.size());
+    }
+    
+    public void testNoMatch() throws Exception {
+        documentOne.returnValue = false;
+        documentTwo.returnValue = false;
+        documentThree.returnValue = false;
+        documentFour.returnValue = false;
+        assertFalse("Matches", multiplexer.matches(document));
+    }
+    
+}

Added: incubator/rat/import/rat/src/test/rat/document/impl/util/MatchNegatorTest.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/test/rat/document/impl/util/MatchNegatorTest.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/test/rat/document/impl/util/MatchNegatorTest.java (added)
+++ incubator/rat/import/rat/src/test/rat/document/impl/util/MatchNegatorTest.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package rat.document.impl.util;
+
+import rat.document.MockDocument;
+import rat.document.MockDocumentMatcher;
+import junit.framework.TestCase;
+
+public class MatchNegatorTest extends TestCase {
+
+    MatchNegator negator;
+    MockDocumentMatcher matcher;
+    MockDocument document;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        matcher = new MockDocumentMatcher();
+        negator = new MatchNegator(matcher);
+        document = new MockDocument();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testMatch() throws Exception {
+        matcher.returnValue = true;
+        assertFalse("Negate match return value", negator.matches(document));
+    }
+
+    public void testNoMatch() throws Exception {
+        matcher.returnValue = false;
+        assertTrue("Negate match return value", negator.matches(document));
+    }
+}



Mime
View raw message