java/nekurak.net-lib/src/cz/frantovo/nekurak/xml/ClanekXML.java
author František Kučera <franta-hg@frantovo.cz>
Wed Apr 28 00:04:13 2010 +0200 (2010-04-28)
changeset 112 b139d35b4faf
parent 92 12268fc31114
child 145 0efefbf5f8b6
permissions -rw-r--r--
Validní SVG ~ hlasovani-svg.jsp
     1 package cz.frantovo.nekurak.xml;
     2 
     3 import cz.frantovo.nekurak.dto.Clanek;
     4 import javax.xml.bind.annotation.XmlElement;
     5 import javax.xml.bind.annotation.XmlRootElement;
     6 
     7 /**
     8  * Převaděč do XML
     9  * @author fiki
    10  */
    11 @XmlRootElement(name="clanek")
    12 public class ClanekXML {
    13 
    14     private Clanek clanek;
    15 
    16     public ClanekXML() {
    17 	clanek = new Clanek();
    18     }
    19 
    20     public ClanekXML(Clanek clanek) {
    21 	this.clanek = clanek;
    22     }
    23 
    24     @XmlElement
    25     public int getId() {
    26 	return clanek.getId();
    27     }
    28 
    29     public void setId(int id) {
    30 	clanek.setId(id);
    31     }
    32 
    33     @XmlElement
    34     public String getNadpis() {
    35 	return clanek.getNadpis();
    36     }
    37 
    38     public void setNadpis(String nadpis) {
    39 	clanek.setNadpis(nadpis);
    40     }
    41 
    42     @XmlElement
    43     public String getText() {
    44 	return clanek.getText();
    45     }
    46 
    47     public void setText(String text) {
    48 	clanek.setText(text);
    49     }
    50 
    51     public Clanek getClanek() {
    52 	return clanek;
    53     }
    54 
    55 }