java/LangTable/src/cz/frantovo/langtable/Keyboards.java
author František Kučera <franta-hg@frantovo.cz>
Mon, 21 Nov 2016 22:48:29 +0100
changeset 43 b54d76467040
parent 20 63b496ae04f9
permissions -rw-r--r--
libevent: řetězec/buffer musí být pro použití jako string ukončen \0
franta-hg@20
     1
package cz.frantovo.langtable;
franta-hg@20
     2
franta-hg@20
     3
import java.util.List;
franta-hg@20
     4
import javax.xml.bind.annotation.XmlElement;
franta-hg@20
     5
import javax.xml.bind.annotation.XmlElementWrapper;
franta-hg@20
     6
import javax.xml.bind.annotation.XmlRootElement;
franta-hg@20
     7
franta-hg@20
     8
/**
franta-hg@20
     9
 *
franta-hg@20
    10
 * @author Ing. František Kučera (frantovo.cz)
franta-hg@20
    11
 */
franta-hg@20
    12
@XmlRootElement
franta-hg@20
    13
public class Keyboards {
franta-hg@20
    14
franta-hg@20
    15
	private List<Keyboard> keyboards;
franta-hg@20
    16
franta-hg@20
    17
	@XmlElement(name = "keyboard")
franta-hg@20
    18
	public List<Keyboard> getKeyboards() {
franta-hg@20
    19
		return keyboards;
franta-hg@20
    20
	}
franta-hg@20
    21
franta-hg@20
    22
	public void setKeyboards(List<Keyboard> keyboards) {
franta-hg@20
    23
		this.keyboards = keyboards;
franta-hg@20
    24
	}
franta-hg@20
    25
franta-hg@20
    26
	public static class Keyboard {
franta-hg@20
    27
franta-hg@20
    28
		private String id;
franta-hg@20
    29
		private String description;
franta-hg@20
    30
		private String comment;
franta-hg@20
    31
		private boolean ascii;
franta-hg@20
    32
		private List<Language> languages;
franta-hg@20
    33
		private List<Territory> territories;
franta-hg@20
    34
franta-hg@20
    35
		@XmlElement(name = "keyboardId")
franta-hg@20
    36
		public String getId() {
franta-hg@20
    37
			return id;
franta-hg@20
    38
		}
franta-hg@20
    39
franta-hg@20
    40
		public void setId(String id) {
franta-hg@20
    41
			this.id = id;
franta-hg@20
    42
		}
franta-hg@20
    43
franta-hg@20
    44
		@XmlElement
franta-hg@20
    45
		public String getDescription() {
franta-hg@20
    46
			return description;
franta-hg@20
    47
		}
franta-hg@20
    48
franta-hg@20
    49
		public void setDescription(String description) {
franta-hg@20
    50
			this.description = description;
franta-hg@20
    51
		}
franta-hg@20
    52
franta-hg@20
    53
		@XmlElement
franta-hg@20
    54
		public String getComment() {
franta-hg@20
    55
			return comment;
franta-hg@20
    56
		}
franta-hg@20
    57
franta-hg@20
    58
		public void setComment(String comment) {
franta-hg@20
    59
			this.comment = comment;
franta-hg@20
    60
		}
franta-hg@20
    61
franta-hg@20
    62
		@XmlElement
franta-hg@20
    63
		public boolean isAscii() {
franta-hg@20
    64
			return ascii;
franta-hg@20
    65
		}
franta-hg@20
    66
franta-hg@20
    67
		public void setAscii(boolean ascii) {
franta-hg@20
    68
			this.ascii = ascii;
franta-hg@20
    69
		}
franta-hg@20
    70
franta-hg@20
    71
		@XmlElement(name = "language")
franta-hg@20
    72
		@XmlElementWrapper(name = "languages")
franta-hg@20
    73
		public List<Language> getLanguages() {
franta-hg@20
    74
			return languages;
franta-hg@20
    75
		}
franta-hg@20
    76
franta-hg@20
    77
		public void setLanguages(List<Language> languages) {
franta-hg@20
    78
			this.languages = languages;
franta-hg@20
    79
		}
franta-hg@20
    80
franta-hg@20
    81
		@XmlElement(name = "territory")
franta-hg@20
    82
		@XmlElementWrapper(name = "territories")
franta-hg@20
    83
		public List<Territory> getTerritories() {
franta-hg@20
    84
			return territories;
franta-hg@20
    85
		}
franta-hg@20
    86
franta-hg@20
    87
		public void setTerritories(List<Territory> territories) {
franta-hg@20
    88
			this.territories = territories;
franta-hg@20
    89
		}
franta-hg@20
    90
	}
franta-hg@20
    91
franta-hg@20
    92
	public static class Language {
franta-hg@20
    93
franta-hg@20
    94
		private String id;
franta-hg@20
    95
		private int rank;
franta-hg@20
    96
franta-hg@20
    97
		@XmlElement(name = "languageId")
franta-hg@20
    98
		public String getId() {
franta-hg@20
    99
			return id;
franta-hg@20
   100
		}
franta-hg@20
   101
franta-hg@20
   102
		public void setId(String id) {
franta-hg@20
   103
			this.id = id;
franta-hg@20
   104
		}
franta-hg@20
   105
franta-hg@20
   106
		@XmlElement
franta-hg@20
   107
		public int getRank() {
franta-hg@20
   108
			return rank;
franta-hg@20
   109
		}
franta-hg@20
   110
franta-hg@20
   111
		public void setRank(int rank) {
franta-hg@20
   112
			this.rank = rank;
franta-hg@20
   113
		}
franta-hg@20
   114
franta-hg@20
   115
		@Override
franta-hg@20
   116
		public String toString() {
franta-hg@20
   117
			return getId() + " (" + getRank() + ")";
franta-hg@20
   118
		}
franta-hg@20
   119
	}
franta-hg@20
   120
franta-hg@20
   121
	public static class Territory {
franta-hg@20
   122
franta-hg@20
   123
		private String id;
franta-hg@20
   124
		private int rank;
franta-hg@20
   125
franta-hg@20
   126
		@XmlElement(name = "territoryId")
franta-hg@20
   127
		public String getId() {
franta-hg@20
   128
			return id;
franta-hg@20
   129
		}
franta-hg@20
   130
franta-hg@20
   131
		public void setId(String id) {
franta-hg@20
   132
			this.id = id;
franta-hg@20
   133
		}
franta-hg@20
   134
franta-hg@20
   135
		@XmlElement
franta-hg@20
   136
		public int getRank() {
franta-hg@20
   137
			return rank;
franta-hg@20
   138
		}
franta-hg@20
   139
franta-hg@20
   140
		public void setRank(int rank) {
franta-hg@20
   141
			this.rank = rank;
franta-hg@20
   142
		}
franta-hg@20
   143
franta-hg@20
   144
		@Override
franta-hg@20
   145
		public String toString() {
franta-hg@20
   146
			return getId() + " (" + getRank() + ")";
franta-hg@20
   147
		}
franta-hg@20
   148
	}
franta-hg@20
   149
}