context: function addDiscoveredFeed(uri, feed) {	var feedClass, lastPubDate, itemCount;	if(uri.host.match(new RegExp(document_host, "i"))) {  // feed is local		if(feeds_found_local == 0) {			//ds.Assert(rdfService.GetResource(schema + "Feeds"), rdfService.GetResource(schema + "child"), rdfService.GetResource(schema + "LocalFeeds"), true);			//ds.Assert(rdfService.GetResource(schema + "LocalFeeds"), rdfService.GetResource(schema + "Title"), rdfService.GetLiteral("Site Feeds"), true);			//ds.Assert(rdfService.GetResource(schema + "LocalFeeds"), rdfService.GetResource(schema + "Valuation"), rdfService.GetIntLiteral(1), true);		}		feedClass = "Feeds";		feeds_found_local++;	} else {  // feed is external		if(feeds_found_external == 0) {			ds.Assert(rdfService.GetResource(schema + "Feeds"), rdfService.GetResource(schema + "child"), rdfService.GetResource(schema + "ExternalFeeds"), true);			ds.Assert(rdfService.GetResource(schema + "ExternalFeeds"), rdfService.GetResource(schema + "Title"), rdfService.GetLiteral(strRes.getString("discovery_external_feeds_category")), true);			ds.Assert(rdfService.GetResource(schema + "ExternalFeeds"), rdfService.GetResource(schema + "Valuation"), rdfService.GetIntLiteral(0), true);		}		feedClass = "ExternalFeeds";		feeds_found_external++;	}	var twelveHourClock = CommonFunc.getPrefValue(CommonFunc.TWELVE_HOUR_CLOCK, "bool", false);	lastPubDate = "N/A";	if(feed.hasLastPubDate()) {		lastPubDate = dateFormat(feed.getLastPubDate(), twelveHourClock, 1);	}	itemCount = feed.getItemCount();	// feed valuation	var valuation = 0;	if(possibleFeeds[uri.spec][1] == "explicit") valuation += 100;	if(feedClass == "Feeds") valuation += 10;	if(feed.hasLastPubDate()) valuation += 1;		ds.Assert(rdfService.GetResource(schema + feedClass), rdfService.GetResource(schema + "child"), rdfService.GetResource(schema + uri.spec), true);	ds.Assert(rdfService.GetResource(schema + uri.spec), rdfService.GetResource(schema + "Title"), rdfService.GetLiteral(feed.getTitle()), true);	ds.Assert(rdfService.GetResource(schema + uri.spec), rdfService.GetResource(schema + "Format"), rdfService.GetLiteral(feed.getFormat()), true);	ds.Assert(rdfService.GetResource(schema + uri.spec), rdfService.GetResource(schema + "URL"), rdfService.GetLiteral(uri.spec), true);	ds.Assert(rdfService.GetResource(schema + uri.spec), rdfService.GetResource(schema + "LastPubDate"), rdfService.GetLiteral(lastPubDate), true);	ds.Assert(rdfService.GetResource(schema + uri.spec), rdfService.GetResource(schema + "ItemCount"), rdfService.GetLiteral(itemCount), true);	ds.Assert(rdfService.GetResource(schema + uri.spec), rdfService.GetResource(schema + "Valuation"), rdfService.GetIntLiteral(valuation), true);	feedTree.builder.rebuild();	logMessage("discovered feed: " + uri.spec);}
meta: 359	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/359/674560409a5107140c643f22c96aa9b87d208e3e/discover_feeds.js/buggy/src/sage/content/discover_feeds.js