ColdBox Platform Version 3.7.0

coldbox.system.web.feeds
Class FeedReader

WEB-INF.cftags.component
        extended by coldbox.system.web.feeds.FeedReader

public class FeedReader
extends WEB-INF.cftags.component

Feed reader plug-in additional methods


Constructor Summary
init([any controller])
 
Method Summary
 array arrayOfStructsSort(array aOfS, string key, [string sortOrder='desc'], [string sortType='textnocase'])
          Sorts a structured array by a selected value
 string findAuthor(xml itemRoot)
          Parse an item and find an author
 array findCategory(xml itemRoot, array categorynode)
          Parse an item and find a categories
 struct findComments(xml itemRoot, struct commentsnode)
          Parse an item and find comments
 string findCreatedDate(xml xmlRoot)
          Parse the document to find a created date
 string findKeywords(array categoryRoot)
          Parse an item's category array and find keywords
 array findMediaContent(xml itemRoot, array attachmentnode)
          Parse an item and find media content
 array findThumbnails(xml itemRoot, array attachmentnode)
          Parse an item and find thumbnails
 string findUpdatedDate(xml xmlRoot)
          Parse the document and find a updated date
 boolean isDateISO8601(string datetime)
          Checks if a date is in ISO8601 format
 string normalizeAtomTextConstruct(any entity)
          Send an element and it will return the appropriate text construct
 any parseAtomItems(any items, [string itemsType='array'], [numeric maxItems='0'])
          Parse the items an return an array of structures
 any parseRSSItems(any items, [string itemsType='array'], [numeric maxItems='0'])
          Parse the items an return an array of structures
 struct parseVariablesSet(struct feed)
          Set empty structure variables that will be used by parseFeed
 query querySortandTrim(query query, numeric maxRecords, string sort, string direction)
          Sorts a structured array by a selected value
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init([any controller])

Parameters:
controller
Method Detail

arrayOfStructsSort

public array arrayOfStructsSort(array aOfS, string key, [string sortOrder='desc'], [string sortType='textnocase'])
Sorts a structured array by a selected value

Parameters:
aOfS - The array to sort
key - Structure Key to sort by
sortOrder - Order to sort by, asc or desc
sortType - Text, textnocase, or numeric

findAuthor

public string findAuthor(xml itemRoot)
Parse an item and find an author

Parameters:
itemRoot - The item to look in

findCategory

public array findCategory(xml itemRoot, array categorynode)
Parse an item and find a categories

Parameters:
itemRoot - The item to look in
categorynode - Existing category to merge with categories

findComments

public struct findComments(xml itemRoot, struct commentsnode)
Parse an item and find comments

Parameters:
itemRoot - The item to look in
commentsnode - Existing comments structure to be updated

findCreatedDate

public string findCreatedDate(xml xmlRoot)
Parse the document to find a created date

Parameters:
xmlRoot - The XML root to look in

findKeywords

public string findKeywords(array categoryRoot)
Parse an item's category array and find keywords

Parameters:
categoryRoot - The category root to look in

findMediaContent

public array findMediaContent(xml itemRoot, array attachmentnode)
Parse an item and find media content

Parameters:
itemRoot - The item to look in
attachmentnode - Existing attachments to merge with media content

findThumbnails

public array findThumbnails(xml itemRoot, array attachmentnode)
Parse an item and find thumbnails

Parameters:
itemRoot - The item to look in
attachmentnode - Existing attachments to merge with thumbnails

findUpdatedDate

public string findUpdatedDate(xml xmlRoot)
Parse the document and find a updated date

Parameters:
xmlRoot - The XML root to look in

isDateISO8601

public boolean isDateISO8601(string datetime)
Checks if a date is in ISO8601 format

Parameters:
datetime - The datetime string to check

normalizeAtomTextConstruct

public string normalizeAtomTextConstruct(any entity)
Send an element and it will return the appropriate text construct

Parameters:
entity - The XML construct

parseAtomItems

public any parseAtomItems(any items, [string itemsType='array'], [numeric maxItems='0'])
Parse the items an return an array of structures

Parameters:
items - The xml of items
itemsType - The type of the items either query or array, array is used by default
maxItems - The maximum number of entries to retrieve, default is display all

parseRSSItems

public any parseRSSItems(any items, [string itemsType='array'], [numeric maxItems='0'])
Parse the items an return an array of structures

Parameters:
items - The xml of items
itemsType - The type of the items either query or array, array is used by default
maxItems - The maximum number of entries to retrieve, default is display all

parseVariablesSet

public struct parseVariablesSet(struct feed)
Set empty structure variables that will be used by parseFeed

Parameters:
feed - Structure of the current state of the parseFeed process

querySortandTrim

public query querySortandTrim(query query, numeric maxRecords, string sort, string direction)
Sorts a structured array by a selected value

Parameters:
query - The query to trim
maxRecords - Trim to maximum records
sort - Sort query by this column
direction - Sort direction, either 'asc' or 'desc'

ColdBox Platform Version 3.7.0