001package org.apache.commons.digester3.rss;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one or more
005 * contributor license agreements.  See the NOTICE file distributed with
006 * this work for additional information regarding copyright ownership.
007 * The ASF licenses this file to You under the Apache License, Version 2.0
008 * (the "License"); you may not use this file except in compliance with
009 * the License.  You may obtain a copy of the License at
010 * 
011 *      http://www.apache.org/licenses/LICENSE-2.0
012 * 
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 */
019
020import java.io.PrintWriter;
021import java.io.Serializable;
022
023
024/**
025 * <p>Implementation object representing a <strong>textinput</strong> in the
026 * <em>Rich Site Summary</em> DTD, version 0.91.  This class may be subclassed
027 * to further specialize its behavior.</p>
028 */
029
030public class TextInput implements Serializable {
031
032    /**
033     * 
034     */
035    private static final long serialVersionUID = -147615076863607237L;
036
037    // ------------------------------------------------------------- Properties
038
039    /**
040     * The text input description (1-100 characters).
041     */
042    protected String description = null;
043
044    public String getDescription()
045    {
046        return ( this.description );
047    }
048
049    public void setDescription( String description )
050    {
051        this.description = description;
052    }
053
054    /**
055     * The text input link (1-500 characters).
056     */
057    protected String link = null;
058
059    public String getLink()
060    {
061        return ( this.link );
062    }
063
064    public void setLink( String link )
065    {
066        this.link = link;
067    }
068
069    /**
070     * The text input field name (1-100 characters).
071     */
072    protected String name = null;
073
074    public String getName()
075    {
076        return ( this.name );
077    }
078
079    public void setName( String name )
080    {
081        this.name = name;
082    }
083
084    /**
085     * The text input submit button label (1-100 characters).
086     */
087    protected String title = null;
088
089    public String getTitle()
090    {
091        return ( this.title );
092    }
093
094    public void setTitle( String title )
095    {
096        this.title = title;
097    }
098
099    // -------------------------------------------------------- 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}