public class BuyLink extends Object
BuyLink
contains information about places to buy an Album or Track. BuyLinks can point to physical
and digital music stores. Some suppliers have icons, some do have price information, others don't (eBay for example).
Common suppliers you will receive via the getBuylinks()
methods are Amazon, Amazon MP3, iTunes and
7digital. All stores but eBay do supply icons at the time of writing.Album.getBuylinks(String, String, String, String)
,
Track.getBuylinks(String, String, String, String)
Modifier and Type | Class and Description |
---|---|
static class |
BuyLink.StoreType |
Modifier and Type | Field and Description |
---|---|
private String |
currency |
private String |
icon |
private String |
link |
private String |
name |
private double |
price |
private boolean |
search |
private BuyLink.StoreType |
type |
Modifier | Constructor and Description |
---|---|
private |
BuyLink(String name,
BuyLink.StoreType type,
String link) |
Modifier and Type | Method and Description |
---|---|
String |
getCurrency()
Returns the currency of the price of the item.
|
String |
getIcon()
Returns a url to a 16x16 pixel icon for the store, or
null if no icon url was supplied. |
String |
getLink() |
String |
getName() |
double |
getPrice()
Returns the price for the item, or 0.0 if no price information is available.
|
BuyLink.StoreType |
getType() |
boolean |
isSearch()
Returns
true if this link points to a search page instead of an actual product page. |
(package private) static BuyLink |
linkFromElement(BuyLink.StoreType type,
DomElement element) |
private BuyLink.StoreType type
private boolean search
private double price
private BuyLink(String name, BuyLink.StoreType type, String link)
public BuyLink.StoreType getType()
public String getIcon()
null
if no icon url was supplied.null
public boolean isSearch()
true
if this link points to a search page instead of an actual product page. Note that
for search links there is no price information available.public String getCurrency()
null
to double-check if there is
price information availablepublic double getPrice()
getCurrency()
and
isSearch()
to check if price information is available.static BuyLink linkFromElement(BuyLink.StoreType type, DomElement element)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses