author | František Kučera <franta-hg@frantovo.cz> |
Sat, 16 Dec 2023 20:13:13 +0100 | |
branch | v_0 |
changeset 39 | ec0e970e0830 |
parent 31 | java/rozsirene-atributy/src/cz/frantovo/rozsireneatributy/Konfigurace.java@1ab5ce94a146 |
child 42 | d2414701ce09 |
permissions | -rw-r--r-- |
franta-hg@31 | 1 |
/** |
franta-hg@31 | 2 |
* Rozšířené atributy – program na správu rozšířených atributů souborů |
franta-hg@31 | 3 |
* Copyright © 2023 František Kučera (frantovo.cz) |
franta-hg@31 | 4 |
* |
franta-hg@31 | 5 |
* This program is free software: you can redistribute it and/or modify |
franta-hg@31 | 6 |
* it under the terms of the GNU General Public License as published by |
franta-hg@31 | 7 |
* the Free Software Foundation, either version 3 of the License. |
franta-hg@31 | 8 |
* |
franta-hg@31 | 9 |
* This program is distributed in the hope that it will be useful, |
franta-hg@31 | 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
franta-hg@31 | 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
franta-hg@31 | 12 |
* GNU General Public License for more details. |
franta-hg@31 | 13 |
* |
franta-hg@31 | 14 |
* You should have received a copy of the GNU General Public License |
franta-hg@31 | 15 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
franta-hg@31 | 16 |
*/ |
franta-hg@31 | 17 |
package cz.frantovo.rozsireneatributy; |
franta-hg@31 | 18 |
|
franta-hg@31 | 19 |
import java.io.File; |
franta-hg@31 | 20 |
import java.util.LinkedList; |
franta-hg@31 | 21 |
import java.util.List; |
franta-hg@31 | 22 |
|
franta-hg@31 | 23 |
/** |
franta-hg@31 | 24 |
* @author Ing. František Kučera (frantovo.cz) |
franta-hg@31 | 25 |
*/ |
franta-hg@31 | 26 |
public class Konfigurace { |
franta-hg@31 | 27 |
|
franta-hg@31 | 28 |
public static class DefiniceAtributu { |
franta-hg@31 | 29 |
|
franta-hg@31 | 30 |
private String název; |
franta-hg@31 | 31 |
private String popis; |
franta-hg@31 | 32 |
private final List<DefiniceHodnoty> hodnoty = new LinkedList<>(); |
franta-hg@31 | 33 |
|
franta-hg@31 | 34 |
public DefiniceAtributu(String název, String popis) { |
franta-hg@31 | 35 |
this.název = název; |
franta-hg@31 | 36 |
this.popis = popis; |
franta-hg@31 | 37 |
} |
franta-hg@31 | 38 |
|
franta-hg@31 | 39 |
public String getNázev() { |
franta-hg@31 | 40 |
return název; |
franta-hg@31 | 41 |
} |
franta-hg@31 | 42 |
|
franta-hg@31 | 43 |
public void setNázev(String název) { |
franta-hg@31 | 44 |
this.název = název; |
franta-hg@31 | 45 |
} |
franta-hg@31 | 46 |
|
franta-hg@31 | 47 |
public String getPopis() { |
franta-hg@31 | 48 |
return popis; |
franta-hg@31 | 49 |
} |
franta-hg@31 | 50 |
|
franta-hg@31 | 51 |
public void setPopis(String popis) { |
franta-hg@31 | 52 |
this.popis = popis; |
franta-hg@31 | 53 |
} |
franta-hg@31 | 54 |
|
franta-hg@31 | 55 |
public List<DefiniceHodnoty> getHodnoty() { |
franta-hg@31 | 56 |
return hodnoty; |
franta-hg@31 | 57 |
} |
franta-hg@31 | 58 |
|
franta-hg@31 | 59 |
public void addHodnota(DefiniceHodnoty hodnota) { |
franta-hg@31 | 60 |
this.hodnoty.add(hodnota); |
franta-hg@31 | 61 |
} |
franta-hg@31 | 62 |
|
franta-hg@31 | 63 |
} |
franta-hg@31 | 64 |
|
franta-hg@31 | 65 |
public static class DefiniceHodnoty { |
franta-hg@31 | 66 |
|
franta-hg@31 | 67 |
private String název; |
franta-hg@31 | 68 |
private String popis; |
franta-hg@31 | 69 |
|
franta-hg@31 | 70 |
public DefiniceHodnoty(String název, String popis) { |
franta-hg@31 | 71 |
this.název = název; |
franta-hg@31 | 72 |
this.popis = popis; |
franta-hg@31 | 73 |
} |
franta-hg@31 | 74 |
|
franta-hg@31 | 75 |
public String getNázev() { |
franta-hg@31 | 76 |
return název; |
franta-hg@31 | 77 |
} |
franta-hg@31 | 78 |
|
franta-hg@31 | 79 |
public void setNázev(String název) { |
franta-hg@31 | 80 |
this.název = název; |
franta-hg@31 | 81 |
} |
franta-hg@31 | 82 |
|
franta-hg@31 | 83 |
public String getPopis() { |
franta-hg@31 | 84 |
return popis; |
franta-hg@31 | 85 |
} |
franta-hg@31 | 86 |
|
franta-hg@31 | 87 |
public void setPopis(String popis) { |
franta-hg@31 | 88 |
this.popis = popis; |
franta-hg@31 | 89 |
} |
franta-hg@31 | 90 |
} |
franta-hg@31 | 91 |
|
franta-hg@31 | 92 |
private File soubor; |
franta-hg@31 | 93 |
|
franta-hg@31 | 94 |
private boolean povinnéZamykání = false; |
franta-hg@31 | 95 |
|
franta-hg@31 | 96 |
private final List<DefiniceAtributu> atributy = new LinkedList<>(); |
franta-hg@31 | 97 |
|
franta-hg@31 | 98 |
public File getSoubor() { |
franta-hg@31 | 99 |
return soubor; |
franta-hg@31 | 100 |
} |
franta-hg@31 | 101 |
|
franta-hg@31 | 102 |
public void setSoubor(File soubor) { |
franta-hg@31 | 103 |
this.soubor = soubor; |
franta-hg@31 | 104 |
} |
franta-hg@31 | 105 |
|
franta-hg@31 | 106 |
public boolean isPovinnéZamykání() { |
franta-hg@31 | 107 |
return povinnéZamykání; |
franta-hg@31 | 108 |
} |
franta-hg@31 | 109 |
|
franta-hg@31 | 110 |
public void setPovinnéZamykání(boolean povinnéZamykání) { |
franta-hg@31 | 111 |
this.povinnéZamykání = povinnéZamykání; |
franta-hg@31 | 112 |
} |
franta-hg@31 | 113 |
|
franta-hg@31 | 114 |
public List<DefiniceAtributu> getAtributy() { |
franta-hg@31 | 115 |
return atributy; |
franta-hg@31 | 116 |
} |
franta-hg@31 | 117 |
|
franta-hg@31 | 118 |
public void addAtribut(DefiniceAtributu atribut) { |
franta-hg@31 | 119 |
this.atributy.add(atribut); |
franta-hg@31 | 120 |
} |
franta-hg@31 | 121 |
|
franta-hg@31 | 122 |
} |