View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.rat.api.domain;
20  
21  /**
22   * Licenses are grouped into families. Each family has similar legal semantics,
23   * though some small details may differ.
24   * <p>
25   * For example, the <a href='http://opensource.org/licenses/BSD-3-Clause'>3
26   * clause BSD license</a> is in a family where members differ by &lt;OWNER&gt;,
27   * &lt;ORGANIZATION&gt; and &lt;YEAR&gt; parameters.
28   * 
29   */
30  public final class LicenseFamily {
31  
32      /**
33       * Further information associated with the license family. Human readable.
34       * Possibly null.
35       */
36      private final String notes;
37      /**
38       * Names of the category containing this license family. Choosing a suitable
39       * URI is recommended. Possibly null;
40       */
41      private final String category;
42      /**
43       * Uniquely identifies this family. Choosing a suitable URI is recommended.
44       * Not null.
45       */
46      private final String name;
47  
48      /**
49       * Constructs an immutable license family.
50       * 
51       * @param name
52       *            the name uniquely identifying this family. Recommended that
53       *            this be an URI. Not null.
54       * @param category
55       *            the name of the category containing this license family.
56       *            Recommended that this be an URI. Possibly null.
57       * @param notes
58       *            further information associated with the license family. Human
59       *            readable. Possibly null.
60       */
61      public LicenseFamily(final String name, final String category,
62              final String notes) {
63          super();
64          this.notes = notes;
65          this.category = category;
66          this.name = name;
67      }
68  
69      /**
70       * Gets further information associated with the license family. Human
71       * readable.
72       * 
73       * @return possibly null
74       */
75      public String getNotes() {
76          return this.notes;
77      }
78  
79      /**
80       * Gets the name of the category containing this license family. Recommended
81       * that this be an URI.
82       * 
83       * @return possibly null
84       */
85      public String getCategory() {
86          return this.category;
87      }
88  
89      /**
90       * Gets the name uniquely identifying this family. Recommended that this be
91       * an URI.
92       * 
93       * @return not null
94       */
95      public String getName() {
96          return this.name;
97      }
98  
99  }