|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.nava.informa.impl.hibernate.Channel
public class Channel
Hibernate implementation of the ChannelIF interface.
Constructor Summary | |
---|---|
Channel()
|
|
Channel(org.jdom.Element channelElement)
|
|
Channel(org.jdom.Element channelElement,
String title)
|
|
Channel(org.jdom.Element channelElement,
String title,
String location)
|
|
Channel(String title)
|
|
Channel(String title,
String location)
|
|
Channel(String title,
URL location)
|
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)
Compare two Channels for equality. |
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 |
getFormatString()
|
String |
getGenerator()
|
Set<ChannelGroup> |
getGroups()
|
long |
getId()
|
ImageIF |
getImage()
Retrieves the Image associated with this feed. |
ItemIF |
getItem(long itemId)
Returns the news item as specified by the item identifier ( WithIdMIF.getId() ). |
Set<ItemIF> |
getItems()
|
String |
getLanguage()
|
Date |
getLastBuildDate()
RSS 0.91: The date-time the last time the content of the channel changed. |
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()
|
String |
getLocationString()
|
Date |
getPubDate()
|
String |
getPublisher()
|
String |
getRating()
|
URL |
getSite()
|
String |
getSiteString()
|
TextInputIF |
getTextInput()
|
String |
getTitle()
|
int |
getTtl()
RSS 2.0: ttl stands for time to live. |
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()
Hashcode, like equals, is touchy and critical for proper functioning of Hibernate. |
void |
notifyObserversChannelUpdated()
Loops through and notifies each observer if a new item was detected. |
void |
notifyObserversItemAdded(ItemIF newItem)
Loops through and notifies each observer if a new item was detected. |
void |
removeCategory(CategoryIF category)
|
void |
removeItem(ItemIF item)
|
void |
removeObserver(ChannelObserverIF o)
Removes an observer from the set of observers of this object. |
void |
setCategories(Collection<CategoryIF> aCategories)
|
void |
setCloud(CloudIF aCloud)
|
void |
setCopyright(String aCopyright)
|
void |
setCreator(String aCreator)
|
void |
setDescription(String aDescription)
|
void |
setDocs(String aDocs)
|
void |
setFormat(ChannelFormat aFormat)
|
void |
setFormatString(String strFormat)
|
void |
setGenerator(String aGenerator)
|
void |
setGroups(Set<ChannelGroup> aGroups)
|
void |
setId(long id)
|
void |
setImage(ImageIF anImage)
Sets the image for this feed |
void |
setItems(Set<ItemIF> anItems)
|
void |
setLanguage(String aLanguage)
|
void |
setLastBuildDate(Date date)
|
void |
setLastUpdated(Date date)
see ChannelIF.getLastUpdated() |
void |
setLocation(URL location)
|
void |
setLocationString(String loc)
|
void |
setPubDate(Date date)
|
void |
setPublisher(String aPublisher)
|
void |
setRating(String aRating)
|
void |
setSite(URL site)
|
void |
setSiteString(String siteUrl)
|
void |
setTextInput(TextInputIF aTextInput)
|
void |
setTitle(String aTitle)
|
void |
setTtl(int aTtl)
|
void |
setUpdateBase(Date date)
Sets the base time against which update times should be calculated |
void |
setUpdateFrequency(int anUpdateFrequency)
Sets the number of times during updatePeriod that the feed
should be updated |
void |
setUpdatePeriod(ChannelUpdatePeriod anUpdatePeriod)
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(String title, String location)
public Channel(String title, URL location)
public Channel(org.jdom.Element channelElement)
public Channel(org.jdom.Element channelElement, String title)
public Channel(org.jdom.Element channelElement, String title, String location)
Method Detail |
---|
public long getId()
getId
in interface WithIdMIF
public void setId(long id)
setId
in interface WithIdMIF
id
- the identifier of the object to be set.public String getTitle()
getTitle
in interface WithTitleMIF
public void setTitle(String aTitle)
setTitle
in interface WithTitleMIF
aTitle
- the title of the object to be setpublic String getDescription()
getDescription
in interface WithDescriptionMIF
public void setDescription(String aDescription)
setDescription
in interface WithDescriptionMIF
aDescription
- the description of the object to be setpublic String getLocationString()
public void setLocationString(String loc)
public URL getLocation()
getLocation
in interface WithLocationMIF
public void setLocation(URL location)
setLocation
in interface WithLocationMIF
location
- the location to setpublic String getSiteString()
public void setSiteString(String siteUrl)
public URL getSite()
getSite
in interface WithSiteMIF
public void setSite(URL site)
setSite
in interface WithSiteMIF
site
- the link to the site to be setpublic String getCreator()
getCreator
in interface WithCreatorMIF
public void setCreator(String aCreator)
setCreator
in interface WithCreatorMIF
aCreator
- the creator of the object to be setpublic String getPublisher()
getPublisher
in interface ChannelIF
public void setPublisher(String aPublisher)
setPublisher
in interface ChannelIF
public String getLanguage()
getLanguage
in interface ChannelIF
public void setLanguage(String aLanguage)
setLanguage
in interface ChannelIF
public String getFormatString()
public void setFormatString(String strFormat)
public ChannelFormat getFormat()
ChannelIF
getFormat
in interface ChannelIF
ChannelFormat
.public void setFormat(ChannelFormat aFormat)
setFormat
in interface ChannelIF
public Set<ChannelGroup> getGroups()
public void setGroups(Set<ChannelGroup> aGroups)
public Set<ItemIF> getItems()
getItems
in interface ChannelIF
public void setItems(Set<ItemIF> anItems)
public void addItem(ItemIF item)
addItem
in interface ChannelIF
public void removeItem(ItemIF item)
removeItem
in interface ChannelIF
public ItemIF getItem(long itemId)
ChannelIF
WithIdMIF.getId()
).
getItem
in interface ChannelIF
itemId
- the Item's id.
public ImageIF getImage()
ChannelIF
getImage
in interface ChannelIF
public void setImage(ImageIF anImage)
ChannelIF
setImage
in interface ChannelIF
anImage
- The imagepublic TextInputIF getTextInput()
getTextInput
in interface ChannelIF
public void setTextInput(TextInputIF aTextInput)
setTextInput
in interface ChannelIF
public String getCopyright()
getCopyright
in interface WithSiteMIF
public void setCopyright(String aCopyright)
setCopyright
in interface WithSiteMIF
aCopyright
- the copyright information to be setpublic String getRating()
getRating
in interface ChannelIF
public void setRating(String aRating)
setRating
in interface ChannelIF
public CloudIF getCloud()
getCloud
in interface ChannelIF
public void setCloud(CloudIF aCloud)
setCloud
in interface ChannelIF
public String getGenerator()
getGenerator
in interface ChannelIF
public void setGenerator(String aGenerator)
setGenerator
in interface ChannelIF
public String getDocs()
getDocs
in interface ChannelIF
public void setDocs(String aDocs)
setDocs
in interface ChannelIF
public int getTtl()
getTtl
in interface ChannelIF
public void setTtl(int aTtl)
setTtl
in interface ChannelIF
public Collection getCategories()
WithCategoriesMIF
getCategories
in interface WithCategoriesMIF
public void setCategories(Collection<CategoryIF> aCategories)
setCategories
in interface WithCategoriesMIF
public void addCategory(CategoryIF category)
addCategory
in interface WithCategoriesMIF
public void removeCategory(CategoryIF category)
removeCategory
in interface WithCategoriesMIF
public Date getLastUpdated()
ChannelIF
getLastUpdated
in interface ChannelIF
public void setLastUpdated(Date date)
ChannelIF
ChannelIF.getLastUpdated()
setLastUpdated
in interface ChannelIF
public Date getLastBuildDate()
getLastBuildDate
in interface ChannelIF
public void setLastBuildDate(Date date)
setLastBuildDate
in interface ChannelIF
public Date getPubDate()
getPubDate
in interface ChannelIF
public void setPubDate(Date date)
setPubDate
in interface ChannelIF
public ChannelUpdatePeriod getUpdatePeriod()
ChannelIF
getUpdatePeriod
in interface ChannelIF
ChannelIF.getUpdatePeriod()
public void setUpdatePeriod(ChannelUpdatePeriod anUpdatePeriod)
ChannelIF
updateFrequency
should be one of:
setUpdatePeriod
in interface ChannelIF
anUpdatePeriod
- See abovepublic int getUpdateFrequency()
updatePeriod
that a feed should be updated
getUpdateFrequency
in interface ChannelIF
updatePeriod
to update the
feed (the update frequency).ChannelIF.setUpdatePeriod(de.nava.informa.core.ChannelUpdatePeriod)
,
ChannelIF.getUpdatePeriod()
public void setUpdateFrequency(int anUpdateFrequency)
ChannelIF
updatePeriod
that the feed
should be updated
setUpdateFrequency
in interface ChannelIF
anUpdateFrequency
- number of times during updatePeriod
to
update the feedpublic Date getUpdateBase()
ChannelIF
getUpdateBase
in interface ChannelIF
public void setUpdateBase(Date date)
ChannelIF
setUpdateBase
in interface ChannelIF
date
- The base date for updatespublic String getElementValue(String path)
WithElementsAndAttributesMIF
getElementValue
in interface WithElementsAndAttributesMIF
path
- 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 WithElementsAndAttributesMIF
path
- 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 WithElementsAndAttributesMIF
path
- 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 WithElementsAndAttributesMIF
path
- 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 ChannelObservableIF
public void removeObserver(ChannelObserverIF o)
ChannelObservableIF
removeObserver
in interface ChannelObservableIF
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
o
- the reference object with which to compare.
true
if this object is the same as the obj
argument; false
otherwise.public int hashCode()
hashCode
in class Object
public void notifyObserversItemAdded(ItemIF newItem)
newItem
- item added.public void notifyObserversChannelUpdated()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |