commit | author | age
|
86bbf7
|
1 |
/* |
94b1c2
|
2 |
Tango - Personal Media Center |
90d368
|
3 |
Copyright (C) 2021 Ulrich Hilger |
U |
4 |
|
|
5 |
This program is free software: you can redistribute it and/or modify |
|
6 |
it under the terms of the GNU Affero General Public License as |
|
7 |
published by the Free Software Foundation, either version 3 of the |
|
8 |
License, or (at your option) any later version. |
|
9 |
|
|
10 |
This program is distributed in the hope that it will be useful, |
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
GNU Affero General Public License for more details. |
|
14 |
|
|
15 |
You should have received a copy of the GNU Affero General Public License |
|
16 |
along with this program. If not, see <https://www.gnu.org/licenses/>. |
86bbf7
|
17 |
*/ |
94b1c2
|
18 |
package de.uhilger.tango.store; |
86bbf7
|
19 |
|
d4d091
|
20 |
import java.util.Objects; |
U |
21 |
|
86bbf7
|
22 |
/** |
U |
23 |
* |
|
24 |
* @author ulrich |
|
25 |
*/ |
|
26 |
public class StorageFile { |
822ddf
|
27 |
|
U |
28 |
public static final String TYP_FOLDER = "folder"; |
|
29 |
public static final String TYP_FILE = "file"; |
7c22a2
|
30 |
public static final String TYP_AUDIO = "audio"; |
U |
31 |
public static final String TYP_VIDEO = "video"; |
a1333d
|
32 |
public static final String TYP_FOTO = "foto"; |
90d368
|
33 |
public static final String TYP_KATALOG = "katalog"; |
822ddf
|
34 |
|
86bbf7
|
35 |
private String name; |
U |
36 |
private String typ; |
37eadf
|
37 |
private String interpret = ""; |
U |
38 |
private String titelAnzName = ""; |
|
39 |
private String album = ""; |
86bbf7
|
40 |
|
U |
41 |
public String getName() { |
|
42 |
return name; |
|
43 |
} |
|
44 |
|
|
45 |
public void setName(String name) { |
|
46 |
this.name = name; |
|
47 |
} |
|
48 |
|
|
49 |
public String getTyp() { |
|
50 |
return typ; |
|
51 |
} |
|
52 |
|
|
53 |
public void setTyp(String typ) { |
|
54 |
this.typ = typ; |
|
55 |
} |
37eadf
|
56 |
|
U |
57 |
public String getInterpret() { |
|
58 |
return interpret; |
|
59 |
} |
|
60 |
|
|
61 |
public void setInterpret(String ip) { |
|
62 |
if(ip != null) { |
|
63 |
this.interpret = ip; |
|
64 |
} |
|
65 |
} |
|
66 |
|
|
67 |
public String getTitelAnzName() { |
|
68 |
return titelAnzName; |
|
69 |
} |
|
70 |
|
|
71 |
public void setTitelAnzName(String tan) { |
|
72 |
if(tan != null) { |
b56bb3
|
73 |
this.titelAnzName = tan; |
37eadf
|
74 |
} |
U |
75 |
} |
|
76 |
|
|
77 |
public String getAlbum() { |
|
78 |
return album; |
|
79 |
} |
|
80 |
|
|
81 |
public void setAlbum(String a) { |
|
82 |
if(a != null) { |
|
83 |
this.album = a; |
|
84 |
} |
|
85 |
} |
|
86 |
|
d4d091
|
87 |
@Override |
U |
88 |
public String toString() { |
|
89 |
return "StorageFile{" + "name=" + name + '}'; |
|
90 |
} |
|
91 |
|
|
92 |
@Override |
|
93 |
public int hashCode() { |
|
94 |
int hash = 3; |
|
95 |
return hash; |
|
96 |
} |
|
97 |
|
|
98 |
@Override |
|
99 |
public boolean equals(Object obj) { |
|
100 |
if (this == obj) { |
|
101 |
return true; |
|
102 |
} |
|
103 |
if (obj == null) { |
|
104 |
return false; |
|
105 |
} |
|
106 |
if (getClass() != obj.getClass()) { |
|
107 |
return false; |
|
108 |
} |
|
109 |
final StorageFile other = (StorageFile) obj; |
|
110 |
if (!Objects.equals(this.name, other.name)) { |
|
111 |
return false; |
|
112 |
} |
|
113 |
return true; |
|
114 |
} |
|
115 |
|
|
116 |
|
86bbf7
|
117 |
|
U |
118 |
} |