Author: rdonkin
Date: Fri Dec 6 19:14:45 2013
New Revision: 1548675
URL: http://svn.apache.org/r1548675
Log:
Some javadocs
Modified:
creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamily.java
creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamilyBuilder.java
Modified:
creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamily.java
URL:
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamily.java?rev=1548675&r1=1548674&r2=1548675&view=diff
==============================================================================
---
creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamily.java
(original)
+++
creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamily.java
Fri Dec 6 19:14:45 2013
@@ -18,12 +18,46 @@
*/
package org.apache.rat.api.domain;
+/**
+ * Licenses are grouped into families. Each family has similar legal semantics,
+ * though some small details may differ.
+ * <p/>
+ * For example, the <a href='http://opensource.org/licenses/BSD-3-Clause'>3
+ * clause BSD license</a> is in a family where members differ by <OWNER>,
+ * <ORGANIZATION> and <YEAR> parameters.
+ *
+ */
public final class LicenseFamily {
+ /**
+ * Further information associated with the license family. Human readable.
+ * Possibly null.
+ */
private final String notes;
+ /**
+ * Names of the category containing this license family. Choosing a
suitable
+ * URI is recommended. Possibly null;
+ */
private final String category;
+ /**
+ * Uniquely identifies this family. Choosing a suitable URI is recommended.
+ * Not null.
+ */
private final String name;
+ /**
+ * Constructs an immutable license family.
+ *
+ * @param notes
+ * further information associated with the license family. Human
+ * readable. Possibly null.
+ * @param category
+ * the name of the category containing this license family.
+ * Recommended that this be an URI. Possibly null.
+ * @param name
+ * the name uniquely identifying this family. Recommended that
+ * this be an URI. Not null.
+ */
public LicenseFamily(final String notes, final String category,
final String name) {
super();
@@ -32,14 +66,32 @@ public final class LicenseFamily {
this.name = name;
}
+ /**
+ * Gets further information associated with the license family. Human
+ * readable.
+ *
+ * @return possibly null
+ */
public String getNotes() {
return this.notes;
}
+ /**
+ * Gets the name of the category containing this license family.
Recommended
+ * that this be an URI.
+ *
+ * @return possibly null
+ */
public String getCategory() {
return this.category;
}
+ /**
+ * Gets the name uniquely identifying this family. Recommended that this be
+ * an URI.
+ *
+ * @return not null
+ */
public String getName() {
return this.name;
}
Modified:
creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamilyBuilder.java
URL:
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamilyBuilder.java?rev=1548675&r1=1548674&r2=1548675&view=diff
==============================================================================
---
creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamilyBuilder.java
(original)
+++
creadur/rat/branches/gsoc/apache-rat-api/src/main/java/org/apache/rat/api/domain/LicenseFamilyBuilder.java
Fri Dec 6 19:14:45 2013
@@ -18,34 +18,77 @@
*/
package org.apache.rat.api.domain;
+/**
+ * Builds {@link LicenseFamily} instances.
+ */
public final class LicenseFamilyBuilder {
+ /**
+ * Begins to build a license family.
+ *
+ * @return a builder for a license family, not null
+ */
public static LicenseFamilyBuilder aLicenseFamily() {
-
return new LicenseFamilyBuilder();
}
+ /** Further information associated with the license family. Human
readable. */
private String notes;
+ /**
+ * Names of the category containing this license family. Recommended that
+ * this be an URI.
+ */
private String category;
+ /** Uniquely identifies this family. Choosing a suitable URI is
recommended */
private String name;
+ /** Use {@link #aLicenseFamily() */
private LicenseFamilyBuilder() {
}
+ /**
+ * Builds family with further information associated with the license
+ * family. Human readable.
+ *
+ * @param notes
+ * possibly null
+ * @return this instance, not null
+ */
public LicenseFamilyBuilder withNotes(final String notes) {
this.notes = notes;
return this;
}
+ /**
+ * Builds a family.
+ *
+ * @return not null
+ */
public LicenseFamily build() {
return new LicenseFamily(this.notes, this.category, this.name);
}
+ /**
+ * Builds family with category containing this license family. Choosing a
+ * suitable URI is recommended
+ *
+ * @param category
+ * possible null
+ * @return this instance, not null
+ */
public LicenseFamilyBuilder withCategory(final String category) {
this.category = category;
return this;
}
+ /**
+ *
+ * Uniquely identifies this family. Choosing a suitable URI is recommended.
+ *
+ * @param name
+ * not null
+ * @return this instance, not null
+ */
public LicenseFamilyBuilder withName(final String name) {
this.name = name;
return this;