1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.sun.syndication.feed.atom;
18
19 import com.sun.syndication.common.ObjectBean;
20 import com.sun.syndication.common.Enum;
21
22 /***
23 * Bean for link elements of Atom feeds.
24 * <p>
25 * @author Alejandro Abdelnur
26 *
27 */
28 public class Link extends ObjectBean {
29
30 /***
31 * Enumeration type for the 'rel' property of Atom Link elements.
32 * <p>
33 * @author Alejandro Abdelnur
34 *
35 */
36 public static class Rel extends Enum {
37
38 private Rel(String name) {
39 super(name);
40 }
41
42 }
43
44 public static final Rel ALTERNATE = new Rel("alternate");
45 public static final Rel START = new Rel("start");
46 public static final Rel NEXT = new Rel("next");
47 public static final Rel PREV = new Rel("prev");
48 public static final Rel SERVICE_EDIT = new Rel("service.edit");
49 public static final Rel SERVICE_POST = new Rel("service.post");
50 public static final Rel SERVICE_FEED = new Rel("service.feed");
51
52 private Rel _rel;
53 private String _type;
54 private String _href;
55 private String _title;
56
57 /***
58 * Default constructor. All properties are set to <b>null</b>.
59 * <p>
60 *
61 */
62 public Link() {
63 super(Link.class);
64 }
65
66 /***
67 * Returns the link rel.
68 * <p>
69 * @return the link rel, <b>null</b> if none.
70 *
71 */
72 public Rel getRel() {
73 return _rel;
74 }
75
76 /***
77 * Sets the link rel.
78 * <p>
79 * @param rel the link rel,, <b>null</b> if none.
80 *
81 */
82 public void setRel(Rel rel) {
83 _rel = rel;
84 }
85
86 /***
87 * Returns the link type.
88 * <p>
89 * @return the link type, <b>null</b> if none.
90 *
91 */
92 public String getType() {
93 return _type;
94 }
95
96 /***
97 * Sets the link type.
98 * <p>
99 * @param type the link type, <b>null</b> if none.
100 *
101 */
102 public void setType(String type) {
103 _type = type;
104 }
105
106 /***
107 * Returns the link href.
108 * <p>
109 * @return the link href, <b>null</b> if none.
110 *
111 */
112 public String getHref() {
113 return _href;
114 }
115
116 /***
117 * Sets the link href.
118 * <p>
119 * @param href the link href, <b>null</b> if none.
120 *
121 */
122 public void setHref(String href) {
123 _href = href;
124 }
125
126 /***
127 * Returns the link title.
128 * <p>
129 * @return the link title, <b>null</b> if none.
130 *
131 */
132 public String getTitle() {
133 return _title;
134 }
135
136 /***
137 * Sets the link title.
138 * <p>
139 * @param title the link title, <b>null</b> if none.
140 *
141 */
142 public void setTitle(String title) {
143 _title = title;
144 }
145
146 }