001: /*
002: * Copyright 2004 Sun Microsystems, Inc.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: *
016: */
017: package com.sun.syndication.feed.synd;
018:
019: /**
020: * Represents a link or enclosure associated with entry.
021: * @author Dave Johnson
022: */
023: public interface SyndLink {
024: /**
025: * Creates a deep 'bean' clone of the object.
026: * <p>
027: * @return a clone of the object.
028: * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
029: *
030: */
031: public abstract Object clone() throws CloneNotSupportedException;
032:
033: /**
034: * Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
035: * <p>
036: * @param other he reference object with which to compare.
037: * @return <b>true</b> if 'this' object is equal to the 'other' object.
038: *
039: */
040: public abstract boolean equals(Object other);
041:
042: /**
043: * Returns a hashcode value for the object.
044: * <p>
045: * It follows the contract defined by the Object hashCode() method.
046: * <p>
047: * @return the hashcode of the bean object.
048: *
049: */
050: public abstract int hashCode();
051:
052: /**
053: * Returns the String representation for the object.
054: * <p>
055: * @return String representation for the object.
056: *
057: */
058: public abstract String toString();
059:
060: /**
061: * Returns the link rel.
062: * <p>
063: * @return the link rel, <b>null</b> if none.
064: *
065: */
066: public abstract String getRel();
067:
068: /**
069: * Sets the link rel.
070: * <p>
071: * @param rel the link rel,, <b>null</b> if none.
072: *
073: */
074: public abstract void setRel(String rel);
075:
076: /**
077: * Returns the link type.
078: * <p>
079: * @return the link type, <b>null</b> if none.
080: *
081: */
082: public abstract String getType();
083:
084: /**
085: * Sets the link type.
086: * <p>
087: * @param type the link type, <b>null</b> if none.
088: *
089: */
090: public abstract void setType(String type);
091:
092: /**
093: * Returns the link href.
094: * <p>
095: * @return the link href, <b>null</b> if none.
096: *
097: */
098: public abstract String getHref();
099:
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: }
|