diff -r d511e4bf7d8f -r 1ab5ce94a146 java/rozsirene-atributy/src/cz/frantovo/rozsireneatributy/Konfigurace.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/rozsirene-atributy/src/cz/frantovo/rozsireneatributy/Konfigurace.java Fri Dec 15 01:36:17 2023 +0100 @@ -0,0 +1,122 @@ +/** + * Rozšířené atributy – program na správu rozšířených atributů souborů + * Copyright © 2023 František Kučera (frantovo.cz) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License. + * + * 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package cz.frantovo.rozsireneatributy; + +import java.io.File; +import java.util.LinkedList; +import java.util.List; + +/** + * @author Ing. František Kučera (frantovo.cz) + */ +public class Konfigurace { + + public static class DefiniceAtributu { + + private String název; + private String popis; + private final List hodnoty = new LinkedList<>(); + + public DefiniceAtributu(String název, String popis) { + this.název = název; + this.popis = popis; + } + + public String getNázev() { + return název; + } + + public void setNázev(String název) { + this.název = název; + } + + public String getPopis() { + return popis; + } + + public void setPopis(String popis) { + this.popis = popis; + } + + public List getHodnoty() { + return hodnoty; + } + + public void addHodnota(DefiniceHodnoty hodnota) { + this.hodnoty.add(hodnota); + } + + } + + public static class DefiniceHodnoty { + + private String název; + private String popis; + + public DefiniceHodnoty(String název, String popis) { + this.název = název; + this.popis = popis; + } + + public String getNázev() { + return název; + } + + public void setNázev(String název) { + this.název = název; + } + + public String getPopis() { + return popis; + } + + public void setPopis(String popis) { + this.popis = popis; + } + } + + private File soubor; + + private boolean povinnéZamykání = false; + + private final List atributy = new LinkedList<>(); + + public File getSoubor() { + return soubor; + } + + public void setSoubor(File soubor) { + this.soubor = soubor; + } + + public boolean isPovinnéZamykání() { + return povinnéZamykání; + } + + public void setPovinnéZamykání(boolean povinnéZamykání) { + this.povinnéZamykání = povinnéZamykání; + } + + public List getAtributy() { + return atributy; + } + + public void addAtribut(DefiniceAtributu atribut) { + this.atributy.add(atribut); + } + +}