|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfable.adt.FableComponent
fable.adt.Feed
public class Feed
This class represents a feed that contains articles. Feed has information about the feed URL.
| Constructor Summary | |
|---|---|
Feed(java.lang.String feedURL)
Construct a new Feed with provided feedURL. |
|
| Method Summary | |
|---|---|
void |
accept(FableVisitor v)
Accept the visitor v to visit this. |
void |
acceptRecursive(FableVisitor v)
Accept the visitor v to visit this, and recurse on children of this. |
boolean |
addChild(FableComponent fc)
Feed can only have articles as a children. |
int |
getCacheTime()
Returns cache time of this feed. |
java.net.URL |
getFeedURL()
Returns an URL object from which the feed retrieves articles. |
java.util.Date |
getLastRefreshedTime()
Returns last refreshed date of this feed. |
int |
getRefreshRate()
Returns the refresh rate of this feed. |
boolean |
isCustomFeed()
Checks if the feed is a custom feed from the hard disk |
boolean |
isSimilarTo(FableComponent fc)
Returns true if this and fc are similar. |
void |
setCacheTime(int time)
Sets the cache time of this feed. |
void |
setFeedURL(java.lang.String feedURL)
Set the feed URL of this as the provided feedURL. |
void |
setLastRefreshedTime(java.util.Date d)
Set the last refreshed time ad Date d. |
void |
setRefreshRate(int rate)
Set the refresh rate of this to the provided rate. |
java.lang.String |
toString()
Returns string representation of this feed. |
| Methods inherited from class fable.adt.FableComponent |
|---|
activate, addStructuralChangeListener, getChildren, getDate, getDescendants, getParent, getPosition, getTitle, isAncestorOf, moveDown, moveUp, removeAllListeners, removeChild, removeStructuralChangeListener, setParent, setPosition, setTitle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Feed(java.lang.String feedURL)
throws java.net.MalformedURLException
feedURL - a string corresponds to the feed URL.
java.net.MalformedURLException - if feedURL is not a correct URL.
java.lang.NullPointerException - if feedURL is null.| Method Detail |
|---|
public boolean isSimilarTo(FableComponent fc)
isSimilarTo in class FableComponentfc - FableComponent object to compare.
public boolean isCustomFeed()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean addChild(FableComponent fc)
addChild in interface FableContaineraddChild in class FableComponentfc - a FableComponent to add as a child of this.
public java.net.URL getFeedURL()
public int getRefreshRate()
public int getCacheTime()
public java.util.Date getLastRefreshedTime()
public void setFeedURL(java.lang.String feedURL)
throws java.net.MalformedURLException
feedURL - a string represents to the new feed URL to replace the old
one.
java.lang.NullPointerException - if feedURL is null.
java.net.MalformedURLExceptionpublic void setRefreshRate(int rate)
rate - the rate that is to be the refresh rate of this.public void setCacheTime(int time)
time - an integer to be the cache time of this feed.public void setLastRefreshedTime(java.util.Date d)
d - a new Date to be the last refreshed time of this feed.public void accept(FableVisitor v)
FableComponent
accept in class FableComponentv - the visitor to visit this.public void acceptRecursive(FableVisitor v)
FableComponent
acceptRecursive in class FableComponentv - the visitor to visit this and decendants of this.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||