View Javadoc

1   package com.sun.syndication.feed.sse;
2   
3   import java.util.Date;
4   
5   /***
6    * <pre><sx:related></pre>Element within <pre><sx:sharing></pre>.
7    */
8   public class Related {
9       /***
10       * Indicates whether the link points to a file containing the complete collection of items for
11       * this feed.
12       */
13      public static final int COMPLETE = 0;
14  
15      /***
16       * Indicates whether the link points to a feed whose contents are being incorporated into this
17       * feed by the publisher.
18       */
19      public static final int AGGREGATED = 1;
20  
21      // url for related feeds
22      private String link;
23      // name or description of the related feed
24      private String title;
25      // the type of the relation "complete" or "aggregated"
26      private int type;
27      // starting point of the related feed
28      private Date since;
29      // ending point of a feed
30      private Date until;
31  
32      /***
33       * link A required, URL attribute. The URL for related feeds.
34       *
35       * @return the URL for related feeds
36       */
37      // TODO: use a java.net.URL?
38      public String getLink() {
39          return link;
40      }
41  
42      /***
43       * Set the URL for related feeds.
44       *
45       * @param link the URL for related feeds.
46       */
47      public void setLink(String link) {
48          this.link = link;
49      }
50  
51  
52      /***
53       * title An optional, string attribute. The name or description of the related feed.
54       *
55       * @return The name or description of the related feed.
56       */
57      public String getTitle() {
58          return title;
59      }
60  
61      /***
62       * Set the name or description of the related feed.
63       *
64       * @param title the name or description of the related feed.
65       */
66      public void setTitle(String title) {
67          this.title = title;
68      }
69  
70      /***
71       * type A required, string attribute. This attribute can have one of the following values:
72       * <p>
73       * "complete" if the link points to file containing the complete collection of items for this feed.
74       * <p>
75       * "aggregated" if the link points to a feed whose contents are being incorporated into this feed
76       * by the publisher.
77       *
78       * @return the type of the releated feed.
79       */
80      public int getType() {
81          return type;
82      }
83  
84      /***
85       * Set the type of relationship, complete or aggregated.
86       *
87       * @param type the type of relationship, complete or aggregated.
88       */
89      public void setType(int type) {
90          this.type = type;
91      }
92  
93      /***
94       * An optional, date-time attribute. This is the starting point of the related feed. If this attribute
95       * is omitted or blank, it is assumed that this is a complete feed.
96       *
97       * @return the starting point of the related feed.
98       */
99      public Date getSince() {
100         return since;
101     }
102 
103     /***
104      * Set the starting point of the related feed.
105      *
106      * @param since the starting point of the related feed.
107      */
108     public void setSince(Date since) {
109         this.since = since;
110     }
111 
112     /***
113      * An optional, date-time attribute. This is the ending point of a feed.
114      *
115      * @return the ending point of the feed, until.
116      */
117     public Date getUntil() {
118         return until;
119     }
120 
121     /***
122      * Set the ending point of the feed, until. An optional, date-time attribute.
123      *
124      * @param until the ending point of the feed.
125      */
126     public void setUntil(Date until) {
127         this.until = until;
128     }
129 }