/*
http-image - Image extensions to jdk.httpserver
Copyright (C) 2021 Ulrich Hilger
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
package de.uhilger.httpserver.image;
/**
* Eine Datei fuer Helix
*
* @author Ulrich Hilger
* @version 1, 11. Mai 2021
*/
public class Datei {
public static final String TYP_DATEI = "datei";
public static final String TYP_ORDNER = "ordner";
public static final String TK_DATEI = "icon-doc-inv";
public static final String TK_ORDNER = "icon-folder";
/*
Ergaenzt um Garfiken mit Data-URI
https://wiki.selfhtml.org/wiki/Grafik/Grafiken_mit_Data-URI
src="data:image/gif;base64,R0lGODdhEAAQAMwAAPj7+FmhUYjNfGuxYY
DJdYTIeanOpT+DOTuANXi/bGOrWj6CONzv2sPjv2CmV1unU4zPgISg6DJnJ3ImTh8Mtbs00aNP1CZSGy0YqLEn47RgXW8amasW
7XWsmmvX2iuXiwAAAAAEAAQAAAFVyAgjmRpnihqGCkpDQPbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReAS
FZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7"
Schema
data:[][;charset=][;base64],
*/
private String name;
private String pfad;
private String typ;
private String typKlasse;
private boolean bild = false;
private String miniurl;
private String imgsrc;
public String getImgSrc() {
return imgsrc;
}
public void setImgSrc(String imgSrc) {
this.imgsrc = imgSrc;
}
public String getMiniurl() {
return miniurl;
}
public void setMiniurl(String miniurl) {
this.miniurl = miniurl;
}
public String getTypKlasse() {
return typKlasse;
}
public void setTypKlasse(String typKlasse) {
this.typKlasse = typKlasse;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getTyp() {
return typ;
}
public void setTyp(String typ) {
this.typ = typ;
switch(typ) {
case TYP_DATEI:
setTypKlasse(TK_DATEI);
break;
case TYP_ORDNER:
setTypKlasse(TK_ORDNER);
break;
default:
setTypKlasse(TK_DATEI);
break;
}
}
public boolean isBild() {
return bild;
}
public void setBild(boolean istBild) {
this.bild = istBild;
}
public String getPfad() {
return pfad;
}
public void setPfad(String pfad) {
this.pfad = pfad;
}
}