diff options
author | 2016-11-15 14:21:27 +0300 | |
---|---|---|
committer | 2016-11-15 14:21:27 +0300 | |
commit | 51d9de02265d6cc9d6045d79497d2a987ae2f7f7 (patch) | |
tree | d7dd2e534452cab45b8ebdba1e52c498951c5035 /juick-core/src/main/java/com/juick/Tag.java | |
parent | 32a6feb195171e06d60117ad758cc8beb50e5ca3 (diff) |
core classes are now serializeable with JAXB (to use as babbler extension)
Diffstat (limited to 'juick-core/src/main/java/com/juick/Tag.java')
-rw-r--r-- | juick-core/src/main/java/com/juick/Tag.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/juick-core/src/main/java/com/juick/Tag.java b/juick-core/src/main/java/com/juick/Tag.java index fa518e84..4ba3a812 100644 --- a/juick-core/src/main/java/com/juick/Tag.java +++ b/juick-core/src/main/java/com/juick/Tag.java @@ -20,18 +20,28 @@ package com.juick; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonValue; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlValue; import java.util.Objects; /** * @author Ugnich Anton */ +@XmlRootElement(name = "tag", namespace = "http://juick.com/message") +@XmlAccessorType(XmlAccessType.PROPERTY) public class Tag { - private final String name; + + private String name; public int TID = 0; public int SynonymID = 0; public int UsageCnt = 0; + public Tag() { + + } public Tag(String name) { this.name = name; @@ -44,6 +54,7 @@ public class Tag { } @JsonIgnore + @XmlValue public String getName() { return name; } @@ -53,4 +64,8 @@ public class Tag { public String toString() { return name; } + + public void setName(String name) { + this.name = name; + } } |