Exemplo n.º 1
0
        public override Indexable GetNextIndexable()
        {
            TB.RssFeed feed = DbEnumerator.Current as TB.RssFeed;

            // If status is different, than something happend when loading this mail and we dont'
            // want to change it's status.
            if (feed.GetObject("FullIndex") == null)
            {
                feed.SetObject("FullIndex", (object)FullIndex);
            }

            return(RssFeedToIndexable(feed));
        }
Exemplo n.º 2
0
        private Indexable RssFeedToIndexable(TB.RssFeed feed)
        {
            Indexable    indexable;
            StringReader content = feed.Content;

            indexable          = NewIndexable(feed.Uri, DateTime.Parse(feed.GetString("date")).ToUniversalTime(), "FeedItem");
            indexable.MimeType = "text/html";

            indexable.AddProperty(Property.NewKeyword("dc:identifier", feed.GetString("message-id")));
            indexable.AddProperty(Property.NewKeyword("dc:source", feed_url));
            indexable.AddProperty(Property.New("dc:publisher", feed.GetString("sender")));
            if (content == null)
            {
                indexable.AddProperty(Property.New("dc:title", feed.GetString("subject")));
            }

            indexable.SetTextReader(content);

            return(indexable);
        }