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;
|
boolean mediaEntry = false;
|
||||||
List links = getOtherLinks();
|
List links = getOtherLinks();
|
||||||
|
|
||||||
for (Iterator it = links.iterator(); it.hasNext();) {
|
for (Iterator<Link> it = links.iterator(); it.hasNext();) {
|
||||||
Link link = (Link) it.next();
|
Link link = it.next();
|
||||||
|
|
||||||
if ("edit-media".equals(link.getRel())) {
|
if ("edit-media".equals(link.getRel())) {
|
||||||
mediaEntry = true;
|
mediaEntry = true;
|
||||||
|
@ -560,4 +560,14 @@ public class Entry implements Cloneable, Serializable, Extendable {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return _objBean.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