Copyright (c) 2000-2002 ChurchillObjects.com

churchillobjects.rss4j
Class RssChannelImage

java.lang.Object
  |
  +--churchillobjects.rss4j.RssChannelImage
All Implemented Interfaces:
java.lang.Cloneable, IUsesDublinCore, java.io.Serializable

public class RssChannelImage
extends java.lang.Object
implements IUsesDublinCore, java.lang.Cloneable, java.io.Serializable

Encapsulates the data and some minor logic regarding an image in the RSS object model. The image contains only those attributes pertaining to a single image and an optional dublin core object.

See Also:
Serialized Form

Field Summary
private  churchillobjects.rss4j.RssDublinCore dublinCore
          The image's dublin core.
private  int imageHeight
          The image's height (zero is unset).
private  java.lang.String imageLink
          The image's link url.
private  java.lang.String imageTitle
          The image's title.
private  java.lang.String imageUrl
          The image's source url.
private  int imageWidth
          The image's width (zero is unset).
 
Constructor Summary
RssChannelImage()
          default constructor.
RssChannelImage(java.lang.String title, java.lang.String url, java.lang.String link)
          Overloaded constructor to set initial values for title, url and link.
RssChannelImage(java.lang.String title, java.lang.String url, java.lang.String link, int width, int height)
          Overloaded constructor to set initial values for title, url, link and size.
 
Method Summary
 java.lang.Object clone()
          Public clone method to allow cloning.
 boolean equals(java.lang.Object obj)
          Canonical equals method.
 churchillobjects.rss4j.RssDublinCore getDublinCore()
          Returns the dublin core for the channel image.
 java.lang.String getImageDescription()
          Returns the description for the channel image.
 int getImageHeight()
          Returns the height of the image, in pixels
 java.lang.String getImageLink()
          Returns the link of the image (where the browser should go if the user clicks on the image)
 java.lang.String getImageTitle()
          Returns the title of the image (can be used as ALT attribute)
 java.lang.String getImageUrl()
          Returns the url of the image (the image source)
 int getImageWidth()
          Returns the width of the image, in pixels
 int hashCode()
          Computes the hashcode of this object based on the hashcodes of the objects it contains.
 void setDublinCore(churchillobjects.rss4j.RssDublinCore dc)
          Sets the dublin core for the channel image.
 void setImageDescription(java.lang.String d)
          Sets the description for the channel image.
 void setImageHeight(int i)
          Sets the height of the image, in pixels.
 void setImageLink(java.lang.String l)
          Sets the link of the image (where the browser should go if the user clicks on the image)
 void setImageTitle(java.lang.String t)
          Sets the title of the image (can be used as ALT attribute)
 void setImageUrl(java.lang.String s)
          Sets the url of the image (the image source)
 void setImageWidth(int i)
          Sets the width of the image, in pixels.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

imageTitle

private java.lang.String imageTitle
The image's title.


imageUrl

private java.lang.String imageUrl
The image's source url.


imageLink

private java.lang.String imageLink
The image's link url.


imageWidth

private int imageWidth
The image's width (zero is unset).


imageHeight

private int imageHeight
The image's height (zero is unset).


dublinCore

private churchillobjects.rss4j.RssDublinCore dublinCore
The image's dublin core.

Constructor Detail

RssChannelImage

public RssChannelImage()
default constructor.


RssChannelImage

public RssChannelImage(java.lang.String title,
                       java.lang.String url,
                       java.lang.String link)
Overloaded constructor to set initial values for title, url and link.

Parameters:
title -
url -
link -

RssChannelImage

public RssChannelImage(java.lang.String title,
                       java.lang.String url,
                       java.lang.String link,
                       int width,
                       int height)
Overloaded constructor to set initial values for title, url, link and size.

Parameters:
title -
url -
link -
width -
height -
Method Detail

setImageTitle

public void setImageTitle(java.lang.String t)
Sets the title of the image (can be used as ALT attribute)


getImageTitle

public java.lang.String getImageTitle()
Returns the title of the image (can be used as ALT attribute)

Returns:

setImageUrl

public void setImageUrl(java.lang.String s)
Sets the url of the image (the image source)

Parameters:
s -

getImageUrl

public java.lang.String getImageUrl()
Returns the url of the image (the image source)

Returns:

setImageLink

public void setImageLink(java.lang.String l)
Sets the link of the image (where the browser should go if the user clicks on the image)


getImageLink

public java.lang.String getImageLink()
Returns the link of the image (where the browser should go if the user clicks on the image)

Returns:

setImageWidth

public void setImageWidth(int i)
Sets the width of the image, in pixels. This value can be zero to "nullify" an existing value.

Parameters:
i -

getImageWidth

public int getImageWidth()
Returns the width of the image, in pixels

Returns:

setImageHeight

public void setImageHeight(int i)
Sets the height of the image, in pixels. This value can be zero to "nullify" an existing value.

Parameters:
i -

getImageHeight

public int getImageHeight()
Returns the height of the image, in pixels

Returns:

setImageDescription

public void setImageDescription(java.lang.String d)
Sets the description for the channel image. For conversion, this value maps directly to the dublin core's description attribute.

Parameters:
d -

getImageDescription

public java.lang.String getImageDescription()
Returns the description for the channel image. For conversion, this value maps directly to the dublin core's description attribute.

Returns:

setDublinCore

public void setDublinCore(churchillobjects.rss4j.RssDublinCore dc)
Sets the dublin core for the channel image.

Specified by:
setDublinCore in interface IUsesDublinCore
Parameters:
dc -

getDublinCore

public churchillobjects.rss4j.RssDublinCore getDublinCore()
Returns the dublin core for the channel image.

Specified by:
getDublinCore in interface IUsesDublinCore
Returns:

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:

hashCode

public int hashCode()
Computes the hashcode of this object based on the hashcodes of the objects it contains. For semantic reasons, an object with all null values returns 0, the same as if it were null within another object.

Overrides:
hashCode in class java.lang.Object
Returns:
The object's hashcode

equals

public boolean equals(java.lang.Object obj)
Canonical equals method. Two RssChannel objects will be equal if their hashcodes (and thus their contents) are equal.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The other object
Returns:
If the two objects are canonically equal

clone

public java.lang.Object clone()
Public clone method to allow cloning.

Overrides:
clone in class java.lang.Object
Returns:
This object's clone

Copyright (c) 2000-2002 ChurchillObjects.com