Added a finder method.
This commit is contained in:
parent
6967345621
commit
3505725a50
1 changed files with 12 additions and 2 deletions
|
@ -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<Link> 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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue