1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.rat.anttasks;
20
21 import org.apache.rat.DeprecationReporter;
22 import org.apache.rat.license.ILicense;
23 import org.apache.rat.license.ILicenseFamily;
24
25 import java.util.SortedSet;
26
27 import org.apache.rat.analysis.IHeaderMatcher;
28
29
30
31
32
33 @Deprecated
34 @DeprecationReporter.Info(since = "0.17", forRemoval = true, use = "Configuration file and <config> element")
35 public class License {
36
37 private final ILicense.Builder builder = ILicense.builder();
38
39 ILicense.Builder asBuilder() {
40 return builder;
41 }
42
43 public ILicense build(SortedSet<ILicenseFamily> context) {
44 return builder.setLicenseFamilies(context).build();
45 }
46
47 public void setNotes(String notes) {
48 builder.setNote(notes);
49 }
50
51 public void addNotes(String notes) {
52 builder.setNote(notes);
53 }
54
55
56 public void setFamily(String licenseFamilyCategory) {
57 builder.setFamily(licenseFamilyCategory);
58 }
59
60 public void setId(String id) {
61 builder.setId(id);
62 }
63
64 public void setName(String name) {
65 builder.setName(name);
66 }
67
68 public void add(IHeaderMatcher.Builder builder) {
69 this.builder.setMatcher(builder);
70 }
71
72 public void add(IHeaderMatcher matcher) {
73 this.builder.setMatcher(matcher);
74 }
75 }