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.atom;
18  
19  import com.sun.syndication.common.ObjectBean;
20  
21  import java.util.ArrayList;
22  import java.util.Date;
23  import java.util.List;
24  
25  /***
26   * Bean for entry elements of Atom feeds.
27   * <p>
28   * @author Alejandro Abdelnur
29   *
30   */
31  public class Entry extends ObjectBean {
32      private String _title;
33      private List _alternateLinks;
34      private List _otherLinks;
35      private Person _author;
36      private List _contributors;
37      private String _id;
38      private Date _modified;
39      private Date _issued;
40      private Date _created;
41      private Content _summary;
42      private List _contents;
43      private List _modules;
44  
45      /***
46       * Default constructor. All properties are set to <b>null</b>.
47       * <p>
48       *
49       */
50      public Entry() {
51      }
52  
53      /***
54       * Returns the entry title.
55       * <p>
56       * @return the entry title, <b>null</b> if none.
57       *
58       */
59      public String getTitle() {
60          return _title;
61      }
62  
63      /***
64       * Sets the entry title.
65       * <p>
66       * @param title the entry title, <b>null</b> if none.
67       *
68       */
69      public void setTitle(String title) {
70          _title = title;
71      }
72  
73      /***
74       * Returns the entry alternate links.
75       * <p>
76       * @return a list of Link elements with the entry alternate links, an empty list if none.
77       *
78       */
79      public List getAlternateLinks() {
80          return (_alternateLinks==null) ? (_alternateLinks=new ArrayList()) : _alternateLinks;
81      }
82  
83      /***
84       * Sets the entry alternate links.
85       * <p>
86       * @param alternateLinks the list of Link elements with the entry alternate links to set,
87       *        an empty list or <b>null</b> if none.
88       *
89       */
90      public void setAlternateLinks(List alternateLinks) {
91          _alternateLinks = alternateLinks;
92      }
93  
94      /***
95       * Returns the entry non-alternate links.
96       * <p>
97       * @return the list of Link elements with the entry non-alternate links to set,
98       *         an empty list if none.
99       *
100      */
101     public List getOtherLinks() {
102         return (_otherLinks==null) ? (_otherLinks=new ArrayList()) : _otherLinks;
103     }
104 
105     /***
106      * Sets the entry non-alternate links.
107      * <p>
108      * @param otherLinks the list Link elements with the entry non-alternate links to set,
109      *        an empty list or <b>null</b> if none.
110      *
111      */
112     public void setOtherLinks(List otherLinks) {
113         _otherLinks = otherLinks;
114     }
115 
116     /***
117      * Returns the entry author.
118      * <p>
119      * @return the entry author, <b>null</b> if none.
120      *
121      */
122     public Person getAuthor() {
123         return _author;
124     }
125 
126     /***
127      * Sets the author of the entry.
128      * <p>
129      * @param author the author of the entry, <b>null</b> if none.
130      *
131      */
132     public void setAuthor(Person author) {
133         _author = author;
134     }
135 
136     /***
137      * Returns the entry contributors.
138      * <p>
139      * @return a list of Person elements with the entry contributors,
140      *         an empty list if none.
141      *
142      */
143     public List getContributors() {
144         return (_contributors==null) ? (_contributors=new ArrayList()) : _contributors;
145     }
146 
147     /***
148      * Sets the entry contributors.
149      * <p>
150      * @param contributors the list of Person elements with the entry contributors to set,
151      *        an empty list or <b>null</b> if none.
152      *
153      */
154     public void setContributors(List contributors) {
155         _contributors = contributors;
156     }
157 
158     /***
159      * Returns the entry ID.
160      * <p>
161      * @return the entry ID, <b>null</b> if none.
162      *
163      */
164     public String getId() {
165         return _id;
166     }
167 
168     /***
169      * Sets the entry ID.
170      * <p>
171      * @param id the entry ID, <b>null</b> if none.
172      *
173      */
174     public void setId(String id) {
175         _id = id;
176     }
177 
178     /***
179      * Returns the entry modified date.
180      * <p>
181      * @return the entry modified date, <b>null</b> if none.
182      *
183      */
184     public Date getModified() {
185         return _modified;
186     }
187 
188     /***
189      * Sets the entry modified date.
190      * <p>
191      * @param modified the entry modified date, <b>null</b> if none.
192      *
193      */
194     public void setModified(Date modified) {
195         _modified = modified;
196     }
197 
198     /***
199      * Returns the entry issued date.
200      * <p>
201      * @return the entry issued date, <b>null</b> if none.
202      *
203      */
204     public Date getIssued() {
205         return _issued;
206     }
207 
208     /***
209      * Sets the entry issued date.
210      * <p>
211      * @param issued the entry issued date, <b>null</b> if none.
212      *
213      */
214     public void setIssued(Date issued) {
215         _issued = issued;
216     }
217 
218     /***
219      * Returns the entry created date.
220      * <p>
221      * @return the entry created date, <b>null</b> if none.
222      *
223      */
224     public Date getCreated() {
225         return _created;
226     }
227 
228     /***
229      * Sets the entry created date.
230      * <p>
231      * @param created the entry created date, <b>null</b> if none.
232      *
233      */
234     public void setCreated(Date created) {
235         _created = created;
236     }
237 
238     /***
239      * Returns the entry summary.
240      * <p>
241      * @return  the entry summary, <b>null</b> if none.
242      *
243      */
244     public Content getSummary() {
245         return _summary;
246     }
247 
248     /***
249      * Sets the entry summary.
250      * <p>
251      * @param summary the entry summary, <b>null</b> if none.
252      *
253      */
254     public void setSummary(Content summary) {
255         _summary = summary;
256     }
257 
258     /***
259      * Returns the entry contents.
260      * <p>
261      * @return a list of Content elements with the entry contents,
262      *         an empty list if none.
263      *
264      */
265     public List getContents() {
266         return (_contents==null) ? (_contents=new ArrayList()) : _contents;
267     }
268 
269     /***
270      * Sets the entry contents.
271      * <p>
272      * @param contents the list of Content elements with the entry contents to set,
273      *        an empty list or <b>null</b> if none.
274      *
275      */
276     public void setContents(List contents) {
277         _contents = contents;
278     }
279 
280     /***
281      * Returns the entry modules.
282      * <p>
283      * @return a list of Module elements with the entry modules,
284      *         an emtpy list if none.
285      *
286      */
287     public List getModules() {
288         return (_modules==null) ? (_modules=new ArrayList()) : _modules;
289     }
290 
291     /***
292      * Sets the entry modules.
293      * <p>
294      * @param modules the list of Module elements with the entry modules to set,
295      *        an empty list or <b>null</b> if none.
296      *
297      */
298     public void setModules(List modules) {
299         _modules = modules;
300     }
301 
302 }