public class UrlPreview extends Object
Modifier and Type | Field and Description |
---|---|
private String |
_description |
private String |
_favico |
private String |
_imageUrl |
private String |
_title |
private String |
_url |
Constructor and Description |
---|
UrlPreview()
Empty constructor
|
Modifier and Type | Method and Description |
---|---|
private void |
_saxNonNullElement(ContentHandler handler,
String tagName,
String value) |
String |
getDescription()
Get the description
|
String |
getFavicon()
Get the favico
|
String |
getImageUrl()
Get the image url
|
String |
getTitle()
Get the title
|
String |
getUrl()
Get the url
|
void |
setDescription(String description)
Set the description
|
void |
setFavicon(String favico)
Set the absolute url of favico
|
void |
setImageUrl(String imgUrl)
Set the absolute url of image
|
void |
setTitle(String title)
Set the title
|
void |
setUrl(String url)
Set the url
|
Map<String,String> |
toJSON()
Get the JSON representation of this url preview
|
void |
toSAX(ContentHandler handler,
String tagName)
Generates sax events representing this url preview
|
private String _description
public UrlPreview()
public void setDescription(String description)
description
- the descriptionpublic String getDescription()
public void setImageUrl(String imgUrl)
imgUrl
- the url of imagepublic String getImageUrl()
public void setFavicon(String favico)
favico
- the url of favicopublic String getFavicon()
public Map<String,String> toJSON()
public void toSAX(ContentHandler handler, String tagName) throws SAXException
handler
- The content handler to sax intotagName
- the root tag nameSAXException
- if an error occurs while saxingprivate void _saxNonNullElement(ContentHandler handler, String tagName, String value) throws SAXException
SAXException