ColdBox Platform v3.8.0

coldbox.system.web.feeds
Class SharedGenerator

WEB-INF.cftags.component
        extended by coldbox.system.web.feeds.SharedGenerator
Direct Known Subclasses:
RSS2Generator

public class SharedGenerator
extends WEB-INF.cftags.component

Methods belonging to the FeedGenerator plug-in that specifically relate to feed creation

Constructor Summary
init()
 
Method Summary
private string RSSFormat(string string)
          A CFML XMLFormat() tag replacement that converts high characters to XML safe Unicode
private string URLFormat(string string)
          A CFML XMLFormat() tag replacement that converts URL strings into XML safe, escaped mark-up
 string XSLFormat()
          An Extensible Stylesheet (XSL) used to cleanup whitespace within our generated XML code
 string cclicenseGenChannel(struct fs)
          Generate Creative Commons extension channel XML
 string cclicenseGenItem(query items, struct map, numeric currentrow)
          Generate Creative Commons extension item XML
 string cclicenseValChannel(struct fs)
          Validate Creative Commons extension channel element
 string cclicenseValItem(query fi, struct map, numeric currentrow)
          Validate Creative Commons extension item element
 struct createInstances(struct instance)
          Variables used for the validation and creation of feed data
 string dcmtGenChannel(struct fs)
          Generate DCMI Metadata terms extension channel XML
 string dcmtGenItem(query items, struct map, numeric currentrow)
          Generate DCMI Metadata terms extension item XML
private string generateExtensionNameSpace(string keys)
          Generates the XML namespaces for feed extensions depending on the tags in use
 struct generateExtensionPropertyMap()
          Generates the extensions default property map
private string generateNum1kSeparator(numeric number, [string seperator=','])
          Inserts thousand-seperators into a number
private string generateNumSuffix(numeric number, [string seperator=','])
          Attaches an English oral suffix (st,nd,rd,th) to a number
private string generateRFC822Date(string targetDate)
          Generate an RFC8222 Date from a date object that conforms to GMT
 string itunesGenChannel(struct fs)
          Generate Apple iTunes extension channel XML
 string itunesGenItem(query items, struct map, numeric currentrow)
          Generate Apple iTunes extension item XML
 string itunesValChannel(struct fs)
          Validate Apple iTunes extension channel element
 string ituneseValItem(query fi, struct map, numeric currentrow)
          Validate Apple iTunes extension item element
 string opensearchGenChannel(struct fs)
          Generate OpenSearch extension channel XML
 string opensearchValChannel(struct fs)
          Validate OpenSearch extension channel elements
 struct parseColumnMap(struct columnMap)
          Parse and validate a column mapper
 string slashGenItem(query items, struct map, numeric currentrow)
          Generate Slash extension channel XML
 string slashValItem(query fi, struct map, numeric currentrow)
          Validate Slash extension item element
private struct validateDaysList(string targetList)
          Validate list object against the RSS skipDays element requirements
private struct validateHoursList(string targetList)
          Validate list object against the RSS skipHours element requirements
private boolean validateItunesDuration(string targetTime)
          Force iTunes duration formatting
private boolean validateNNInteger(string targetInt)
          Validate number object as a non-negative integer (0,1,2,3
private boolean validatePerson(string targetString)
          Validate string object against the RSS person scheme containing an e-mail and an optional name
private boolean validateRFC1766(string targetString)
          Validate string object against RFC1766 'Tags for the Identification of Languages'
private boolean validateRFC3066(string targetString)
          RFC3066 'Tags for the Identification of Languages'
private boolean validateRFC822Date(string targetDate)
          Validate date object against RFC822 'Date and Time Specification'
private boolean validateURI(string targetString)
          Validate string object against a HTTP or HTTPS, FTP, news, mailto URI
private boolean validateURL(string targetString)
          Validate string object against a URL
private boolean validatecommonslicense(string targetString)
          Validate targetString object as a URL pointing to the Creative Commons website
 
Methods inherited from class WEB-INF.cftags.component
None
 

Constructor Detail

init

public init()

Method Detail

RSSFormat

private string RSSFormat(string string)
A CFML XMLFormat() tag replacement that converts high characters to XML safe Unicode

Parameters:
string - The target string

URLFormat

private string URLFormat(string string)
A CFML XMLFormat() tag replacement that converts URL strings into XML safe, escaped mark-up

Parameters:
string - The target string

XSLFormat

public string XSLFormat()
An Extensible Stylesheet (XSL) used to cleanup whitespace within our generated XML code


cclicenseGenChannel

public string cclicenseGenChannel(struct fs)
Generate Creative Commons extension channel XML

Parameters:
fs - The structure used to build a feed

cclicenseGenItem

public string cclicenseGenItem(query items, struct map, numeric currentrow)
Generate Creative Commons extension item XML

Parameters:
items - The feed items
map - The column mapper to map items to queries
currentrow - Current item number

cclicenseValChannel

public string cclicenseValChannel(struct fs)
Validate Creative Commons extension channel element

Parameters:
fs - The structure used to build a feed

cclicenseValItem

public string cclicenseValItem(query fi, struct map, numeric currentrow)
Validate Creative Commons extension item element

Parameters:
fi - The feed items
map - The column mapper to map items to queries
currentrow - Current item number

createInstances

public struct createInstances(struct instance)
Variables used for the validation and creation of feed data

Parameters:
instance -

dcmtGenChannel

public string dcmtGenChannel(struct fs)
Generate DCMI Metadata terms extension channel XML

Parameters:
fs - The structure used to build a feed

dcmtGenItem

public string dcmtGenItem(query items, struct map, numeric currentrow)
Generate DCMI Metadata terms extension item XML

Parameters:
items - The feed items
map - The column mapper to map items to queries
currentrow - Current item number

generateExtensionNameSpace

private string generateExtensionNameSpace(string keys)
Generates the XML namespaces for feed extensions depending on the tags in use

Parameters:
keys - A list of distinct column and structures keys

generateExtensionPropertyMap

public struct generateExtensionPropertyMap()
Generates the extensions default property map


generateNum1kSeparator

private string generateNum1kSeparator(numeric number, [string seperator=','])
Inserts thousand-seperators into a number

Parameters:
number - Integer
seperator - Seperator character

generateNumSuffix

private string generateNumSuffix(numeric number, [string seperator=','])
Attaches an English oral suffix (st,nd,rd,th) to a number

Parameters:
number - Integer
seperator - Seperator character

generateRFC822Date

private string generateRFC822Date(string targetDate)
Generate an RFC8222 Date from a date object that conforms to GMT

Parameters:
targetDate - The target date which must be a valid date

itunesGenChannel

public string itunesGenChannel(struct fs)
Generate Apple iTunes extension channel XML

Parameters:
fs - The structure used to build a feed

itunesGenItem

public string itunesGenItem(query items, struct map, numeric currentrow)
Generate Apple iTunes extension item XML

Parameters:
items - The feed items
map - The column mapper to map items to queries
currentrow - Current item number

itunesValChannel

public string itunesValChannel(struct fs)
Validate Apple iTunes extension channel element

Parameters:
fs - The structure used to build a feed

ituneseValItem

public string ituneseValItem(query fi, struct map, numeric currentrow)
Validate Apple iTunes extension item element

Parameters:
fi - The feed items
map - The column mapper to map items to queries
currentrow - Current item number

opensearchGenChannel

public string opensearchGenChannel(struct fs)
Generate OpenSearch extension channel XML

Parameters:
fs - The structure used to build a feed

opensearchValChannel

public string opensearchValChannel(struct fs)
Validate OpenSearch extension channel elements

Parameters:
fs - The structure used to build a feed

parseColumnMap

public struct parseColumnMap(struct columnMap)
Parse and validate a column mapper

Parameters:
columnMap - The column map to parse

slashGenItem

public string slashGenItem(query items, struct map, numeric currentrow)
Generate Slash extension channel XML

Parameters:
items - The feed items
map - The column mapper to map items to queries
currentrow - Current item number

slashValItem

public string slashValItem(query fi, struct map, numeric currentrow)
Validate Slash extension item element

Parameters:
fi - The feed items
map - The column mapper to map items to queries
currentrow - Current item number

validateDaysList

private struct validateDaysList(string targetList)
Validate list object against the RSS skipDays element requirements

Parameters:
targetList - The target list

validateHoursList

private struct validateHoursList(string targetList)
Validate list object against the RSS skipHours element requirements

Parameters:
targetList - The target list

validateItunesDuration

private boolean validateItunesDuration(string targetTime)
Force iTunes duration formatting

Parameters:
targetTime - The target duration time

validateNNInteger

private boolean validateNNInteger(string targetInt)
Validate number object as a non-negative integer (0,1,2,3..)

Parameters:
targetInt - The target integer

validatePerson

private boolean validatePerson(string targetString)
Validate string object against the RSS person scheme containing an e-mail and an optional name

Parameters:
targetString - The target string

validateRFC1766

private boolean validateRFC1766(string targetString)
Validate string object against RFC1766 'Tags for the Identification of Languages'

Parameters:
targetString - The target string.

validateRFC3066

private boolean validateRFC3066(string targetString)
RFC3066 'Tags for the Identification of Languages'

Parameters:
targetString - The target string

validateRFC822Date

private boolean validateRFC822Date(string targetDate)
Validate date object against RFC822 'Date and Time Specification'

Parameters:
targetDate - The target date.

validateURI

private boolean validateURI(string targetString)
Validate string object against a HTTP or HTTPS, FTP, news, mailto URI

Parameters:
targetString - The target string

validateURL

private boolean validateURL(string targetString)
Validate string object against a URL

Parameters:
targetString - The target string

validatecommonslicense

private boolean validatecommonslicense(string targetString)
Validate targetString object as a URL pointing to the Creative Commons website

Parameters:
targetString - The target string

ColdBox Platform v3.8.0