Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

News.DeepSee.NewsArticle

persistent class News.DeepSee.NewsArticle extends %Library.Persistent

SQL Table Name: News_DeepSee.NewsArticle

This class represents a table of news articles, retrieved as <item> elements in an RSS feed. News.DeepSee.NewsCube defines a DeepSee cube on top of the records in this table. See the LoadFromRSS() and Populate() methods for more information on how to load data into this table.

Property Inventory

Method Inventory

Properties

property Agency as %String;
User-specified identifier for the news agency publishing the article. Passed to LoadFromRSS() when loading this table.
Property methods: AgencyDisplayToLogical(), AgencyGet(), AgencyGetStored(), AgencyIsValid(), AgencyLogicalToDisplay(), AgencyLogicalToOdbc(), AgencyNormalize(), AgencySet()
URL to the actual article, as retrieved from the <link> element in the RSS item. Typically this refers to the full article, where the RSS item only contained one or two sentences.
Property methods: LinkDisplayToLogical(), LinkGet(), LinkGetStored(), LinkIsValid(), LinkLogicalToDisplay(), LinkLogicalToOdbc(), LinkNormalize(), LinkSet()
property Pubdate as %DeepSee.Datatype.dateTime;
Article publication date, as retrieved from the <pubDate> element in the RSS item.
Property methods: PubdateDisplayToLogical(), PubdateGet(), PubdateGetStored(), PubdateIsValid(), PubdateLogicalToDisplay(), PubdateLogicalToOdbc(), PubdateNormalize(), PubdateOdbcToLogical(), PubdateSet()
property Title as %String);
Article title, as retrieved from the <title> element in the RSS item.
Property methods: TitleDisplayToLogical(), TitleGet(), TitleGetStored(), TitleIsValid(), TitleLogicalToDisplay(), TitleLogicalToOdbc(), TitleNormalize(), TitleSet()

Methods

classmethod LoadFromRSS(pAgency As %String, pServer As %String, pURL As %String) as %Status

This method loads all items in an RSS feed as records into the table projected by this class. pServer is the host name of the RSS server, and pURL the path on the server where the RSS feed can be accessed (include the leading "/"). For example, the BBC's world news feed at "http://feeds.bbci.co.uk/news/world/rss.xml" yields "feeds.bbci.co.uk" for pServer and "/news/world/rss.xml" for pURL.

pAgency can be supplied to identify the agency publishing the RSS feed.

classmethod Populate(pClearFirst As %Boolean = 0) as %Status
Convenience method grouping a few calls to LoadFromRSS(). Add more calls to other RSS feeds as desired. If pClearFirst=1, existing records in this table will be deleted prior to loading new entries.

Indexes

index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

Storage

Storage Model: CacheStorage (News.DeepSee.NewsArticle)

^News.DeepSee.NewsArticleD(ID)
=
%%CLASSNAME
Link
Title
Pubdate
Agency
FeedbackOpens in a new tab