franta-hg@20: package cz.frantovo.langtable; franta-hg@20: franta-hg@20: import java.util.List; franta-hg@20: import javax.xml.bind.annotation.XmlElement; franta-hg@20: import javax.xml.bind.annotation.XmlElementWrapper; franta-hg@20: import javax.xml.bind.annotation.XmlRootElement; franta-hg@20: franta-hg@20: /** franta-hg@20: * franta-hg@20: * @author Ing. František Kučera (frantovo.cz) franta-hg@20: */ franta-hg@20: @XmlRootElement franta-hg@20: public class Keyboards { franta-hg@20: franta-hg@20: private List keyboards; franta-hg@20: franta-hg@20: @XmlElement(name = "keyboard") franta-hg@20: public List getKeyboards() { franta-hg@20: return keyboards; franta-hg@20: } franta-hg@20: franta-hg@20: public void setKeyboards(List keyboards) { franta-hg@20: this.keyboards = keyboards; franta-hg@20: } franta-hg@20: franta-hg@20: public static class Keyboard { franta-hg@20: franta-hg@20: private String id; franta-hg@20: private String description; franta-hg@20: private String comment; franta-hg@20: private boolean ascii; franta-hg@20: private List languages; franta-hg@20: private List territories; franta-hg@20: franta-hg@20: @XmlElement(name = "keyboardId") franta-hg@20: public String getId() { franta-hg@20: return id; franta-hg@20: } franta-hg@20: franta-hg@20: public void setId(String id) { franta-hg@20: this.id = id; franta-hg@20: } franta-hg@20: franta-hg@20: @XmlElement franta-hg@20: public String getDescription() { franta-hg@20: return description; franta-hg@20: } franta-hg@20: franta-hg@20: public void setDescription(String description) { franta-hg@20: this.description = description; franta-hg@20: } franta-hg@20: franta-hg@20: @XmlElement franta-hg@20: public String getComment() { franta-hg@20: return comment; franta-hg@20: } franta-hg@20: franta-hg@20: public void setComment(String comment) { franta-hg@20: this.comment = comment; franta-hg@20: } franta-hg@20: franta-hg@20: @XmlElement franta-hg@20: public boolean isAscii() { franta-hg@20: return ascii; franta-hg@20: } franta-hg@20: franta-hg@20: public void setAscii(boolean ascii) { franta-hg@20: this.ascii = ascii; franta-hg@20: } franta-hg@20: franta-hg@20: @XmlElement(name = "language") franta-hg@20: @XmlElementWrapper(name = "languages") franta-hg@20: public List getLanguages() { franta-hg@20: return languages; franta-hg@20: } franta-hg@20: franta-hg@20: public void setLanguages(List languages) { franta-hg@20: this.languages = languages; franta-hg@20: } franta-hg@20: franta-hg@20: @XmlElement(name = "territory") franta-hg@20: @XmlElementWrapper(name = "territories") franta-hg@20: public List getTerritories() { franta-hg@20: return territories; franta-hg@20: } franta-hg@20: franta-hg@20: public void setTerritories(List territories) { franta-hg@20: this.territories = territories; franta-hg@20: } franta-hg@20: } franta-hg@20: franta-hg@20: public static class Language { franta-hg@20: franta-hg@20: private String id; franta-hg@20: private int rank; franta-hg@20: franta-hg@20: @XmlElement(name = "languageId") franta-hg@20: public String getId() { franta-hg@20: return id; franta-hg@20: } franta-hg@20: franta-hg@20: public void setId(String id) { franta-hg@20: this.id = id; franta-hg@20: } franta-hg@20: franta-hg@20: @XmlElement franta-hg@20: public int getRank() { franta-hg@20: return rank; franta-hg@20: } franta-hg@20: franta-hg@20: public void setRank(int rank) { franta-hg@20: this.rank = rank; franta-hg@20: } franta-hg@20: franta-hg@20: @Override franta-hg@20: public String toString() { franta-hg@20: return getId() + " (" + getRank() + ")"; franta-hg@20: } franta-hg@20: } franta-hg@20: franta-hg@20: public static class Territory { franta-hg@20: franta-hg@20: private String id; franta-hg@20: private int rank; franta-hg@20: franta-hg@20: @XmlElement(name = "territoryId") franta-hg@20: public String getId() { franta-hg@20: return id; franta-hg@20: } franta-hg@20: franta-hg@20: public void setId(String id) { franta-hg@20: this.id = id; franta-hg@20: } franta-hg@20: franta-hg@20: @XmlElement franta-hg@20: public int getRank() { franta-hg@20: return rank; franta-hg@20: } franta-hg@20: franta-hg@20: public void setRank(int rank) { franta-hg@20: this.rank = rank; franta-hg@20: } franta-hg@20: franta-hg@20: @Override franta-hg@20: public String toString() { franta-hg@20: return getId() + " (" + getRank() + ")"; franta-hg@20: } franta-hg@20: } franta-hg@20: }