~ubuntu-branches/ubuntu/quantal/simple-xml/quantal

« back to all changes in this revision

Viewing changes to javadoc/org/simpleframework/xml/Text.html

  • Committer: Bazaar Package Importer
  • Author(s): Sylvestre Ledru, Fabian Köster
  • Date: 2010-03-05 19:44:34 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100305194434-d9mwhyioc9npo9it
Tags: 2.3.2-1
* Standards-Version updated to version 3.8.4

[ Fabian Köster ]
* New upstream release
* Correct license information in debian/pom.xml
* Exclude generated Javadoc from orig-tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
 
<!--NewPage-->
3
 
<HTML>
4
 
<HEAD>
5
 
<!-- Generated by javadoc (build 1.5.0_16) on Sat Jan 23 11:55:17 GMT 2010 -->
6
 
<TITLE>
7
 
Text
8
 
</TITLE>
9
 
 
10
 
<META NAME="keywords" CONTENT="org.simpleframework.xml.Text class">
11
 
 
12
 
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
13
 
 
14
 
<SCRIPT type="text/javascript">
15
 
function windowTitle()
16
 
{
17
 
    parent.document.title="Text";
18
 
}
19
 
</SCRIPT>
20
 
<NOSCRIPT>
21
 
</NOSCRIPT>
22
 
 
23
 
</HEAD>
24
 
 
25
 
<BODY BGCOLOR="white" onload="windowTitle();">
26
 
 
27
 
 
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="">
32
 
<TR>
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>&nbsp;</TD>
38
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
39
 
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
40
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
41
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
42
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
43
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
44
 
  </TR>
45
 
</TABLE>
46
 
</TD>
47
 
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
48
 
</EM>
49
 
</TD>
50
 
</TR>
51
 
 
52
 
<TR>
53
 
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54
 
&nbsp;<A HREF="../../../org/simpleframework/xml/Serializer.html" title="interface in org.simpleframework.xml"><B>PREV CLASS</B></A>&nbsp;
55
 
&nbsp;<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>  &nbsp;
58
 
&nbsp;<A HREF="Text.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
59
 
&nbsp;<SCRIPT type="text/javascript">
60
 
  <!--
61
 
  if(window==top) {
62
 
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
63
 
  }
64
 
  //-->
65
 
</SCRIPT>
66
 
<NOSCRIPT>
67
 
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
68
 
</NOSCRIPT>
69
 
 
70
 
 
71
 
</FONT></TD>
72
 
</TR>
73
 
<TR>
74
 
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75
 
  SUMMARY:&nbsp;REQUIRED&nbsp;|&nbsp;<A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
76
 
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77
 
DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
78
 
</TR>
79
 
</TABLE>
80
 
<A NAME="skip-navbar_top"></A>
81
 
<!-- ========= END OF TOP NAVBAR ========= -->
82
 
 
83
 
<HR>
84
 
<!-- ======== START OF CLASS DATA ======== -->
85
 
<H2>
86
 
<FONT SIZE="-1">
87
 
org.simpleframework.xml</FONT>
88
 
<BR>
89
 
Annotation Type Text</H2>
90
 
<HR>
91
 
<DL>
92
 
<DT><PRE><FONT SIZE="-1">@Retention(value=RUNTIME)
93
 
</FONT>public @interface <B>Text</B></DL>
94
 
</PRE>
95
 
 
96
 
<P>
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.  
103
 
 <p>
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> 
108
 
 annotations.
109
 
 <pre>
110
 
 
111
 
    &lt;example one="value" two="value"&gt;
112
 
       Example text value       
113
 
    &lt;example&gt;
114
 
 
115
 
 </pre>
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.
120
 
<P>
121
 
 
122
 
<P>
123
 
<DL>
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>
127
 
<HR>
128
 
 
129
 
<P>
130
 
<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
131
 
 
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>
137
 
</TR>
138
 
<TR BGCOLOR="white" CLASS="TableRowColor">
139
 
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
140
 
<CODE>&nbsp;boolean</CODE></FONT></TD>
141
 
<TD><CODE><B><A HREF="../../../org/simpleframework/xml/Text.html#data()">data</A></B></CODE>
142
 
 
143
 
<BR>
144
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is used to determine whether the text is written within 
145
 
 CDATA block or not.</TD>
146
 
</TR>
147
 
<TR BGCOLOR="white" CLASS="TableRowColor">
148
 
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
149
 
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
150
 
<TD><CODE><B><A HREF="../../../org/simpleframework/xml/Text.html#empty()">empty</A></B></CODE>
151
 
 
152
 
<BR>
153
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is used to provide a default value for the text data if
154
 
 the annotated field or method is null.</TD>
155
 
</TR>
156
 
<TR BGCOLOR="white" CLASS="TableRowColor">
157
 
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
158
 
<CODE>&nbsp;boolean</CODE></FONT></TD>
159
 
<TD><CODE><B><A HREF="../../../org/simpleframework/xml/Text.html#required()">required</A></B></CODE>
160
 
 
161
 
<BR>
162
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether the text value is required within the XML
163
 
 document.</TD>
164
 
</TR>
165
 
</TABLE>
166
 
&nbsp;
167
 
<P>
168
 
<A NAME="empty()"><!-- --></A><H3>
169
 
empty</H3>
170
 
<PRE>
171
 
public abstract java.lang.String <B>empty</B></PRE>
172
 
<DL>
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.
178
 
<P>
179
 
<DD><DL>
180
 
</DL>
181
 
</DD>
182
 
<DD><DL>
183
 
 
184
 
<DT><B>Returns:</B><DD>this returns the default attribute value to use</DL>
185
 
<DL>
186
 
<DT><B>Default:</B><DD>""</DD>
187
 
</DL>
188
 
</DL>
189
 
<HR>
190
 
 
191
 
<A NAME="data()"><!-- --></A><H3>
192
 
data</H3>
193
 
<PRE>
194
 
public abstract boolean <B>data</B></PRE>
195
 
<DL>
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.
200
 
<P>
201
 
<DD><DL>
202
 
</DL>
203
 
</DD>
204
 
<DD><DL>
205
 
 
206
 
<DT><B>Returns:</B><DD>true if the data is to be wrapped in a CDATA block</DL>
207
 
<DL>
208
 
<DT><B>Default:</B><DD>false</DD>
209
 
</DL>
210
 
</DL>
211
 
<HR>
212
 
 
213
 
<A NAME="required()"><!-- --></A><H3>
214
 
required</H3>
215
 
<PRE>
216
 
public abstract boolean <B>required</B></PRE>
217
 
<DL>
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.
222
 
<P>
223
 
<DD><DL>
224
 
</DL>
225
 
</DD>
226
 
<DD><DL>
227
 
 
228
 
<DT><B>Returns:</B><DD>true if the element is required, false otherwise</DL>
229
 
<DL>
230
 
<DT><B>Default:</B><DD>true</DD>
231
 
</DL>
232
 
</DL>
233
 
<!-- ========= END OF CLASS DATA ========= -->
234
 
<HR>
235
 
 
236
 
 
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="">
241
 
<TR>
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>&nbsp;</TD>
247
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
248
 
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
249
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
250
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
251
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
252
 
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
253
 
  </TR>
254
 
</TABLE>
255
 
</TD>
256
 
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
257
 
</EM>
258
 
</TD>
259
 
</TR>
260
 
 
261
 
<TR>
262
 
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
263
 
&nbsp;<A HREF="../../../org/simpleframework/xml/Serializer.html" title="interface in org.simpleframework.xml"><B>PREV CLASS</B></A>&nbsp;
264
 
&nbsp;<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>  &nbsp;
267
 
&nbsp;<A HREF="Text.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
268
 
&nbsp;<SCRIPT type="text/javascript">
269
 
  <!--
270
 
  if(window==top) {
271
 
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
272
 
  }
273
 
  //-->
274
 
</SCRIPT>
275
 
<NOSCRIPT>
276
 
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
277
 
</NOSCRIPT>
278
 
 
279
 
 
280
 
</FONT></TD>
281
 
</TR>
282
 
<TR>
283
 
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
284
 
  SUMMARY:&nbsp;REQUIRED&nbsp;|&nbsp;<A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
285
 
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
286
 
DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
287
 
</TR>
288
 
</TABLE>
289
 
<A NAME="skip-navbar_bottom"></A>
290
 
<!-- ======== END OF BOTTOM NAVBAR ======= -->
291
 
 
292
 
<HR>
293
 
 
294
 
</BODY>
295
 
</HTML>