Child: [r22] (diff)

Download this file

License.java    83 lines (66 with data), 2.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
* SPDXVersion: SPDX-1.1
* Creator: Person: Nuno Brito (nuno.brito@triplecheck.de)
* Creator: Organization: TripleCheck (contact@triplecheck.de)
* Created: 2013-11-14T00:00:00Z
* LicenseName: NOASSERTION
* FileName: License.java
* FileType: SOURCE
* FileCopyrightText: <text> Copyright 2013 Nuno Brito, TripleCheck </text>
* FileComment: <text> In UK English, please read "Licence" where applicable.
* To ease distincion and avoid confusions, "License" in the US meaning is used
* for all cases. This class is used as a template for defining scripts that
* will try to detect applicable licenses.
*
* Whenever possible, we use the SPDX definition for a given license as
* available from
* </text>
*/
package script;
import java.io.File;
import java.util.Date;
/**
*
* @author Nuno Brito, 14th of November 2013 in Darmstadt, Germany.
* nuno.brito@triplecheck.de | http://nunobrito.eu
*/
public interface License {
public File
thisFile = null, // pointer to this beanshell file being executed
thisDir = null; // pointer to the beanshell directory on disk
/**
* Verifies if the provided text applies to the triggers that
* included on this license.
* @param text Text to be analysed
* @return
*/
public Boolean isApplicable(String text);
/**
* Verifies if the provided file apply to the triggers that
* are included on this license.
* @param file Pointer the file on disk
* @return
*/
public Boolean isApplicable(File file);
/**
* How this file should be identified. Use the SPDX identifier when possible
* @return Short text identiyfing the license name
*/
public String getShortIdentifier();
/**
* From where it is possible to download a text file with this license.
* If not possible to download a text file, at least some web page where
* the license terms are specified
* @return Internet address pointing to the text file (when possible)
*/
public String getURL();
// the types of file formats that are supported on detection
public Boolean supportsBinaries();
public Boolean supportsTextFiles();
// when was this license published
public Date getDatePublished();
public String getFullName();
// a short getQuickSummary about the license
public String getQuickSummary();
public String getQuickSummaryLink();
}