1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
<!-- Generated by javadoc (build 1.5.0_16) on Sat Jan 23 11:55:17 GMT 2010 -->
10
<META NAME="keywords" CONTENT="org.simpleframework.xml.Text class">
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
14
<SCRIPT type="text/javascript">
15
function windowTitle()
17
parent.document.title="Text";
25
<BODY BGCOLOR="white" onload="windowTitle();">
28
<!-- ========= START OF TOP NAVBAR ======= -->
29
<A NAME="navbar_top"><!-- --></A>
30
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
33
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34
<A NAME="navbar_top_firstrow"><!-- --></A>
35
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36
<TR ALIGN="center" VALIGN="top">
37
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
38
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
39
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
40
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
41
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
42
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
43
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
47
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
53
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54
<A HREF="../../../org/simpleframework/xml/Serializer.html" title="interface in org.simpleframework.xml"><B>PREV CLASS</B></A>
55
<A HREF="../../../org/simpleframework/xml/Transient.html" title="annotation in org.simpleframework.xml"><B>NEXT CLASS</B></A></FONT></TD>
56
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57
<A HREF="../../../index.html?org/simpleframework/xml/Text.html" target="_top"><B>FRAMES</B></A>
58
<A HREF="Text.html" target="_top"><B>NO FRAMES</B></A>
59
<SCRIPT type="text/javascript">
62
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
67
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
74
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75
SUMMARY: REQUIRED | <A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
76
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77
DETAIL: <A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
80
<A NAME="skip-navbar_top"></A>
81
<!-- ========= END OF TOP NAVBAR ========= -->
84
<!-- ======== START OF CLASS DATA ======== -->
87
org.simpleframework.xml</FONT>
89
Annotation Type Text</H2>
92
<DT><PRE><FONT SIZE="-1">@Retention(value=RUNTIME)
93
</FONT>public @interface <B>Text</B></DL>
97
The <code>Text</code> annotation is used to represent a field or
98
method that appears as text within an XML element. Methods and
99
fields annotated with this must represent primitive values, which
100
means that the type is converted to and from an XML representation
101
using a <code>Transform</code> object. For example, the primitive
102
types typically annotated could be strings, integers, or dates.
104
One restriction on this annotation is that it can only appear once
105
within a schema class, and it can not appear with the another XML
106
element annotations, such as the <code>Element</code> annotation.
107
It can however appear with any number of <code>Attribute</code>
111
<example one="value" two="value">
116
Text values are used when an element containing attributes is
117
used to wrap a text value with no child elements. This can be
118
used in place of an element annotation to represent a primitive
119
which is wrapped in a surrounding XML element.
124
<DT><B>Author:</B></DT>
125
<DD>Niall Gallagher</DD>
126
<DT><B>See Also:</B><DD><A HREF="../../../org/simpleframework/xml/transform/Transformer.html" title="class in org.simpleframework.xml.transform"><CODE>Transformer</CODE></A></DL>
130
<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
132
<A NAME="annotation_type_optional_element_summary"><!-- --></A>
133
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
134
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
135
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
136
<B>Optional Element Summary</B></FONT></TH>
138
<TR BGCOLOR="white" CLASS="TableRowColor">
139
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
140
<CODE> boolean</CODE></FONT></TD>
141
<TD><CODE><B><A HREF="../../../org/simpleframework/xml/Text.html#data()">data</A></B></CODE>
144
This is used to determine whether the text is written within
145
CDATA block or not.</TD>
147
<TR BGCOLOR="white" CLASS="TableRowColor">
148
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
149
<CODE> java.lang.String</CODE></FONT></TD>
150
<TD><CODE><B><A HREF="../../../org/simpleframework/xml/Text.html#empty()">empty</A></B></CODE>
153
This is used to provide a default value for the text data if
154
the annotated field or method is null.</TD>
156
<TR BGCOLOR="white" CLASS="TableRowColor">
157
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
158
<CODE> boolean</CODE></FONT></TD>
159
<TD><CODE><B><A HREF="../../../org/simpleframework/xml/Text.html#required()">required</A></B></CODE>
162
Determines whether the text value is required within the XML
168
<A NAME="empty()"><!-- --></A><H3>
171
public abstract java.lang.String <B>empty</B></PRE>
173
<DD>This is used to provide a default value for the text data if
174
the annotated field or method is null. This ensures the the
175
serialization process writes the text data with a value even
176
if the value is null, and allows deserialization to determine
177
whether the value within the object was null or not.
184
<DT><B>Returns:</B><DD>this returns the default attribute value to use</DL>
186
<DT><B>Default:</B><DD>""</DD>
191
<A NAME="data()"><!-- --></A><H3>
194
public abstract boolean <B>data</B></PRE>
196
<DD>This is used to determine whether the text is written within
197
CDATA block or not. If this is set to true then the text is
198
written within a CDATA block, by default the text is output
199
as escaped XML. Typically this is used for large text values.
206
<DT><B>Returns:</B><DD>true if the data is to be wrapped in a CDATA block</DL>
208
<DT><B>Default:</B><DD>false</DD>
213
<A NAME="required()"><!-- --></A><H3>
216
public abstract boolean <B>required</B></PRE>
218
<DD>Determines whether the text value is required within the XML
219
document. Any field marked as not required may not have its
220
value set when the object is deserialized. If an object is to
221
be serialized only a null attribute will not appear in XML.
228
<DT><B>Returns:</B><DD>true if the element is required, false otherwise</DL>
230
<DT><B>Default:</B><DD>true</DD>
233
<!-- ========= END OF CLASS DATA ========= -->
237
<!-- ======= START OF BOTTOM NAVBAR ====== -->
238
<A NAME="navbar_bottom"><!-- --></A>
239
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
240
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
242
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
243
<A NAME="navbar_bottom_firstrow"><!-- --></A>
244
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
245
<TR ALIGN="center" VALIGN="top">
246
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
247
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
248
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
249
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
250
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
251
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
252
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
256
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
262
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
263
<A HREF="../../../org/simpleframework/xml/Serializer.html" title="interface in org.simpleframework.xml"><B>PREV CLASS</B></A>
264
<A HREF="../../../org/simpleframework/xml/Transient.html" title="annotation in org.simpleframework.xml"><B>NEXT CLASS</B></A></FONT></TD>
265
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
266
<A HREF="../../../index.html?org/simpleframework/xml/Text.html" target="_top"><B>FRAMES</B></A>
267
<A HREF="Text.html" target="_top"><B>NO FRAMES</B></A>
268
<SCRIPT type="text/javascript">
271
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
276
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
283
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
284
SUMMARY: REQUIRED | <A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
285
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
286
DETAIL: <A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
289
<A NAME="skip-navbar_bottom"></A>
290
<!-- ======== END OF BOTTOM NAVBAR ======= -->