Source code: com/sun/syndication/feed/synd/SyndLink.java
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.synd;
18
19 /**
20 * Represents a link or enclosure associated with entry.
21 * @author Dave Johnson
22 */
23 public interface SyndLink {
24 /**
25 * Creates a deep 'bean' clone of the object.
26 * <p>
27 * @return a clone of the object.
28 * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
29 *
30 */
31 public abstract Object clone() throws CloneNotSupportedException;
32
33 /**
34 * Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
35 * <p>
36 * @param other he reference object with which to compare.
37 * @return <b>true</b> if 'this' object is equal to the 'other' object.
38 *
39 */
40 public abstract boolean equals(Object other);
41
42 /**
43 * Returns a hashcode value for the object.
44 * <p>
45 * It follows the contract defined by the Object hashCode() method.
46 * <p>
47 * @return the hashcode of the bean object.
48 *
49 */
50 public abstract int hashCode();
51
52 /**
53 * Returns the String representation for the object.
54 * <p>
55 * @return String representation for the object.
56 *
57 */
58 public abstract String toString();
59
60 /**
61 * Returns the link rel.
62 * <p>
63 * @return the link rel, <b>null</b> if none.
64 *
65 */
66 public abstract String getRel();
67
68 /**
69 * Sets the link rel.
70 * <p>
71 * @param rel the link rel,, <b>null</b> if none.
72 *
73 */
74 public abstract void setRel(String rel);
75
76 /**
77 * Returns the link type.
78 * <p>
79 * @return the link type, <b>null</b> if none.
80 *
81 */
82 public abstract String getType();
83
84 /**
85 * Sets the link type.
86 * <p>
87 * @param type the link type, <b>null</b> if none.
88 *
89 */
90 public abstract void setType(String type);
91
92 /**
93 * Returns the link href.
94 * <p>
95 * @return the link href, <b>null</b> if none.
96 *
97 */
98 public abstract String getHref();
99
100 /**
101 * Sets the link href.
102 * <p>
103 * @param href the link href, <b>null</b> if none.
104 *
105 */
106 public abstract void setHref(String href);
107
108 /**
109 * Returns the link title.
110 * <p>
111 * @return the link title, <b>null</b> if none.
112 *
113 */
114 public abstract String getTitle();
115
116 /**
117 * Sets the link title.
118 * <p>
119 * @param title the link title, <b>null</b> if none.
120 *
121 */
122 public abstract void setTitle(String title);
123
124 /**
125 * Returns the hreflang
126 * <p>
127 * @return Returns the hreflang.
128 */
129 public abstract String getHreflang();
130
131 /**
132 * Set the hreflang
133 * <p>
134 * @param hreflang The hreflang to set.
135 */
136 public abstract void setHreflang(String hreflang);
137
138 /**
139 * Returns the length
140 * <p>
141 * @return Returns the length.
142 */
143 public abstract long getLength();
144
145 /**
146 * Set the length
147 * <p>
148 * @param length The length to set.
149 */
150 public abstract void setLength(long length);
151 }