1 package org.apache.commons.digester3.rss;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one or more
5 * contributor license agreements. See the NOTICE file distributed with
6 * this work for additional information regarding copyright ownership.
7 * The ASF licenses this file to You under the Apache License, Version 2.0
8 * (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20 import java.io.PrintWriter;
21 import java.io.Serializable;
22
23
24 /**
25 * <p>Implementation object representing a <strong>textinput</strong> in the
26 * <em>Rich Site Summary</em> DTD, version 0.91. This class may be subclassed
27 * to further specialize its behavior.</p>
28 */
29
30 public class TextInput implements Serializable {
31
32 /**
33 *
34 */
35 private static final long serialVersionUID = -147615076863607237L;
36
37 // ------------------------------------------------------------- Properties
38
39 /**
40 * The text input description (1-100 characters).
41 */
42 protected String description = null;
43
44 public String getDescription()
45 {
46 return ( this.description );
47 }
48
49 public void setDescription( String description )
50 {
51 this.description = description;
52 }
53
54 /**
55 * The text input link (1-500 characters).
56 */
57 protected String link = null;
58
59 public String getLink()
60 {
61 return ( this.link );
62 }
63
64 public void setLink( String link )
65 {
66 this.link = link;
67 }
68
69 /**
70 * The text input field name (1-100 characters).
71 */
72 protected String name = null;
73
74 public String getName()
75 {
76 return ( this.name );
77 }
78
79 public void setName( String name )
80 {
81 this.name = name;
82 }
83
84 /**
85 * The text input submit button label (1-100 characters).
86 */
87 protected String title = null;
88
89 public String getTitle()
90 {
91 return ( this.title );
92 }
93
94 public void setTitle( String title )
95 {
96 this.title = title;
97 }
98
99 // -------------------------------------------------------- Package Methods
100
101 /**
102 * Render this channel as XML conforming to the RSS 0.91 specification,
103 * to the specified writer.
104 *
105 * @param writer The writer to render output to
106 */
107 void render( PrintWriter writer )
108 {
109 writer.println( " <textinput>" );
110
111 writer.print( " <title>" );
112 writer.print( title );
113 writer.println( "</title>" );
114
115 writer.print( " <description>" );
116 writer.print( description );
117 writer.println( "</description>" );
118
119 writer.print( " <name>" );
120 writer.print( name );
121 writer.println( "</name>" );
122
123 writer.print( " <link>" );
124 writer.print( link );
125 writer.println( "</link>" );
126
127 writer.println( " </textinput>" );
128 }
129
130 }