Copyright (c) 2000-2002 ChurchillObjects.com

churchillobjects.rss4j
Class RssSyndication

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

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

Encapsulates the attributes and some logic of the RDF syndication extension to RSS. This includes the update period, frequency and update base. Only classes that implement IUsesSyndication can support RssSyndication (RssChannel).

See Also:
Serialized Form

Field Summary
static java.lang.String DAILY
          Enumerated daily value.
static java.lang.String HOURLY
          Enumerated hourly value.
static java.lang.String MONTHLY
          Enumerated monthly value.
static java.lang.String PREFIX
          The prefix used by syndication.
private  java.lang.String updateBase
          The syndication's update base as a string.
private  java.util.Date updateBaseDate
          The syndication's update base as a java.util.Date.
private  int updateFrequency
          The syndication's update frequency, default to 1.
private  java.lang.String updatePeriod
          The syndication's update period, default to "daily".
static java.lang.String WEEKLY
          Enumerated weekly value.
static java.lang.String XMLNS
          The XML namespace for syndication.
static java.lang.String XMLNS_VALUE
          The namespace uri for syndication.
static java.lang.String YEARLY
          Enumerated yearly value.
 
Constructor Summary
RssSyndication()
          Default constructor.
RssSyndication(java.lang.String updatePeriod, int updateFrequency, java.util.Date updateBase)
          Overloaded constructor for presetting the object's values.
RssSyndication(java.lang.String updatePeriod, int updateFrequency, java.lang.String updateBase)
          Overloaded constructor for presetting the object's values.
 
Method Summary
 java.lang.Object clone()
          Public clone method to allow cloning.
 boolean equals(java.lang.Object obj)
          Canonical equals method.
 java.lang.String getUpdateBase()
          Returns the update base of the syndication as a String.
 java.util.Date getUpdateBaseAsDate()
          Returns the update base of the syndication as a java.util.Date.
 int getUpdateFrequency()
          Returns the update frequency of the syndication.
 java.lang.String getUpdatePeriod()
          Returns the update period of the syndication.
 int hashCode()
          Computes the hashcode of this object based on the hashcodes of the objects it contains.
 void setUpdateBase(java.util.Date date)
          Sets the update base for the syndicaiton as a java.util.Date.
 void setUpdateBase(java.lang.String s)
          Sets the update base for the syndication as a String.
 void setUpdateFrequency(int i)
          Stes the update frequency of the syndication.
 void setUpdatePeriod(java.lang.String s)
          Sets the update period of the syndication.
 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

XMLNS

public static final java.lang.String XMLNS
The XML namespace for syndication.

See Also:
Constant Field Values

PREFIX

public static final java.lang.String PREFIX
The prefix used by syndication.

See Also:
Constant Field Values

XMLNS_VALUE

public static final java.lang.String XMLNS_VALUE
The namespace uri for syndication.

See Also:
Constant Field Values

HOURLY

public static final java.lang.String HOURLY
Enumerated hourly value.

See Also:
Constant Field Values

DAILY

public static final java.lang.String DAILY
Enumerated daily value.

See Also:
Constant Field Values

WEEKLY

public static final java.lang.String WEEKLY
Enumerated weekly value.

See Also:
Constant Field Values

MONTHLY

public static final java.lang.String MONTHLY
Enumerated monthly value.

See Also:
Constant Field Values

YEARLY

public static final java.lang.String YEARLY
Enumerated yearly value.

See Also:
Constant Field Values

updatePeriod

private java.lang.String updatePeriod
The syndication's update period, default to "daily".


updateFrequency

private int updateFrequency
The syndication's update frequency, default to 1.


updateBase

private java.lang.String updateBase
The syndication's update base as a string.


updateBaseDate

private java.util.Date updateBaseDate
The syndication's update base as a java.util.Date.

Constructor Detail

RssSyndication

public RssSyndication()
Default constructor.


RssSyndication

public RssSyndication(java.lang.String updatePeriod,
                      int updateFrequency,
                      java.lang.String updateBase)
               throws java.text.ParseException
Overloaded constructor for presetting the object's values.

Parameters:
updatePeriod -
updateFrequency -
updateBase -
Throws:
java.text.ParseException

RssSyndication

public RssSyndication(java.lang.String updatePeriod,
                      int updateFrequency,
                      java.util.Date updateBase)
Overloaded constructor for presetting the object's values.

Parameters:
updatePeriod -
updateFrequency -
updateBase -
Method Detail

setUpdateBase

public void setUpdateBase(java.lang.String s)
                   throws java.text.ParseException
Sets the update base for the syndication as a String.

Parameters:
s -
Throws:
java.text.ParseException

setUpdateBase

public void setUpdateBase(java.util.Date date)
Sets the update base for the syndicaiton as a java.util.Date.

Parameters:
date -

setUpdatePeriod

public void setUpdatePeriod(java.lang.String s)
Sets the update period of the syndication.

Parameters:
s -

setUpdateFrequency

public void setUpdateFrequency(int i)
Stes the update frequency of the syndication.

Parameters:
i -

getUpdatePeriod

public java.lang.String getUpdatePeriod()
Returns the update period of the syndication.

Returns:

getUpdateFrequency

public int getUpdateFrequency()
Returns the update frequency of the syndication.

Returns:

getUpdateBase

public java.lang.String getUpdateBase()
Returns the update base of the syndication as a String.

Returns:

getUpdateBaseAsDate

public java.util.Date getUpdateBaseAsDate()
Returns the update base of the syndication as a java.util.Date.

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