Child: [r22] (diff)

Download this file

FileExtension.java    99 lines (84 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
* SPDXVersion: SPDX-1.1
* Creator: Person: Nuno Brito (nuno.brito@triplecheck.de)
* Creator: Organization: TripleCheck (contact@triplecheck.de)
* Created: 2013-11-15T00:00:00Z
* LicenseName: NOASSERTION
* FileName: FileExtension.java
* FileCategory: SOURCE
* FileCopyrightText: <text> Copyright 2013 Nuno Brito, TripleCheck </text>
* FileComment: <text> This class defines an extension and how it can be
* verified accurately as a file of this extension</text>
*
* Handy link to find the MIME descriptions:
* https://gist.github.com/luislobo/6127027
*/
package script;
import java.io.File;
import java.util.Date;
import spdxlib.ContentType;
import spdxlib.FileCategory;
/**
*
* @author Nuno Brito, 15th of November 2013 in Darmstadt, Germany.
* nuno.brito@triplecheck.de | http://nunobrito.eu
*/
public class FileExtension {
String infoDataURL;
// binary or text file?
public ContentType getContentType(){
return null;
}
// Category type? Source? executable? config?
public FileCategory getCategory(){
return null;
}
// checks if the given file contains the magic signature bytes
public Boolean isApplicable(File binaryFile){
return true;
}
// checks if the content of this text file apply to a given file type
public Boolean isApplicable(String textFile){
return true;
}
// one-line description about this file type
public String getDescription(){
return null;
}
// are we collecting the information from somewhere?
public String getDescriptionURL(){
return null;
}
// are we collecting the information from someone else?
public String getDescriptionCredits(){
return null;
}
// short identifier
public String getIdentifierShort(){
return null;
}
// short identifier
public String getIdentifierLong(){
return null;
}
// who owns this file?
public String getCopyright(){
return null;
}
// version information?
public String getVersion(){
return null;
}
// MIME type?
public String getMIME(){
return null;
}
// how old is the oldest file that we have found of this kind?
public Date earliestKnownRecord(){
return null;
}
// how can we write a comment for this kind of file?
public String writeComment(){
return null;
}
}