|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.nava.informa.impl.basic.Item
public class Item
In-Memory implementation of the ItemIF interface.
Constructor Summary | |
---|---|
Item()
|
|
Item(ChannelIF channel,
String title,
String description,
URL link)
|
|
Item(org.jdom.Element itemElement,
ChannelIF channel,
String title,
String description,
URL link)
|
|
Item(org.jdom.Element itemElement,
String title,
String description,
URL link)
|
|
Item(String title,
String description,
URL link)
|
Method Summary | |
---|---|
void |
addCategory(CategoryIF category)
|
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. |
ChannelIF |
getChannel()
|
URL |
getComments()
|
String |
getCreator()
|
Date |
getDate()
|
String |
getDescription()
|
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. |
ItemEnclosureIF |
getEnclosure()
|
Date |
getFound()
|
ItemGuidIF |
getGuid()
|
long |
getId()
|
URL |
getLink()
|
ItemSourceIF |
getSource()
|
String |
getSubject()
|
String |
getTitle()
|
boolean |
getUnRead()
|
int |
hashCode()
Returns a hash code value for the object. |
void |
removeCategory(CategoryIF category)
|
void |
setCategories(Collection<CategoryIF> categories)
|
void |
setChannel(ChannelIF channel)
|
void |
setComments(URL comments)
|
void |
setCreator(String creator)
|
void |
setDate(Date date)
|
void |
setDescription(String description)
|
void |
setEnclosure(ItemEnclosureIF enclosure)
|
void |
setFound(Date found)
|
void |
setGuid(ItemGuidIF guid)
|
void |
setId(long id)
|
void |
setLink(URL link)
|
void |
setSource(ItemSourceIF source)
|
void |
setSubject(String subject)
|
void |
setTitle(String title)
|
void |
setUnRead(boolean val)
|
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 Item()
public Item(String title, String description, URL link)
public Item(ChannelIF channel, String title, String description, URL link)
public Item(org.jdom.Element itemElement, String title, String description, URL link)
public Item(org.jdom.Element itemElement, ChannelIF channel, String title, String description, URL link)
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 ChannelIF getChannel()
getChannel
in interface WithChannelMIF
public void setChannel(ChannelIF channel)
setChannel
in interface WithChannelMIF
channel
- the channel, this object is related topublic String getTitle()
getTitle
in interface WithTitleMIF
public void setTitle(String title)
setTitle
in interface WithTitleMIF
title
- the title of the object to be setpublic String getDescription()
getDescription
in interface WithDescriptionMIF
public void setDescription(String description)
setDescription
in interface WithDescriptionMIF
description
- the description of the object to be setpublic boolean getUnRead()
getUnRead
in interface WithUnreadMIF
public void setUnRead(boolean val)
setUnRead
in interface WithUnreadMIF
val
- boolean to indicate whether this item is unread or not.public URL getLink()
getLink
in interface WithLinkMIF
public void setLink(URL link)
setLink
in interface WithLinkMIF
link
- the URL where the request action should be sent topublic Collection getCategories()
WithCategoriesMIF
getCategories
in interface WithCategoriesMIF
public void setCategories(Collection<CategoryIF> categories)
setCategories
in interface WithCategoriesMIF
public void addCategory(CategoryIF category)
addCategory
in interface WithCategoriesMIF
public void removeCategory(CategoryIF category)
removeCategory
in interface WithCategoriesMIF
public String getCreator()
getCreator
in interface WithCreatorMIF
null
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 WithCreatorMIF
creator
- the creator of the object to be setpublic String getSubject()
getSubject
in interface ItemIF
public void setSubject(String subject)
setSubject
in interface ItemIF
public Date getDate()
getDate
in interface ItemIF
public void setDate(Date date)
setDate
in interface ItemIF
public Date getFound()
getFound
in interface ItemIF
public void setFound(Date found)
setFound
in interface ItemIF
public ItemGuidIF getGuid()
getGuid
in interface ItemIF
public void setGuid(ItemGuidIF guid)
setGuid
in interface ItemIF
public URL getComments()
getComments
in interface ItemIF
public void setComments(URL comments)
setComments
in interface ItemIF
public ItemSourceIF getSource()
getSource
in interface ItemIF
public void setSource(ItemSourceIF source)
setSource
in interface ItemIF
public ItemEnclosureIF getEnclosure()
getEnclosure
in interface ItemIF
public void setEnclosure(ItemEnclosureIF enclosure)
setEnclosure
in interface ItemIF
public 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 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.
NOTE: Please keep this code in sync with de.nava.informa.impl.hibernate.Item.equals().hashCode()
public int hashCode()
java.util.Hashtable
.
NOTE: Please keep this code in sync with de.nava.informa.impl.hibernate.Item.hashCode().
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |