diff -r 000000000000 -r 5378f8dc8fa9 java/nekurak.net-lib/src/cz/frantovo/nekurak/xml/ClanekXML.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/xml/ClanekXML.java Tue Mar 23 01:12:16 2010 +0100 @@ -0,0 +1,53 @@ +package cz.frantovo.nekurak.xml; + +import cz.frantovo.nekurak.dto.Clanek; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * Převaděč do XML + * @author fiki + */ +@XmlRootElement +public class ClanekXML { + + private Clanek clanek; + + public ClanekXML() { + } + + public ClanekXML(Clanek clanek) { + this.clanek = clanek; + } + + @XmlAttribute(name = "id", required = true) + public int getId() { + return clanek.getId(); + } + + @XmlAttribute(name = "id", required = true) + public void setId(int id) { + clanek.setId(id); + } + + @XmlElement + public String getNadpis() { + return clanek.getNadpis(); + } + + @XmlElement + public void setNadpis(String nadpis) { + clanek.setNadpis(nadpis); + } + + @XmlElement + public String getText() { + return clanek.getText(); + } + + @XmlElement + public void setText(String text) { + clanek.setText(text); + } +}