Public Member Functions | Public Attributes | Protected Member Functions | Properties

dotFeedLib.feed Class Reference

Class that contains all information on a feed. More...

List of all members.

Public Member Functions

void changeFormat (feedTypes f)
 If file has been saved as ATOM-Feed / RSS-Feed execute this.
void search_replace_author (string old, string new_text)
 Search and replace in authors.
void search_replace_title (string old, string new_text)
 Search and replace in titles.
void rename_category (string old, string new_name)
 Rename a category.
void remove_category (string name)
 Remove a category.
authorList get_authors ()
 Get an array that contains all authors that are used in this feed.
categoryList get_categories ()
 Get an array that contains all categories that are used in this feed.
int new_entry ()
 Add a new entry.
void entry_add (XmlNode entry_item, XmlDocument entry_doc, feedTypes inputFormat)
 Adds a new entry (part of the merge feeds functiionality / the open functionality).
void entry_add_beginning (entry n)
 Add an entry.
string getXML (feedTypes type)
 Returns the feeds XML.
void deleteEntry (int number)
 Deletes an entry.
List< entrygetEntriesInCategory (string category)
 Gets all entries that belong to a certain category.
void add_guids ()
 Adds GUIDS to all elements that don't have any at the moment.
int getPositionOfEntryWithCertainGUID (string guid)
 If you have a GUID and want to get its position in entries[].
 feed (bool newFeed, string languageCode)
 Creates a new, empty feed.
 feed (string path)
 Opens an excisting feed either via the Web or from an excisitng file.
void save (string path, feedTypes saveFormat)
 Saves the feed.

Public Attributes

config cfg = new config()
 Is used to save configuration.
DateTime pubDate = DateTime.Now
 Time when this feed was last changed.
string title
 Title of the feed.
string link
 Link to the website of this feed.
string description
 Description of this feed.
string language
 Language of this Feed e.g: de-de : German (Germany) en-us : American English en-en : British English.
string copyright
 The feeds copyright e. G: (c) 2008-2010 Michael Schwarz.
string generator
 Name of the tool that was used to create this feed.
string imageUrl
 Contains a link to the image This is (by default) used as feed/logo when saving ATOM-Feeds If you would prefer it to be used as feed/icon you have to set a specific config value in config.cs when compiling Therefore, you should use an image with the ratio of 2:1.
string imageTitle
 Not part of ATOM-specification. Please set this to the same value as feed.title.
string imageLink
 Not part of ATOM-specification. Please set this to the same value as feed.link.
string authorOfWholeFeed
 The author of the whole feed (e.g. somebody@example.com (John Somebody).
feedTypes feedType = feedTypes.RSS
 the type of the feed (RSS or ATOM)
entry[] entries
 Array that contains all entries of this feed.
bool useAtomAttributesInRss = false
 If true, the atom namespace will be added to RSS-Feeds If you set this to true, you can use atom:link="rel" in entries.
string linkToFeedItself = ""
 The path that can be used to rech this file Is only used if feed is ATOM or if useAtomAttributesInRss is true.

Protected Member Functions

void readRestRssAfterRedo (XmlDocument doc)
 function added for Easy Feed Editor. Not supported -> don't use anywhere else
void readRestRSS (XmlDocument doc)
 Please do not use. Only for internal use.

Properties

string rssVersion [get]
 RSS-Version This is only set if the feed is a RSS-Feed.
string additionalXmlns [set]
 Additional XMLNS-Declerations that should be added to the rss(RSS) or feed(ATOM) tag Note: write-only you have to handle this completly by yourself; dotFeedLib does only add this; apart from this,nothing happens with this information.

Detailed Description

Class that contains all information on a feed.


Constructor & Destructor Documentation

dotFeedLib.feed.feed ( bool  newFeed,
string  languageCode 
)

Creates a new, empty feed.

Parameters:
newFeed ignored
languageCode languageCode for the new feed e.g. en-us or de-de
dotFeedLib.feed.feed ( string  path  ) 

Opens an excisting feed either via the Web or from an excisitng file.

Parameters:
path absolute path or valid URI

Member Function Documentation

void dotFeedLib.feed.add_guids (  ) 

Adds GUIDS to all elements that don't have any at the moment.

void dotFeedLib.feed.changeFormat ( feedTypes  f  ) 

If file has been saved as ATOM-Feed / RSS-Feed execute this.

Parameters:
f new feedType
void dotFeedLib.feed.deleteEntry ( int  number  ) 

Deletes an entry.

Parameters:
number the position of the entry that is to be deleted
void dotFeedLib.feed.entry_add ( XmlNode  entry_item,
XmlDocument  entry_doc,
feedTypes  inputFormat 
)

Adds a new entry (part of the merge feeds functiionality / the open functionality).

Parameters:
entry_item XML-Node of the current-Item
entry_doc XML-Document that contains current-Item
inputFormat the input format
void dotFeedLib.feed.entry_add_beginning ( entry  n  ) 

Add an entry.

Parameters:
n The entry that will be added (make sure you it's cloned if you want to copy an entry)
authorList dotFeedLib.feed.get_authors (  ) 

Get an array that contains all authors that are used in this feed.

Returns:
authorList that conatains all authors
categoryList dotFeedLib.feed.get_categories (  ) 

Get an array that contains all categories that are used in this feed.

Returns:
categoryList that conatains all categories
List<entry> dotFeedLib.feed.getEntriesInCategory ( string  category  ) 

Gets all entries that belong to a certain category.

Parameters:
category category that items should belong to
Returns:
all entries that are part of this category
int dotFeedLib.feed.getPositionOfEntryWithCertainGUID ( string  guid  ) 

If you have a GUID and want to get its position in entries[].

Parameters:
guid The GUID you're looking for
Returns:
position in entries[] or -1 if there's no entry with this GUID
string dotFeedLib.feed.getXML ( feedTypes  type  ) 

Returns the feeds XML.

Parameters:
type feedType you would like to use
Returns:
XML-Code
int dotFeedLib.feed.new_entry (  ) 

Add a new entry.

Returns:
id of the new entry
void dotFeedLib.feed.readRestRSS ( XmlDocument  doc  )  [protected]

Please do not use. Only for internal use.

Parameters:
doc XMlDocument
void dotFeedLib.feed.readRestRssAfterRedo ( XmlDocument  doc  )  [protected]

function added for Easy Feed Editor. Not supported -> don't use anywhere else

Parameters:
doc XMlDocument
void dotFeedLib.feed.remove_category ( string  name  ) 

Remove a category.

Parameters:
name Name of the category
void dotFeedLib.feed.rename_category ( string  old,
string  new_name 
)

Rename a category.

Parameters:
old old name
new_name new name
void dotFeedLib.feed.save ( string  path,
feedTypes  saveFormat 
)

Saves the feed.

Parameters:
path Full path of File
saveFormat Fomrat in which Feed should be saved
void dotFeedLib.feed.search_replace_author ( string  old,
string  new_text 
)

Search and replace in authors.

Parameters:
old search for
new_text replace with
void dotFeedLib.feed.search_replace_title ( string  old,
string  new_text 
)

Search and replace in titles.

Parameters:
old search for
new_text replace with

Member Data Documentation

The author of the whole feed (e.g. somebody@example.com (John Somebody).

Is used to save configuration.

The feeds copyright e. G: (c) 2008-2010 Michael Schwarz.

Description of this feed.

Array that contains all entries of this feed.

the type of the feed (RSS or ATOM)

Name of the tool that was used to create this feed.

Not part of ATOM-specification. Please set this to the same value as feed.link.

Not part of ATOM-specification. Please set this to the same value as feed.title.

Contains a link to the image This is (by default) used as feed/logo when saving ATOM-Feeds If you would prefer it to be used as feed/icon you have to set a specific config value in config.cs when compiling Therefore, you should use an image with the ratio of 2:1.

Language of this Feed e.g: de-de : German (Germany) en-us : American English en-en : British English.

Link to the website of this feed.

The path that can be used to rech this file Is only used if feed is ATOM or if useAtomAttributesInRss is true.

DateTime dotFeedLib.feed.pubDate = DateTime.Now

Time when this feed was last changed.

Title of the feed.

If true, the atom namespace will be added to RSS-Feeds If you set this to true, you can use atom:link="rel" in entries.


Property Documentation

string dotFeedLib.feed.additionalXmlns [set]

Additional XMLNS-Declerations that should be added to the rss(RSS) or feed(ATOM) tag Note: write-only you have to handle this completly by yourself; dotFeedLib does only add this; apart from this,nothing happens with this information.

string dotFeedLib.feed.rssVersion [get]

RSS-Version This is only set if the feed is a RSS-Feed.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties