<commit_before><?php
/**
  * @package ExternalData
  * @subpackage RSS
  */

/**
  */
includePackage('RSS');

/**
  * @package ExternalData
  * @subpackage RSS
  */
class RSSDataParser extends XMLDataParser
{
    protected $channel;
    protected $channelClass='RSSChannel';
    protected $itemClass='RSSItem';
    protected $imageClass='RSSImage';
    protected $enclosureClass='RSSEnclosure';
    protected $imageEnclosureClass='RSSImageEnclosure';
    protected $removeDuplicates = false;
    protected $htmlEscapedCDATA = false;
    protected $useDescriptionForContent = false;
    protected $items=array();
    protected $guids=array();

    protected static $startElements=array(
        'RSS', 'RDF:RDF', 'CHANNEL', 'FEED', 'ITEM', 'ENTRY',
        'ENCLOSURE', 'MEDIA:THUMBNAIL','MEDIA:CONTENT', 'IMAGE', 'LINK');
    protected static $endElements=array(
        'CHANNEL', 'FEED', 'ITEM', 'ENTRY', 'DESCRIPTION');
    
    public function items()
    {
        return $this->items;
    }
    
    public function getTitle() {
        return $this->channel->getTitle();
    }

    public function init($args)
    {
        parent::init($args);
        
        if (isset($args['CHANNEL_CLASS'])) {
            $this->setChannelClass($args['CHANNEL_CLASS']);
        }

        if (isset($args['ITEM_CLASS'])) {
            $this->setItemClass($args['ITEM_CLASS']);<commit_msg>KGO-907<commit_after><?php
/**
  * @package ExternalData
  * @subpackage RSS
  */

/**
  */
includePackage('RSS');

/**
  * @package ExternalData
  * @subpackage RSS
  */
class RSSDataParser extends XMLDataParser
{
    protected $channel;
    protected $channelClass='RSSChannel';
    protected $itemClass='RSSItem';
    protected $imageClass='RSSImage';
    protected $enclosureClass='RSSEnclosure';
    protected $imageEnclosureClass='RSSImageEnclosure';
    protected $removeDuplicates = false;
    protected $htmlEscapedCDATA = false;
    protected $useDescriptionForContent = false;
    protected $items=array();
    protected $guids=array();

    protected static $startElements=array(
        'RSS', 'RDF:RDF', 'CHANNEL', 'FEED', 'ITEM', 'ENTRY',
        'ENCLOSURE', 'MEDIA:THUMBNAIL','MEDIA:CONTENT', 'IMAGE', 'LINK');
    protected static $endElements=array(
        'CHANNEL', 'FEED', 'ITEM', 'ENTRY', 'DESCRIPTION');
    
    public function items()
    {
        return $this->items;
    }
    
    public function getTitle() {
        return $this->channel->getTitle();
    }

    public function clearInternalCache() {
    	parent::clearInternalCache();
    	$this->items = array();
    	$this->guids = array();
    }

    public function init($args)
    {
        parent::init($args);
        
        if (isset($args['CHANNEL_CLASS'])) {
            $this->setChannelClass($args['CHANNEL_CLASS']);
        }

        if (isset($args['ITEM_CLASS'])) {
            $this->setItemClass($args['ITEM_CLASS']);
{'fraction_non_alphanumeric': 0.15421686746987953, 'fraction_numerical': 0.0010327022375215145, 'mean_word_length': 3.199421965317919, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2992412', 'n_tokens_mistral': 889, 'n_tokens_neox': 867, 'n_words': 167}