diff --git a/src/main/java/com/sun/syndication/feed/atom/Entry.java b/src/main/java/com/sun/syndication/feed/atom/Entry.java index cc0683f..1023ac2 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Entry.java +++ b/src/main/java/com/sun/syndication/feed/atom/Entry.java @@ -250,8 +250,8 @@ public class Entry implements Cloneable, Serializable, Extendable { boolean mediaEntry = false; List links = getOtherLinks(); - for (Iterator it = links.iterator(); it.hasNext();) { - Link link = (Link) it.next(); + for (Iterator it = links.iterator(); it.hasNext();) { + Link link = it.next(); if ("edit-media".equals(link.getRel())) { mediaEntry = true; @@ -560,4 +560,14 @@ public class Entry implements Cloneable, Serializable, Extendable { public String toString() { return _objBean.toString(); } + + + public Link findRelatedLink(String relation){ + for(Link l : this._otherLinks){ + if(relation.equals(l.getRel())){ + return l; + } + } + return null; + } }