KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > digester > rss > TextInput


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17
18 package org.apache.commons.digester.rss;
19
20 import java.io.PrintWriter JavaDoc;
21 import java.io.Serializable JavaDoc;
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 JavaDoc {
31
32
33     // ------------------------------------------------------------- Properties
34

35
36     /**
37      * The text input description (1-100 characters).
38      */

39     protected String JavaDoc description = null;
40
41     public String JavaDoc getDescription() {
42         return (this.description);
43     }
44
45     public void setDescription(String JavaDoc description) {
46         this.description = description;
47     }
48
49
50     /**
51      * The text input link (1-500 characters).
52      */

53     protected String JavaDoc link = null;
54
55     public String JavaDoc getLink() {
56         return (this.link);
57     }
58
59     public void setLink(String JavaDoc link) {
60         this.link = link;
61     }
62
63
64     /**
65      * The text input field name (1-100 characters).
66      */

67     protected String JavaDoc name = null;
68
69     public String JavaDoc getName() {
70         return (this.name);
71     }
72
73     public void setName(String JavaDoc name) {
74         this.name = name;
75     }
76
77
78     /**
79      * The text input submit button label (1-100 characters).
80      */

81     protected String JavaDoc title = null;
82
83     public String JavaDoc getTitle() {
84         return (this.title);
85     }
86
87     public void setTitle(String JavaDoc title) {
88         this.title = title;
89     }
90
91
92     // -------------------------------------------------------- Package Methods
93

94
95     /**
96      * Render this channel as XML conforming to the RSS 0.91 specification,
97      * to the specified writer.
98      *
99      * @param writer The writer to render output to
100      */

101     void render(PrintWriter JavaDoc writer) {
102
103         writer.println(" <textinput>");
104
105         writer.print(" <title>");
106         writer.print(title);
107         writer.println("</title>");
108
109         writer.print(" <description>");
110         writer.print(description);
111         writer.println("</description>");
112
113         writer.print(" <name>");
114         writer.print(name);
115         writer.println("</name>");
116
117         writer.print(" <link>");
118         writer.print(link);
119         writer.println("</link>");
120
121         writer.println(" </textinput>");
122
123     }
124
125
126 }
127
Popular Tags