RSSKit
0.6.1
|
#import <RSSArticle.h>
Public Member Functions | |
(id) | - init |
(id) | - initWithHeadline:url:description:date: |
(void) | - setAutoClear: |
(BOOL) | - autoClear |
(NSString *) | - headline |
(NSString *) | - url |
(NSString *) | - content |
(NSArray *) | - links |
(NSDate *) | - date |
(NSURL *) | - enclosure |
(void) | - addLink: |
(void) | - setLinks: |
(void) | - setDate: |
(void) | - notifyChange |
(BOOL) | - isEqual: |
(void) | - willBeReplacedByArticle: |
(id) | - initFromStorageWithURL: |
(id) | - initWithDictionary: |
(BOOL) | - store |
(NSMutableDictionary *) | - plistDictionary |
Static Public Member Functions | |
(id< RSSArticle >) | + articleFromStorageWithURL: |
An object of this class represents an article in an RSS Feed.
- (void) addLink: | (NSURL *) | anURL |
Adds a new link to this article. This is a RSSLink object, which usually has the "type" property set to an NSString which represents the resource's MIME type. You may also specify the "rel" property, which should be one of "enclosure", "related", "alternate", "via".
Reimplemented from <RSSMutableArticle>.
References notifyChange.
+ (id< RSSArticle >) articleFromStorageWithURL: | (NSString*) | anURL |
Returns the article with the URL anURL from the storage
References RSSFactory::sharedFactory.
- (BOOL) autoClear |
Returns the feed's autoclear flag. This flag determines if the feed's articles are removed before fetching new articles.
Reimplemented from <RSSArticle>.
- (NSString *) content |
Reimplemented from <RSSArticle>.
- (NSDate*) date |
Returns the date of the publication of the article. If the source feed of this article didn't contain information about this date, the fetching date is usually returned.
Reimplemented from <RSSArticle>.
Referenced by initWithDictionary:, initWithHeadline:url:description:date:, plistDictionary, and setDate:.
- (NSURL*) enclosure |
Returns the Enclosure object of this article as URL. If there is no enclosure object, nil is returned.
Reimplemented from <RSSArticle>.
Referenced by setLinks:.
- (NSString*) headline |
Reimplemented from <RSSArticle>.
Referenced by initWithDictionary:, initWithHeadline:url:description:date:, isEqual:, and plistDictionary.
- (id) init |
Standard initializer. You shouldn't use this. Better use initWithHeadline:url:description:date:
References initWithHeadline:url:description:date:.
Referenced by initWithDictionary:, and initWithHeadline:url:description:date:.
- (id) initFromStorageWithURL: | (NSString*) | anURL |
Initialises the article with the URL anURL from the storage.
Initialises the article with the URL anURL from the storage.
Calling this method is generally a bad idea, since it doesn't allow you to decide on load-time which article is going to be created. Better use one of the RSSFactory methods for article unarchiving.
References initWithDictionary:, and RSSFactory::sharedFactory.
- (id) initWithDictionary: | (NSDictionary*) | aDictionary |
- (id) initWithHeadline: | (NSString*) | myHeadline | |
url: | (NSString*) | myUrl | |
description: | (NSString*) | myDescription | |
date: | (NSDate*) | myDate | |
Designated initializer for the RSSArticle class.
Don't create RSSArticle objects yourself. Create a RSSFeed object and let it fetch the articles for you!
myHeadline | A NSString containing the headline of the article. |
myUrl | A NSString containing the URL of the full version of the article. |
myDescription | An excerpt of the article text or the full text. |
myDate | The date as NSDate object on which this article was posted. |
References date, headline, init, links, and url.
Referenced by init.
- (BOOL) isEqual: | (id) | anObject |
- (NSArray*) links |
Returns an NSArray containing NSURL objects or nil, if there are none. The contained NSURL objects often have the "type" and "rel" properties set. See the documentation for addLink: for details.
Reimplemented from <RSSArticle>.
Referenced by initWithDictionary:, and initWithHeadline:url:description:date:.
- (void) notifyChange |
- (NSMutableDictionary *) plistDictionary |
- (void) setAutoClear: | (BOOL) | autoClear |
Sets the feed's autoclear flag. This flag determines if the feed's articles are removed before fetching new articles.
Reimplemented from <RSSArticle>.
- (void) setDate: | (NSDate *) | aDate |
- (void) setLinks: | (NSArray *) | someLinks |
Replaces the list of links with a new one. See the documentation for addLink: for details. Hint: The parameter may also be nil.
Reimplemented from <RSSMutableArticle>.
References enclosure, and notifyChange.
- (BOOL) store |
Stores the article (usually as a file in the Reader folder).
References plistDictionary.
- (NSString*) url |
Reimplemented from <RSSArticle>.
Referenced by initWithDictionary:, initWithHeadline:url:description:date:, isEqual:, and plistDictionary.
- (void) willBeReplacedByArticle: | (id<RSSMutableArticle>) | newArticle |
This method is intended to make sure that the replacing article keeps some fields from the old (this) article. Subclasses will probably want to override this, but shouldn't forget calling the super implementation, first.
References <RSSMutableArticle>::setDate:.