commit | author | age
|
e369b9
|
1 |
/* |
U |
2 |
fm - File management class library |
|
3 |
Copyright (C) 2024 Ulrich Hilger |
|
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/>. |
|
17 |
*/ |
|
18 |
package de.uhilger.fm; |
|
19 |
|
|
20 |
/** |
|
21 |
* Datei-Referenz |
|
22 |
* |
|
23 |
* @author Ulrich Hilger |
|
24 |
* @version 1, 11. Mai 2021 |
|
25 |
*/ |
|
26 |
public class Datei { |
|
27 |
|
|
28 |
public static final String TYP_DATEI = "datei"; |
|
29 |
public static final String TYP_ORDNER = "ordner"; |
|
30 |
|
|
31 |
public static final String TK_DATEI = "icon-doc-inv"; |
|
32 |
public static final String TK_ORDNER = "icon-folder"; |
|
33 |
|
|
34 |
/* |
|
35 |
|
|
36 |
Ergaenzt um Garfiken mit Data-URI |
|
37 |
https://wiki.selfhtml.org/wiki/Grafik/Grafiken_mit_Data-URI |
|
38 |
|
|
39 |
src="data:image/gif;base64,R0lGODdhEAAQAMwAAPj7+FmhUYjNfGuxYY |
|
40 |
DJdYTIeanOpT+DOTuANXi/bGOrWj6CONzv2sPjv2CmV1unU4zPgISg6DJnJ3ImTh8Mtbs00aNP1CZSGy0YqLEn47RgXW8amasW |
|
41 |
7XWsmmvX2iuXiwAAAAAEAAQAAAFVyAgjmRpnihqGCkpDQPbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReAS |
|
42 |
FZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7" |
|
43 |
|
|
44 |
Schema |
|
45 |
data:[<mime type>][;charset=<Zeichensatz>][;base64],<Daten> |
|
46 |
|
|
47 |
*/ |
|
48 |
|
|
49 |
private String name; |
|
50 |
//private String pfad; |
|
51 |
private String typ; |
|
52 |
private String typKlasse; |
|
53 |
private boolean bild = false; |
|
54 |
private String miniurl; |
|
55 |
private String imgsrc; |
|
56 |
|
|
57 |
public String getImgSrc() { |
|
58 |
return imgsrc; |
|
59 |
} |
|
60 |
|
|
61 |
public void setImgSrc(String imgSrc) { |
|
62 |
this.imgsrc = imgSrc; |
|
63 |
} |
|
64 |
|
|
65 |
|
|
66 |
public String getMiniurl() { |
|
67 |
return miniurl; |
|
68 |
} |
|
69 |
|
|
70 |
public void setMiniurl(String miniurl) { |
|
71 |
this.miniurl = miniurl; |
|
72 |
} |
|
73 |
|
|
74 |
public String getTypKlasse() { |
|
75 |
return typKlasse; |
|
76 |
} |
|
77 |
|
|
78 |
public void setTypKlasse(String typKlasse) { |
|
79 |
this.typKlasse = typKlasse; |
|
80 |
} |
|
81 |
|
|
82 |
public String getName() { |
|
83 |
return name; |
|
84 |
} |
|
85 |
|
|
86 |
public void setName(String name) { |
|
87 |
this.name = name; |
|
88 |
} |
|
89 |
|
|
90 |
public String getTyp() { |
|
91 |
return typ; |
|
92 |
} |
|
93 |
|
|
94 |
public void setTyp(String typ) { |
|
95 |
this.typ = typ; |
|
96 |
switch(typ) { |
|
97 |
case TYP_DATEI: |
|
98 |
setTypKlasse(TK_DATEI); |
|
99 |
break; |
|
100 |
case TYP_ORDNER: |
|
101 |
setTypKlasse(TK_ORDNER); |
|
102 |
break; |
|
103 |
default: |
|
104 |
setTypKlasse(TK_DATEI); |
|
105 |
break; |
|
106 |
} |
|
107 |
} |
|
108 |
|
|
109 |
public boolean isBild() { |
|
110 |
return bild; |
|
111 |
} |
|
112 |
|
|
113 |
public void setBild(boolean istBild) { |
|
114 |
this.bild = istBild; |
|
115 |
} |
|
116 |
|
|
117 |
//public String getPfad() { |
|
118 |
// return pfad; |
|
119 |
//} |
|
120 |
|
|
121 |
//public void setPfad(String pfad) { |
|
122 |
// this.pfad = pfad; |
|
123 |
//} |
|
124 |
|
|
125 |
|
|
126 |
|
|
127 |
|
|
128 |
} |