creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r1548837 - 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:51:10 GMT
Author: rdonkin
Date: Sat Dec  7 10:51:09 2013
New Revision: 1548837

URL: http://svn.apache.org/r1548837
Log:
Convert TMF854LicenseHeader 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/TMF854LicenseHeader.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/policy/DefaultPolicy.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=1548837&r1=1548836&r2=1548837&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:51:09 2013
@@ -53,6 +53,10 @@ public enum RatLicenseFamily {
 			"OASIS Open License",
 			"OASIS",
 			"Note that OASIS requires a NOTICE. All modifications require notes. See https://www.oasis-open.org/policies-guidelines/ipr."),
+	TMF854(
+			"Modified BSD License",
+			"TMF  ",
+			"Note that TMF854 requires a NOTICE. All modifications require notes. See http://opensource.org/licenses/BSD-3-Clause."),
     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=1548837&r1=1548836&r2=1548837&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:51:09 2013
@@ -25,6 +25,7 @@ import static org.apache.rat.api.domain.
 import static org.apache.rat.api.domain.RatLicenseFamily.GPL3;
 import static org.apache.rat.api.domain.RatLicenseFamily.MIT;
 import static org.apache.rat.api.domain.RatLicenseFamily.OASIS;
+import static org.apache.rat.api.domain.RatLicenseFamily.TMF854;
 import static org.apache.rat.api.domain.RatLicenseFamily.W3C;
 import static org.apache.rat.api.domain.RatLicenseFamily.W3C_DOCUMENTATION;
 import static org.hamcrest.CoreMatchers.is;
@@ -178,8 +179,7 @@ public class RatLicenseFamilyTest {
 
 	@Test
 	public void testOASISLicenseFamilyName() {
-		assertThat(OASIS.getName(),
- is("OASIS Open License"));
+		assertThat(OASIS.getName(), is("OASIS Open License"));
 	}
 
 	@Test
@@ -188,4 +188,21 @@ public class RatLicenseFamilyTest {
 				OASIS.getNotes(),
 				is("Note that OASIS requires a NOTICE. All modifications require notes. See https://www.oasis-open.org/policies-guidelines/ipr."));
 	}
+	
+	@Test
+	public void testTMF854LicenseFamilyCategory() {
+		assertThat(TMF854.getCategory(), is("TMF  "));
+	}
+
+	@Test
+	public void testTMF854LicenseFamilyName() {
+		assertThat(TMF854.getName(), is("Modified BSD License"));
+	}
+
+	@Test
+	public void testTMF854LicenseFamilyNotes() {
+		assertThat(
+				TMF854.getNotes(),
+				is("Note that TMF854 requires a NOTICE. All modifications require notes. See http://opensource.org/licenses/BSD-3-Clause."));
+	}
 }

Modified: creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/analysis/license/TMF854LicenseHeader.java
URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/analysis/license/TMF854LicenseHeader.java?rev=1548837&r1=1548836&r2=1548837&view=diff
==============================================================================
--- creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/analysis/license/TMF854LicenseHeader.java
(original)
+++ creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/analysis/license/TMF854LicenseHeader.java
Sat Dec  7 10:51:09 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.TMF854;
 
 
 public class TMF854LicenseHeader extends SimplePatternBasedLicense {
@@ -28,8 +28,7 @@ public class TMF854LicenseHeader extends
     //  TMF854 Version 1.0 - Copyright TeleManagement Forum 
 
     public TMF854LicenseHeader() {
-        super(MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_TMF, 
-                MetaData.RAT_LICENSE_FAMILY_NAME_DATUM_MODIFIED_BSD_LICENSE, "BSD",
+		super(TMF854.licenseFamily(),
                 new String[]{COPYRIGHT_HEADER});
     }
 }

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=1548837&r1=1548836&r2=1548837&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:51:09 2013
@@ -65,7 +65,6 @@ public class MetaData {
     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 String RAT_LICENSE_FAMILY_CATEGORY_VALUE_TMF = "TMF  ";
 
     public static final Datum RAT_LICENSE_FAMILY_CATEGORY_DATUM_GEN = new Datum(
             RAT_URL_LICENSE_FAMILY_CATEGORY,
@@ -76,9 +75,6 @@ public class MetaData {
     public static final Datum RAT_LICENSE_FAMILY_CATEGORY_DATUM_DOJO = new Datum(
             RAT_URL_LICENSE_FAMILY_CATEGORY,
             RAT_LICENSE_FAMILY_CATEGORY_VALUE_DOJO);
-    public static final Datum RAT_LICENSE_FAMILY_CATEGORY_DATUM_TMF = new Datum(
-            RAT_URL_LICENSE_FAMILY_CATEGORY,
-            RAT_LICENSE_FAMILY_CATEGORY_VALUE_TMF);
 
     // License Family Standard Names
     public static final String RAT_URL_LICENSE_FAMILY_NAME = RAT_BASE_URL

Modified: creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/policy/DefaultPolicy.java
URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/policy/DefaultPolicy.java?rev=1548837&r1=1548836&r2=1548837&view=diff
==============================================================================
--- creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/policy/DefaultPolicy.java
(original)
+++ creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/policy/DefaultPolicy.java
Sat Dec  7 10:51:09 2013
@@ -23,6 +23,7 @@ import static org.apache.rat.api.domain.
 import static org.apache.rat.api.domain.RatLicenseFamily.CDDL1;
 import static org.apache.rat.api.domain.RatLicenseFamily.MIT;
 import static org.apache.rat.api.domain.RatLicenseFamily.OASIS;
+import static org.apache.rat.api.domain.RatLicenseFamily.TMF854;
 import static org.apache.rat.api.domain.RatLicenseFamily.W3C;
 import static org.apache.rat.api.domain.RatLicenseFamily.W3C_DOCUMENTATION;
 
@@ -38,7 +39,7 @@ public class DefaultPolicy implements ID
        private static final String[] APPROVED_LICENSES = { APACHE.getName(),
                    OASIS.getName(),
                    W3C.getName(), W3C_DOCUMENTATION.getName(),
-                   MetaData.RAT_LICENSE_FAMILY_NAME_VALUE_MODIFIED_BSD_LICENSE,
+                   TMF854.getName(),
                    MIT.getName(), CDDL1.getName(), };
 
     private static final String[] toNames(final ILicenseFamily[] approvedLicenses) {



Mime
View raw message