Syndication::Atom::FeedDocument

Search for usage in LXR

Syndication::Atom::FeedDocument Class Reference

#include <document.h>

Inheritance diagram for Syndication::Atom::FeedDocument:

Public Member Functions

 FeedDocument ()
 
 FeedDocument (const QDomElement &element)
 
bool accept (DocumentVisitor *visitor) override
 
QList< Personauthors () const
 
QList< Categorycategories () const
 
QList< Personcontributors () const
 
QString debugInfo () const override
 
QList< Entryentries () const
 
Generator generator () const
 
QString icon () const
 
QString id () const
 
bool isValid () const override
 
QList< Linklinks () const
 
QString logo () const
 
QString rights () const
 
QString subtitle () const
 
QString title () const
 
QList< QDomElementunhandledElements () const
 
time_t updated () const
 
- Public Member Functions inherited from Syndication::SpecificDocument
virtual ~SpecificDocument ()
 
- Public Member Functions inherited from Syndication::ElementWrapper
 ElementWrapper ()
 
 ElementWrapper (const ElementWrapper &other)
 
 ElementWrapper (const QDomElement &element)
 
virtual ~ElementWrapper ()
 
QString attribute (const QString &name, const QString &defValue=QString()) const
 
QString attributeNS (const QString &nsURI, const QString &localName, const QString &defValue=QString()) const
 
QString childNodesAsXML () const
 
QString completeURI (const QString &uri) const
 
const QDomElementelement () const
 
QList< QDomElementelementsByTagName (const QString &tagName) const
 
QList< QDomElementelementsByTagNameNS (const QString &nsURI, const QString &tagName) const
 
QString extractElementText (const QString &tagName) const
 
QString extractElementTextNS (const QString &namespaceURI, const QString &localName) const
 
QDomElement firstElementByTagNameNS (const QString &nsURI, const QString &tagName) const
 
bool hasAttribute (const QString &name) const
 
bool hasAttributeNS (const QString &nsURI, const QString &localName) const
 
bool isNull () const
 
ElementWrapperoperator= (const ElementWrapper &other)
 
bool operator== (const ElementWrapper &other) const
 
QString text () const
 
QString xmlBase () const
 
QString xmlLang () const
 

Additional Inherited Members

- Static Public Member Functions inherited from Syndication::ElementWrapper
static QString childNodesAsXML (const QDomElement &parent)
 

Detailed Description

An Atom 1.0 Feed Document, containing metadata describing the feed and a number of entries.

Author
Frank Osterfeld

Definition at line 43 of file atom/document.h.

Constructor & Destructor Documentation

◆ FeedDocument() [1/2]

Syndication::Atom::FeedDocument::FeedDocument ( )

default constructor, creates a null feed, which is invalid.

See also
isValid()

Definition at line 30 of file atom/document.cpp.

◆ FeedDocument() [2/2]

Syndication::Atom::FeedDocument::FeedDocument ( const QDomElement & element)
explicit

creates a FeedDocument wrapping an atom:feed element.

Parameters
elementa DOM element, should be a atom:feed document (although not enforced), otherwise this object will not parse anything useful

Definition at line 35 of file atom/document.cpp.

Member Function Documentation

◆ accept()

bool Syndication::Atom::FeedDocument::accept ( DocumentVisitor * visitor)
overridevirtual

Used by visitors for double dispatch.

See DocumentVisitor for more information.

Parameters
visitorthe visitor calling the method

Implements Syndication::SpecificDocument.

Definition at line 40 of file atom/document.cpp.

◆ authors()

QList< Person > Syndication::Atom::FeedDocument::authors ( ) const

a list of persons who are the authors of this feed.

According to the Atom 1.0 spec, a feed must have an author unless all entries in it have one.

Definition at line 45 of file atom/document.cpp.

◆ categories()

QList< Category > Syndication::Atom::FeedDocument::categories ( ) const

a list of categories this feed is assigned to (optional)

Definition at line 71 of file atom/document.cpp.

◆ contributors()

QList< Person > Syndication::Atom::FeedDocument::contributors ( ) const

a list of persons who contribute to this feed.

(optional)

Definition at line 58 of file atom/document.cpp.

◆ debugInfo()

QString Syndication::Atom::FeedDocument::debugInfo ( ) const
overridevirtual

returns a description of this feed document for debugging purposes.

Returns
debug string

Implements Syndication::SpecificDocument.

Definition at line 200 of file atom/document.cpp.

◆ entries()

QList< Entry > Syndication::Atom::FeedDocument::entries ( ) const

a list of the entries (items) in this feed.

Definition at line 142 of file atom/document.cpp.

◆ generator()

Generator Syndication::Atom::FeedDocument::generator ( ) const

description of the agent used to generate the feed.

See Generator for more information (optional).

Returns
description of the generator, or a null Generator object if not specified in the feed.

Definition at line 84 of file atom/document.cpp.

◆ icon()

QString Syndication::Atom::FeedDocument::icon ( ) const

URL of an image serving as a feed icon (optional)

Returns
icon URL, or a null string if not specified in the feed.

Definition at line 89 of file atom/document.cpp.

◆ id()

QString Syndication::Atom::FeedDocument::id ( ) const

a string that unambiguously identifies the feed (required)

Returns
the ID of the feed. As defined in the Atom spec it must be a valid URI (which is neither checked nor enforced by this parser)

Definition at line 103 of file atom/document.cpp.

◆ isValid()

bool Syndication::Atom::FeedDocument::isValid ( ) const
overridevirtual

returns whether this document is valid or not.

Invalid documents do not contain any useful information.

Implements Syndication::SpecificDocument.

Definition at line 195 of file atom/document.cpp.

◆ links()

QList< Link > Syndication::Atom::FeedDocument::links ( ) const

a list of links.

See Link for more information on link types.

Definition at line 129 of file atom/document.cpp.

◆ logo()

QString Syndication::Atom::FeedDocument::logo ( ) const

URL of an image serving as a feed logo (optional)

Returns
image URL, or a null string if not specified in the feed.

Definition at line 98 of file atom/document.cpp.

◆ rights()

QString Syndication::Atom::FeedDocument::rights ( ) const

copyright information (optional)

Returns
copyright information for the feed (intended for human readers), or a null string if not specified

Definition at line 108 of file atom/document.cpp.

◆ subtitle()

QString Syndication::Atom::FeedDocument::subtitle ( ) const

description or subtitle of the feed (optional).

Returns
subtitle string as HTML, or a null string if not specified in the feed.

Definition at line 118 of file atom/document.cpp.

◆ title()

QString Syndication::Atom::FeedDocument::title ( ) const

feed title (required).

Returns
title string as HTML.

Definition at line 113 of file atom/document.cpp.

◆ unhandledElements()

QList< QDomElement > Syndication::Atom::FeedDocument::unhandledElements ( ) const

returns all child elements of this feed not covered by this class.

This can be used to access additional metadata from Atom extensions.

Definition at line 159 of file atom/document.cpp.

◆ updated()

time_t Syndication::Atom::FeedDocument::updated ( ) const

The datetime of the last modification of the feed content.

Returns
the modification date in seconds since epoch

Definition at line 123 of file atom/document.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:02:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.