View Javadoc

1   package com.sun.syndication.feed.sse;
2   
3   /***
4    * <pre><sx:sync></pre>Element within RSS <pre><item></pre> or OPML <pre><outline></pre>.
5    */
6   public class Sync {
7       // item identifier
8       private String id;
9       // item sequence modification number
10      private int version;
11      // indication of whether the item is deleted and is a tombstone
12      private boolean deleted;
13      // an indication of whether there was an update conflict
14      private boolean conflict;
15  
16      /***
17       * Provides access to the sync id, a required, string attribute. This is the identifier for the item.
18       * <p/>
19       * The ID is assigned by the creator of the item, and MUST NOT be changed by subsequent publishers. Applications
20       * will collate and compare these identifiers, therefore they MUST conform to the syntax for Namespace Specific
21       * Strings (the NSS portion of a URN) in RFC 2141.
22       */
23      public String getId() {
24          return id;
25      }
26  
27      /***
28       * Set the identifier for the item. The ID MUST be globally unique within the feed and it MUST be identical across
29       * feeds if an item is being shared or replicated as part of multiple distinct independent feeds.
30       *
31       * @param id the identifier for the item.
32       */
33      public void setId(String id) {
34          this.id = id;
35      }
36  
37      /***
38       * Provides access to a required, integer attribute. This is the modification sequence number of the item, starting
39       * at 1 and incrementing by 1 indefinitely for each subsequent modification.
40       */
41      public int getVersion() {
42          return version;
43      }
44  
45      /***
46       * Set the modification sequence number of the item.
47       *
48       * @param version the modification sequence number of the item.
49       */
50      public void setVersion(int version) {
51          this.version = version;
52      }
53  
54      /***
55       * Provide access to an optional, Boolean attribute. If present and its value is "true" (lower-case), it indicates
56       * that the item has been deleted and this is a tombstone. If not present, or if present with value of "false" or
57       * "", then the item is not deleted. All other values are invalid.
58       */
59      public boolean isDeleted() {
60          return deleted;
61      }
62  
63      /***
64       * Set an indication of whether this item has been deleted and is a tombstone.
65       *
66       * @param deleted an indication of whether this item has been deleted and is a tombstone.
67       */
68      public void setDeleted(boolean deleted) {
69          this.deleted = deleted;
70      }
71  
72      /***
73       * Provides access to an optional, Boolean conflict attribute. If present and its value is "true" (lower-case), it
74       * indicates there was an update conflict detected when processing an update of this item, and it should potentially
75       * be examined by the user. If not present, or present with value of "false" or "", Then no conflict has been
76       * detected. All other values are invalid.
77       *
78       * @return indicates there was an update conflict detected when processing an update of this item.
79       */
80      public boolean isConflict() {
81          return conflict;
82      }
83  
84      /***
85       * Set an indication of whether there was an update conflict detected when processing an update of this item.
86       *
87       * @param conflict an indication of whether there was an update conflict detected when processing an update of this
88       *                 item.
89       */
90      public void setConflict(boolean conflict) {
91          this.conflict = conflict;
92      }
93  }