View Javadoc

1   package yarfraw.core.datamodel;
2   
3   /***
4    * <b>This is only used by Rss 2.0.</b>
5    * <br/>
6    * {@link Source} is an optional sub-element of {@link ItemEntry}.
7    * <p/>
8    * Its value is the name of the RSS channel that the item came from, derived from its &lt;title>. 
9    * It has one required attribute, url, which links to the XMLization of the source.
10   * <p/>
11   * &lt;source url="http://www.tomalak.org/links2.xml">Tomalak's Realm&lt;/source>
12   * <p/>
13   * The purpose of this element is to propagate credit for links, to publicize the sources of news items. It can be used in the Post command of an aggregator. It should be generated automatically when forwarding an item from an aggregator to a weblog authoring tool.
14   * 
15   * @author jliang
16   *
17   */
18  public class Source extends AbstractBaseObject{
19    private static final long serialVersionUID = 20070927L;
20    private String _url;
21    private String _source;
22    public Source(){}
23    
24    public Source(String url, String source){
25      super();
26      setUrl(url);
27      setSource(source);
28    }
29    
30    public String getUrl() {
31      return _url;
32    }
33    
34    public Source setUrl(String url){
35      _url = url;
36      return this;
37    }
38    
39    public String getSource() {
40      return _source;
41    }
42    public Source setSource(String source) {
43      _source = source;
44      return this;
45    }
46    @Override
47    public void validate(FeedFormat format) throws ValidationException {
48  
49    }
50  
51  }