1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.student.r2.common.dto; |
18 | |
|
19 | |
import org.kuali.student.r2.common.infc.RichText; |
20 | |
import org.w3c.dom.Element; |
21 | |
|
22 | |
import javax.xml.bind.annotation.*; |
23 | |
import java.io.Serializable; |
24 | |
import java.util.List; |
25 | |
|
26 | |
@XmlAccessorType(XmlAccessType.FIELD) |
27 | |
@XmlType(name = "RichTextInfo", propOrder = { |
28 | |
"plain", "formatted", "_futureElements"}) |
29 | |
|
30 | |
public class RichTextInfo |
31 | |
implements RichText, Serializable { |
32 | |
|
33 | |
private static final long serialVersionUID = 1L; |
34 | |
|
35 | |
@XmlElement |
36 | |
private String plain; |
37 | |
|
38 | |
@XmlElement |
39 | |
private String formatted; |
40 | |
|
41 | |
@XmlAnyElement |
42 | |
private List<Element> _futureElements; |
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
|
48 | 0 | public RichTextInfo() { |
49 | 0 | } |
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | 0 | public RichTextInfo(RichText richText) { |
57 | 0 | if (null != richText) { |
58 | 0 | this.plain = richText.getPlain(); |
59 | 0 | this.formatted = richText.getFormatted(); |
60 | |
} |
61 | 0 | } |
62 | |
|
63 | |
|
64 | |
|
65 | |
|
66 | |
|
67 | |
|
68 | |
|
69 | 0 | public RichTextInfo(String plain, String formatted) { |
70 | 0 | this.plain = plain; |
71 | 0 | this.formatted = formatted; |
72 | 0 | } |
73 | |
|
74 | |
@Override |
75 | |
public String getPlain() { |
76 | 0 | return plain; |
77 | |
} |
78 | |
|
79 | |
public void setPlain(String plain) { |
80 | 0 | this.plain = plain; |
81 | 0 | } |
82 | |
|
83 | |
@Override |
84 | |
public String getFormatted() { |
85 | 0 | return formatted; |
86 | |
} |
87 | |
|
88 | |
public void setFormatted(String formatted) { |
89 | 0 | this.formatted = formatted; |
90 | 0 | } |
91 | |
|
92 | |
@Override |
93 | |
public String toString() { |
94 | 0 | return "RichTextInfo[plain=" + plain + ", formatted=" + formatted + "]"; |
95 | |
} |
96 | |
} |