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