java/nekurak.net-lib/src/cz/frantovo/nekurak/xml/ClanekXML.java
author František Kučera <franta-hg@frantovo.cz>
Wed Jan 26 18:58:02 2011 +0100 (2011-01-26)
changeset 182 bb8af29610c4
parent 96 9f6225d83611
permissions -rw-r--r--
Added signature for changeset bcf03fc1e3f9
     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 }