View Javadoc

1   /*
2    * Copyright 2004 Sun Microsystems, Inc.
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  package com.sun.syndication.feed.rss;
18  
19  import com.sun.syndication.common.ObjectBean;
20  
21  /***
22   * Bean for images of RSS feeds.
23   * <p>
24   * @author Alejandro Abdelnur
25   *
26   */
27  public class Image extends ObjectBean {
28      private String _title;
29      private String _url;
30      private String _link;
31      private int _width = -1;
32      private int _height = -1;
33      private String _description;
34  
35      /***
36       * Default constructor. All properties are set to <b>null</b>.
37       * <p>
38       *
39       */
40      public Image() {
41          super(Image.class);
42      }
43  
44      /***
45       * Returns the image title.
46       * <p>
47       * @return the image title, <b>null</b> if none.
48       *
49       */
50      public String getTitle() {
51          return _title;
52      }
53  
54      /***
55       * Sets the image title.
56       * <p>
57       * @param title the image title to set, <b>null</b> if none.
58       *
59       */
60      public void setTitle(String title) {
61          _title = title;
62      }
63  
64      /***
65       * Returns the image URL.
66       * <p>
67       * @return the image URL, <b>null</b> if none.
68       *
69       */
70      public String getUrl() {
71          return _url;
72      }
73  
74      /***
75       * Sets the image URL.
76       * <p>
77       * @param url the image URL to set, <b>null</b> if none.
78       *
79       */
80      public void setUrl(String url) {
81          _url = url;
82      }
83  
84      /***
85       * Returns the image link.
86       * <p>
87       * @return the image link, <b>null</b> if none.
88       *
89       */
90      public String getLink() {
91          return _link;
92      }
93  
94      /***
95       * Sets the image link.
96       * <p>
97       * @param link the image link to set, <b>null</b> if none.
98       *
99       */
100     public void setLink(String link) {
101         _link = link;
102     }
103 
104     /***
105      * Returns the image width.
106      * <p>
107      * @return the image width, <b>null</b> if none.
108      *
109      */
110     public int getWidth() {
111         return _width;
112     }
113 
114     /***
115      * Sets the image width.
116      * <p>
117      * @param width the image width to set, <b>null</b> if none.
118      *
119      */
120     public void setWidth(int width) {
121         _width = width;
122     }
123 
124     /***
125      * Returns the image height.
126      * <p>
127      * @return the image height, <b>null</b> if none.
128      *
129      */
130     public int getHeight() {
131         return _height;
132     }
133 
134     /***
135      * Sets the image height.
136      * <p>
137      * @param height the image height to set, <b>null</b> if none.
138      *
139      */
140     public void setHeight(int height) {
141         _height = height;
142     }
143 
144     /***
145      * Returns the image description.
146      * <p>
147      * @return the image description, <b>null</b> if none.
148      *
149      */
150     public String getDescription() {
151         return _description;
152     }
153 
154     /***
155      * Sets the image description.
156      * <p>
157      * @param description the image description to set, <b>null</b> if none.
158      *
159      */
160     public void setDescription(String description) {
161         _description = description;
162     }
163 
164 }