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;
18  
19  import com.sun.syndication.common.ObjectBean;
20  
21  /***
22   * Parent class of the RSS (Channel) and Atom (Feed) feed beans.
23   * <p>
24   * NOTE: We don't like this class at this package level but the alternative would have
25   * been a proliferation of packages (one more level to hold atom and rss package with
26   * this class just in that package).
27   * <p>
28   * The format of the 'type' property must be [FEEDNAME]_[FEEDVERSION] with the FEEDNAME in lower case,
29   * for example: rss_0.9, rss_0.93, atom_0.3
30   * <p>
31   * @author Alejandro Abdelnur
32   *
33   */
34  public abstract class WireFeed extends ObjectBean  {
35      private String _feedType;
36  
37      /***
38       * Default constructor, for bean cloning purposes only.
39       *
40       */
41      protected WireFeed() {
42      }
43  
44      /***
45       * Creates a feed for a given type.
46       * <p>
47       * @param type of the feed to create.
48       *
49       */
50      protected WireFeed(String type) {
51          _feedType = type;
52      }
53  
54      /***
55       * Sets the feedType of a the feed. <b>Do not use</b>, for bean cloning purposes only.
56       * <p>
57       * @param feedType the feedType of the feed.
58       *
59       */
60      public void setFeedType(String feedType) {
61          _feedType = feedType;
62      }
63  
64      /***
65       * Returns the type of the feed.
66       *
67       * @return the type of the feed.
68       */
69      public String getFeedType() {
70          return _feedType;
71      }
72  
73  }