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