|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.nava.informa.impl.basic.Channel
public class Channel
In-Memory implementation of the ChannelIF interface.
| Constructor Summary | |
|---|---|
Channel()
|
|
Channel(org.jdom.Element channelElement)
|
|
Channel(org.jdom.Element channelElement,
String title)
|
|
Channel(String title)
|
|
| Method Summary | |
|---|---|
void |
addCategory(CategoryIF category)
|
void |
addItem(ItemIF item)
|
void |
addObserver(ChannelObserverIF o)
Adds an observer to the set of observers for this object. |
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one. |
String |
getAttributeValue(String path,
String attribute)
Returns the value of the attribute of the Channel's child element reached by the given path. |
String[] |
getAttributeValues(String path,
String[] attributes)
Returns the values of the specified attributes of the Channel's child element reached by the given path. |
Collection |
getCategories()
Gets the assigned category objects for this channel. |
CloudIF |
getCloud()
|
String |
getCopyright()
|
String |
getCreator()
|
String |
getDescription()
|
String |
getDocs()
|
String |
getElementValue(String path)
Returns the value of the Channel's child element reached by the given path. |
String[] |
getElementValues(String path,
String[] elements)
Returns the values of the specified sub-elements of the Channel's child reached by the given path. |
ChannelFormat |
getFormat()
Gets the syntax format used by the channel. |
String |
getGenerator()
|
long |
getId()
|
ImageIF |
getImage()
Retrieves the Image associated with this feed. |
ItemIF |
getItem(long anId)
Returns the news item as specified by the item identifier ( WithIdMIF.getId()). |
Set<ItemIF> |
getItems()
|
String |
getLanguage()
|
Date |
getLastBuildDate()
|
Date |
getLastUpdated()
Returns that date and time at which the feed was parsed and the channel object was updated (or created) from feed XML content |
URL |
getLocation()
|
Date |
getPubDate()
|
String |
getPublisher()
|
String |
getRating()
|
URL |
getSite()
|
TextInputIF |
getTextInput()
|
String |
getTitle()
|
int |
getTtl()
|
Date |
getUpdateBase()
Accesses data provided by the Syndication module (will apply only to RSS 1.0+). |
int |
getUpdateFrequency()
Accesses data provided by the Syndication module (will apply only to RSS 1.0+). |
ChannelUpdatePeriod |
getUpdatePeriod()
Accesses data provided by the Syndication module (will apply only to RSS 1.0+). |
int |
hashCode()
Returns a hash code value for the object. |
void |
removeCategory(CategoryIF category)
|
void |
removeItem(ItemIF item)
|
void |
removeObserver(ChannelObserverIF o)
Removes an observer from the set of observers of this object. |
void |
setAllProperties(ChannelIF sourceChan)
setAllProperties - Set all the properties in this Channel by copying them from a source Channel. |
void |
setCategories(Collection<CategoryIF> categories)
|
void |
setCloud(CloudIF cloud)
|
void |
setCopyright(String copyright)
|
void |
setCreator(String creator)
|
void |
setDescription(String description)
|
void |
setDocs(String docs)
|
void |
setFormat(ChannelFormat format)
|
void |
setGenerator(String generator)
|
void |
setId(long id)
|
void |
setImage(ImageIF image)
Sets the image for this feed |
void |
setLanguage(String language)
|
void |
setLastBuildDate(Date date)
|
void |
setLastUpdated(Date lastUpdated)
see ChannelIF.getLastUpdated() |
void |
setLocation(URL location)
|
void |
setPubDate(Date pubDate)
|
void |
setPublisher(String publisher)
|
void |
setRating(String rating)
|
void |
setSite(URL site)
|
void |
setTextInput(TextInputIF textInput)
|
void |
setTitle(String title)
|
void |
setTtl(int ttl)
|
void |
setUpdateBase(Date updateBase)
Sets the base time against which update times should be calculated |
void |
setUpdateFrequency(int updateFrequency)
Sets the number of times during updatePeriod that the feed
should be updated |
void |
setUpdatePeriod(ChannelUpdatePeriod updatePeriod)
Sets the update frequency for the feed. |
String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Channel()
public Channel(String title)
public Channel(org.jdom.Element channelElement)
public Channel(org.jdom.Element channelElement,
String title)
| Method Detail |
|---|
public long getId()
getId in interface WithIdMIFpublic void setId(long id)
setId in interface WithIdMIFid - the identifier of the object to be set.public String getTitle()
getTitle in interface WithTitleMIFpublic void setTitle(String title)
setTitle in interface WithTitleMIFtitle - the title of the object to be setpublic String getDescription()
getDescription in interface WithDescriptionMIFpublic void setDescription(String description)
setDescription in interface WithDescriptionMIFdescription - the description of the object to be setpublic URL getLocation()
getLocation in interface WithLocationMIFpublic void setLocation(URL location)
setLocation in interface WithLocationMIFlocation - The URL where this channel can be retrieved from.public URL getSite()
getSite in interface WithSiteMIFpublic void setSite(URL site)
setSite in interface WithSiteMIFsite - the link to the site to be setpublic String getCreator()
getCreator in interface WithCreatorMIFnull if nothing
appropriate found.
For RSS 0.91 and 2.0 feeds: return text under managingEditor element For
RSS 1.0 feed: first checks if creator element exists as dublin core
metadata, and then falls back to managingEditor element For RSS 2.0
entries: checks the author element for each entry or fallback to creator
metadata element from dublin core
For Atom 0.3 and 1.0 feeds: checks author element. For Atom 1.0, multiple
authors are possible, in which case we return a list of authors delimited
by semicolon. Note that the author name itself may contain a semicolon, in
which case seperation of author names by splitting at every semicolon will
not work.public void setCreator(String creator)
setCreator in interface WithCreatorMIFcreator - the creator of the object to be setpublic String getPublisher()
getPublisher in interface ChannelIFpublic void setPublisher(String publisher)
setPublisher in interface ChannelIFpublic String getLanguage()
getLanguage in interface ChannelIFpublic void setLanguage(String language)
setLanguage in interface ChannelIFpublic String getRating()
getRating in interface ChannelIFpublic void setRating(String rating)
setRating in interface ChannelIFpublic CloudIF getCloud()
getCloud in interface ChannelIFpublic void setCloud(CloudIF cloud)
setCloud in interface ChannelIFpublic String getGenerator()
getGenerator in interface ChannelIFpublic void setGenerator(String generator)
setGenerator in interface ChannelIFpublic String getDocs()
getDocs in interface ChannelIFpublic void setDocs(String docs)
setDocs in interface ChannelIFpublic int getTtl()
getTtl in interface ChannelIFpublic void setTtl(int ttl)
setTtl in interface ChannelIFpublic ChannelFormat getFormat()
ChannelIF
getFormat in interface ChannelIFChannelFormat.public void setFormat(ChannelFormat format)
setFormat in interface ChannelIFpublic Set<ItemIF> getItems()
getItems in interface ChannelIFItemIF objects.public void addItem(ItemIF item)
addItem in interface ChannelIFpublic void removeItem(ItemIF item)
removeItem in interface ChannelIFpublic ItemIF getItem(long anId)
ChannelIFWithIdMIF.getId()).
getItem in interface ChannelIFanId - the Item's id.
public ImageIF getImage()
ChannelIF
getImage in interface ChannelIFpublic void setImage(ImageIF image)
ChannelIF
setImage in interface ChannelIFimage - The imagepublic TextInputIF getTextInput()
getTextInput in interface ChannelIFpublic void setTextInput(TextInputIF textInput)
setTextInput in interface ChannelIFpublic String getCopyright()
getCopyright in interface WithSiteMIFpublic void setCopyright(String copyright)
setCopyright in interface WithSiteMIFcopyright - the copyright information to be setpublic Collection getCategories()
WithCategoriesMIF
getCategories in interface WithCategoriesMIFpublic void setCategories(Collection<CategoryIF> categories)
setCategories in interface WithCategoriesMIFpublic void addCategory(CategoryIF category)
addCategory in interface WithCategoriesMIFpublic void removeCategory(CategoryIF category)
removeCategory in interface WithCategoriesMIFpublic Date getLastUpdated()
ChannelIF
getLastUpdated in interface ChannelIFpublic void setLastUpdated(Date lastUpdated)
ChannelIFChannelIF.getLastUpdated()
setLastUpdated in interface ChannelIFpublic Date getLastBuildDate()
getLastBuildDate in interface ChannelIFpublic void setLastBuildDate(Date date)
setLastBuildDate in interface ChannelIFpublic Date getPubDate()
getPubDate in interface ChannelIFpublic void setPubDate(Date pubDate)
setPubDate in interface ChannelIFpublic void setAllProperties(ChannelIF sourceChan)
sourceChan - - ChannelIF that will supply new valuespublic ChannelUpdatePeriod getUpdatePeriod()
ChannelIF
getUpdatePeriod in interface ChannelIFpublic void setUpdatePeriod(ChannelUpdatePeriod updatePeriod)
ChannelIFupdateFrequency
should be one of:
setUpdatePeriod in interface ChannelIFupdatePeriod - See abovepublic int getUpdateFrequency()
ChannelIFupdatePeriod that a feed should be updated
getUpdateFrequency in interface ChannelIFupdatePeriod to update the
feedChannelIF.setUpdatePeriod(de.nava.informa.core.ChannelUpdatePeriod),
ChannelIF.getUpdatePeriod()public void setUpdateFrequency(int updateFrequency)
ChannelIFupdatePeriod that the feed
should be updated
setUpdateFrequency in interface ChannelIFupdateFrequency - number of times during updatePeriod to
update the feedpublic Date getUpdateBase()
ChannelIF
getUpdateBase in interface ChannelIFpublic void setUpdateBase(Date updateBase)
ChannelIF
setUpdateBase in interface ChannelIFupdateBase - The base date for updatespublic String getElementValue(String path)
WithElementsAndAttributesMIF
getElementValue in interface WithElementsAndAttributesMIFpath - a path to the child. Paths are specified as element names, separated by a "/".
Namespaces are allowed. e.g. "aaa:bbb/ccc:ddd/eee".
null if path is null.
public String[] getElementValues(String path,
String[] elements)
WithElementsAndAttributesMIF
getElementValues in interface WithElementsAndAttributesMIFpath - a path to the child. Paths are specified as element names, separated by a "/".
Namespaces are allowed. e.g. "aaa:bbb/ccc:ddd/eee".elements - An array of element names. May contain namespace specifiers.
path is null, returns the specified sub-elements for the Channel.
If elements is null, returns null.
public String getAttributeValue(String path,
String attribute)
WithElementsAndAttributesMIF
getAttributeValue in interface WithElementsAndAttributesMIFpath - a path to the root of the elements. Paths are specified as element names, separated by a "/".attribute - the attribute. May contain a namespace specifier e.g. "rdf:resource".
path is null, returns the specified attribute for the Channel.
If attribute is null, returns null.
public String[] getAttributeValues(String path,
String[] attributes)
WithElementsAndAttributesMIF
getAttributeValues in interface WithElementsAndAttributesMIFpath - a path to the child. Paths are specified as element names, separated by a "/".
Namespaces are allowed. e.g. "aaa:bbb/ccc:ddd/eee".attributes - An array of element names. May contain namespace specifiers.
path is null, returns the specified attributes for the Channel.
If attributes is null, returns null.public void addObserver(ChannelObserverIF o)
ChannelObservableIF
addObserver in interface ChannelObservableIFpublic void removeObserver(ChannelObserverIF o)
ChannelObservableIF
removeObserver in interface ChannelObservableIFpublic boolean equals(Object o)
equals in class Objecto - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.hashCode()public int hashCode()
java.util.Hashtable.
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||