Syndication::Item

Syndication::Item Class Referenceabstract

#include <item.h>

Inheritance diagram for Syndication::Item:

Public Member Functions

virtual ~Item ()
 
virtual QMultiMap< QString, QDomElementadditionalProperties () const =0
 
virtual QList< PersonPtr > authors () const =0
 
virtual QList< CategoryPtrcategories () const =0
 
virtual QString commentPostUri () const =0
 
virtual int commentsCount () const =0
 
virtual QString commentsFeed () const =0
 
virtual QString commentsLink () const =0
 
virtual QString content () const =0
 
virtual time_t datePublished () const =0
 
virtual time_t dateUpdated () const =0
 
virtual QString debugInfo () const
 
virtual QString description () const =0
 
virtual QList< EnclosurePtr > enclosures () const =0
 
virtual QString id () const =0
 
virtual QString language () const =0
 
virtual QString link () const =0
 
virtual SpecificItemPtr specificItem () const =0
 
virtual QString title () const =0
 

Detailed Description

An item from a news feed.

Author
Frank Osterfeld

Definition at line 43 of file item.h.

Constructor & Destructor Documentation

Syndication::Item::~Item ( )
virtual

destructor

Definition at line 19 of file item.cpp.

Member Function Documentation

virtual QMultiMap<QString, QDomElement> Syndication::Item::additionalProperties ( ) const
pure virtual

returns a list of item metadata not covered by this class.

Can be used e.g. to access format extensions.

The returned map contains key value pairs, where the key is the tag name of the element, namespace prefix are resolved to the corresponding URIs. The value is the XML element as read from the document.

For example, to access the <itunes:keywords> element, use additionalProperties()["http://www.itunes.com/dtds/podcast-1.0.dtdkeywords"].

Currently this is only supported for RSS 0.91..0.94/2.0 and Atom formats, but not for RDF (RSS 0.9 and 1.0).

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual QList<PersonPtr> Syndication::Item::authors ( ) const
pure virtual

returns a list of persons who created the item content.

If there is a distinction between authors and contributors (Atom), both are added to the list, where authors are added first.

Returns
list of authors (and possibly other contributing persons)

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual QList<CategoryPtr> Syndication::Item::categories ( ) const
pure virtual

returns a list of categories this item is filed in.

See Category for more information on categories.

Returns
a list of categories

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual QString Syndication::Item::commentPostUri ( ) const
pure virtual

URI that can be used to post comments via an HTTP POST request using the Comment API.

For more details on the Comment API, see http://wellformedweb.org/story/9

Returns
URI for posting comments, or a null string if not set

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual int Syndication::Item::commentsCount ( ) const
pure virtual

The number of comments posted for this item.

Returns
the number of comments associated to this item, or -1 if not specified

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual QString Syndication::Item::commentsFeed ( ) const
pure virtual

URL of feed syndicating comments belonging to this item.

Returns
comments feed URL, or a null string if not set

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual QString Syndication::Item::commentsLink ( ) const
pure virtual

Link to an HTML site which contains the comments belonging to this item.

Returns
URL to the comments page, or a null string if not set

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual QString Syndication::Item::content ( ) const
pure virtual

returns the content of the item.

If provided, this is the most comprehensive text content available for this item. If it is empty, use description() (which might also contain complete article content).

This string may contain HTML markup. (Importantly, occurrences of the characters <,'
', '&', '\'' and '"' are escaped).

Returns
content string as HTML, or a null string if not set

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual time_t Syndication::Item::datePublished ( ) const
pure virtual

returns the date when the item was initially published.

Returns
publication date, as seconds since epoch (Jan 1st 1970), or 0 (epoch) if not set

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual time_t Syndication::Item::dateUpdated ( ) const
pure virtual

returns the date when the item was modified the last time.

If no such date is provided by the feed, this method returns the value of datePublished().

Returns
modification date, as seconds since epoch (Jan 1st 1970)

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

QString Syndication::Item::debugInfo ( ) const
virtual

returns a description of the item for debugging purposes

Returns
debug string

Definition at line 23 of file item.cpp.

virtual QString Syndication::Item::description ( ) const
pure virtual

returns the description of the item.

The description can either be a tag line, a short summary of the item content up to a complete article. If content() is non-empty, it

This string may contain HTML markup. (Importantly, occurrences of the characters <,'
', '&', '\'' and '"' are escaped).

Returns
the description as HTML, or a null string if not specified

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual QList<EnclosurePtr> Syndication::Item::enclosures ( ) const
pure virtual

returns a list of enclosures describing files available on the net.

(often used for audio files, so-called "Podcasts").

Returns
a list of enclosures associated with this item

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual QString Syndication::Item::id ( ) const
pure virtual

returns an identifier that identifies the item within its feed.

The ID must be unique within its feed. If no ID is provided by the feed source, a hash from title, description and content is returned. Generated hash IDs start with "hash:".

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual QString Syndication::Item::language ( ) const
pure virtual

returns the language used in the item's content

Returns
TODO: tell about language codes and link them

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual QString Syndication::Item::link ( ) const
pure virtual

returns a link to the (web) resource described by this item.

In most cases, this will be a website containing the full article associated with this item.

Returns
a URL, or a null string if not specified

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual SpecificItemPtr Syndication::Item::specificItem ( ) const
pure virtual

returns the format-specific item this object abstracts from.

Use it if you need to access format-specifics that are not covered by this abstraction.

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.

virtual QString Syndication::Item::title ( ) const
pure virtual

The title of the item.

This string may contain HTML markup.(Importantly, occurrences of the characters <,'
', '&', '\'' and '"' are escaped).

Returns
the title of the item as HTML, or a null string if not specified

Implemented in Syndication::ItemRDFImpl, Syndication::ItemAtomImpl, and Syndication::ItemRSS2Impl.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 23:03:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.