Changed behavior of getIdentifyingValue()
This commit is contained in:
parent
c95c31f802
commit
1e8f31b979
|
@ -122,14 +122,14 @@ public class Feed extends FeedFile {
|
||||||
/**
|
/**
|
||||||
* Returns the value that uniquely identifies this Feed. If the
|
* Returns the value that uniquely identifies this Feed. If the
|
||||||
* feedIdentifier attribute is not null, it will be returned. Else it will
|
* feedIdentifier attribute is not null, it will be returned. Else it will
|
||||||
* try to return the link. If the link is not given, it will use the title
|
* try to return the download URL. If the download URL is not given, it will use the title
|
||||||
* of the entry.
|
* of the feed.
|
||||||
* */
|
* */
|
||||||
public String getIdentifyingValue() {
|
public String getIdentifyingValue() {
|
||||||
if (feedIdentifier != null) {
|
if (feedIdentifier != null) {
|
||||||
return feedIdentifier;
|
return feedIdentifier;
|
||||||
} else if (link != null) {
|
} else if (download_url != null) {
|
||||||
return link;
|
return download_url;
|
||||||
} else {
|
} else {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,16 +63,16 @@ public class FeedItem extends FeedComponent {
|
||||||
|
|
||||||
/** Returns the value that uniquely identifies this FeedItem.
|
/** Returns the value that uniquely identifies this FeedItem.
|
||||||
* If the itemIdentifier attribute is not null, it will be returned.
|
* If the itemIdentifier attribute is not null, it will be returned.
|
||||||
* Else it will try to return the link. If the link is not given, it will
|
* Else it will try to return the title. If the title is not given, it will
|
||||||
* use the title of the entry.
|
* use the link of the entry.
|
||||||
* */
|
* */
|
||||||
public String getIdentifyingValue() {
|
public String getIdentifyingValue() {
|
||||||
if (itemIdentifier != null) {
|
if (itemIdentifier != null) {
|
||||||
return itemIdentifier;
|
return itemIdentifier;
|
||||||
} else if (link != null) {
|
} else if (title != null) {
|
||||||
return link;
|
|
||||||
} else {
|
|
||||||
return title;
|
return title;
|
||||||
|
} else {
|
||||||
|
return link;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue