-
Notifications
You must be signed in to change notification settings - Fork 0
/
Document.java
82 lines (73 loc) · 1.49 KB
/
Document.java
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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Analyzing;
import java.io.File;
import java.nio.file.Path;
/**
* This Class is basically a simplified version of the File class that it holds.
*
* @author rl07bebb
*/
public class Document {
private File file;
private String docId;
private long size;
/**
* This Constructor is used to build a Document.
*
* @param file
* @param s
* @param i
*/
public Document(File file, String s, long i) {
this.file = file;
docId = s;
size = i;
}
/**
* This Constructor is used to build a Document.
*
* @param s
*/
public Document(String s) {
docId = s;
size = s.length();
}
/**
* This Constructor is used to build a Document.
*
* @param file
*/
public Document(File file) {
this.file = file;
docId = file.getName();
size = file.length();
}
/**
* This method gets the DocId
*
* @return
*/
public String getDocID() {
return docId;
}
/**
* This method gets the File
*
* @return
*/
public File getFile() {
return file;
}
/**
* This method gets the Path
*
* @return
*/
public String getPath() {
return file.getPath();
}
}