creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r1548838 - in /creadur/rat/branches/gsoc: apache-rat-api/src/main/java/org/apache/rat/api/domain/ apache-rat-api/src/test/java/org/apache/rat/api/domain/ apache-rat-core/src/main/java/org/apache/rat/analysis/license/ apache-rat-core/src/mai...
Date Sat, 07 Dec 2013 10:52:01 GMT
Author: rdonkin
Date: Sat Dec  7 10:52:01 2013
New Revision: 1548838

URL: http://svn.apache.org/r1548838
Log:
Convert DojoLicense to use LicenseFamily constructor

Modified:
    creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/RatLicenseFamily.java
    creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/api/domain/RatLicenseFamilyTest.java
    creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/analysis/license/DojoLicenseHeader.java
    creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/api/MetaData.java
    creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/license/ModifiedBSDLicenseFamily.java

Modified: creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/RatLicenseFamily.java
URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/RatLicenseFamily.java?rev=1548838&r1=1548837&r2=1548838&view=diff
==============================================================================
--- creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/RatLicenseFamily.java
(original)
+++ creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/RatLicenseFamily.java
Sat Dec  7 10:52:01 2013
@@ -57,6 +57,10 @@ public enum RatLicenseFamily {
 			"Modified BSD License",
 			"TMF  ",
 			"Note that TMF854 requires a NOTICE. All modifications require notes. See http://opensource.org/licenses/BSD-3-Clause."),
+	 DOJO(
+			"Modified BSD License",
+			"DOJO ",
+			"Note that DOJO requires a NOTICE. All modifications require notes. See http://dojotoolkit.org/community/licensing.shtml."),
     W3C(
             "W3C Software Copyright",
             "W3C  ",

Modified: creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/api/domain/RatLicenseFamilyTest.java
URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/api/domain/RatLicenseFamilyTest.java?rev=1548838&r1=1548837&r2=1548838&view=diff
==============================================================================
--- creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/api/domain/RatLicenseFamilyTest.java
(original)
+++ creadur/rat/branches/gsoc/apache-rat-api/src/test/java/org/apache/rat/api/domain/RatLicenseFamilyTest.java
Sat Dec  7 10:52:01 2013
@@ -20,6 +20,7 @@ package org.apache.rat.api.domain;
 
 import static org.apache.rat.api.domain.RatLicenseFamily.APACHE;
 import static org.apache.rat.api.domain.RatLicenseFamily.CDDL1;
+import static org.apache.rat.api.domain.RatLicenseFamily.DOJO;
 import static org.apache.rat.api.domain.RatLicenseFamily.GPL1;
 import static org.apache.rat.api.domain.RatLicenseFamily.GPL2;
 import static org.apache.rat.api.domain.RatLicenseFamily.GPL3;
@@ -205,4 +206,21 @@ public class RatLicenseFamilyTest {
 				TMF854.getNotes(),
 				is("Note that TMF854 requires a NOTICE. All modifications require notes. See http://opensource.org/licenses/BSD-3-Clause."));
 	}
+	
+	@Test
+	public void testDOJOLicenseFamilyCategory() {
+		assertThat(DOJO.getCategory(), is("DOJO "));
+	}
+
+	@Test
+	public void testDOJOLicenseFamilyName() {
+		assertThat(DOJO.getName(), is("Modified BSD License"));
+	}
+
+	@Test
+	public void testDOJOLicenseFamilyNotes() {
+		assertThat(
+				DOJO.getNotes(),
+				is("Note that DOJO requires a NOTICE. All modifications require notes. See http://dojotoolkit.org/community/licensing.shtml."));
+	}
 }

Modified: creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/analysis/license/DojoLicenseHeader.java
URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/analysis/license/DojoLicenseHeader.java?rev=1548838&r1=1548837&r2=1548838&view=diff
==============================================================================
--- creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/analysis/license/DojoLicenseHeader.java
(original)
+++ creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/analysis/license/DojoLicenseHeader.java
Sat Dec  7 10:52:01 2013
@@ -18,7 +18,7 @@
  */ 
 package org.apache.rat.analysis.license;
 
-import org.apache.rat.api.MetaData;
+import static org.apache.rat.api.domain.RatLicenseFamily.DOJO;
 
 
 public class DojoLicenseHeader extends SimplePatternBasedLicense {
@@ -35,7 +35,7 @@ public class DojoLicenseHeader extends S
     public DojoLicenseHeader() {
         // TODO: support for dual licensing
         // TODO: support for or higher clauses
-        super(MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_DOJO, MetaData.RAT_LICENSE_FAMILY_NAME_DATUM_MODIFIED_BSD_LICENSE,
"Dual license AFL/BSD",
+		super(DOJO.licenseFamily(),
                 new String[]{LICENSE_URL});
     }
 }

Modified: creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/api/MetaData.java
URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/api/MetaData.java?rev=1548838&r1=1548837&r2=1548838&view=diff
==============================================================================
--- creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/api/MetaData.java
(original)
+++ creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/api/MetaData.java
Sat Dec  7 10:52:01 2013
@@ -64,7 +64,6 @@ public class MetaData {
     // Shortcuts used in report output, must be exactly 5 characters
     public static final String RAT_LICENSE_FAMILY_CATEGORY_VALUE_GEN = "GEN  ";
     public static final String RAT_LICENSE_FAMILY_CATEGORY_VALUE_UNKNOWN = "?????";
-    public static final String RAT_LICENSE_FAMILY_CATEGORY_VALUE_DOJO = "DOJO ";
 
     public static final Datum RAT_LICENSE_FAMILY_CATEGORY_DATUM_GEN = new Datum(
             RAT_URL_LICENSE_FAMILY_CATEGORY,
@@ -72,20 +71,13 @@ public class MetaData {
     public static final Datum RAT_LICENSE_FAMILY_CATEGORY_DATUM_UNKNOWN = new Datum(
             RAT_URL_LICENSE_FAMILY_CATEGORY,
             RAT_LICENSE_FAMILY_CATEGORY_VALUE_UNKNOWN);
-    public static final Datum RAT_LICENSE_FAMILY_CATEGORY_DATUM_DOJO = new Datum(
-            RAT_URL_LICENSE_FAMILY_CATEGORY,
-            RAT_LICENSE_FAMILY_CATEGORY_VALUE_DOJO);
 
     // License Family Standard Names
     public static final String RAT_URL_LICENSE_FAMILY_NAME = RAT_BASE_URL
             + "#LicenseFamilyName";
     public static final String RAT_LICENSE_FAMILY_NAME_VALUE_W3C_DOCUMENT_COPYRIGHT = "W3C
Document Copyright";
-    public static final String RAT_LICENSE_FAMILY_NAME_VALUE_MODIFIED_BSD_LICENSE = "Modified
BSD License";
     public static final String RAT_LICENSE_FAMILY_NAME_VALUE_ACADEMIC_FREE_LICENSE_VERSION_2_1
= "Academic Free License, Version 2.1";
     public static final String RAT_LICENSE_FAMILY_NAME_VALUE_UNKNOWN = "?????";
-    public static final Datum RAT_LICENSE_FAMILY_NAME_DATUM_MODIFIED_BSD_LICENSE = new Datum(
-            RAT_URL_LICENSE_FAMILY_NAME,
-            RAT_LICENSE_FAMILY_NAME_VALUE_MODIFIED_BSD_LICENSE);
 
     public static final Datum RAT_LICENSE_FAMILY_NAME_DATUM_ACADEMIC_FREE_LICENSE_VERSION_2_1
= new Datum(
             RAT_URL_LICENSE_FAMILY_NAME,

Modified: creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/license/ModifiedBSDLicenseFamily.java
URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/license/ModifiedBSDLicenseFamily.java?rev=1548838&r1=1548837&r2=1548838&view=diff
==============================================================================
--- creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/license/ModifiedBSDLicenseFamily.java
(original)
+++ creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/license/ModifiedBSDLicenseFamily.java
Sat Dec  7 10:52:01 2013
@@ -18,10 +18,10 @@
  */ 
 package org.apache.rat.license;
 
-import org.apache.rat.api.MetaData;
+import static org.apache.rat.api.domain.RatLicenseFamily.DOJO;
 
 public class ModifiedBSDLicenseFamily extends SimpleLicenseFamily {
     public ModifiedBSDLicenseFamily() {
-        super(MetaData.RAT_LICENSE_FAMILY_NAME_VALUE_MODIFIED_BSD_LICENSE);
+		super(DOJO.getName());
     }
 }



Mime
View raw message