context:     function Init()    {        // this is the main rdf file.                var mainRegistry = RDF.GetDataSource('resource://res/rdf/SoftwareUpdates.rdf');                var mainContainer = Components.classes['component://netscape/rdf/container'].createInstance();        mainContainer = mainContainer.QueryInterface(Components.interfaces.nsIRDFContainer);        mainContainer.Init(mainRegistry, RDF.GetResource('NC:SoftwareUpdateDataSources'));        // Now enumerate all of the softwareupdate datasources.        var mainEnumerator = mainContainer.GetElements();        while (mainEnumerator.HasMoreElements())         {            var aDistributor = mainEnumerator.GetNext();            aDistributor = aDistributor.QueryInterface(Components.interfaces.nsIRDFResource);            var distributorContainer = Components.classes['component://netscape/rdf/container'].createInstance();            distributorContainer = distributorContainer.QueryInterface(Components.interfaces.nsIRDFContainer);                        var distributorRegistry = RDF.GetDataSource(aDistributor.Value);            var distributorResource = RDF.GetResource('NC:SoftwareUpdateRoot');            distributorContainer.Init(distributorRegistry, distributorResource);            // Now enumerate all of the distributorContainer's packages.                        var distributorEnumerator = distributorContainer.GetElements();                        while (distributorEnumerator.HasMoreElements())             {                 var aPackage = distributorEnumerator.GetNext();                 aPackage = aPackage.QueryInterface(Components.interfaces.nsIRDFResource);                                  // remove any that we do not want.                             if (getAttr(distributorRegistry, aPackage, 'title') == "AOL AIM")                 {                    //distributorContainer.RemoveElement(aPackage, true);                 }            }            var tree = document.getElementById('tree');            // Add it to the tree control's composite datasource.            tree.database.AddDataSource(distributorRegistry);        }                // Install all of the stylesheets in the softwareupdate Registry into the        // panel.        // TODO        // XXX hack to force the tree to rebuild        var treebody = document.getElementById('NC:SoftwareUpdateRoot');        treebody.setAttribute('id', 'NC:SoftwareUpdateRoot');    }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c177c1648ab51d8bc6b9c527e13dc8a294af5d10/SoftwareUpdate.js/buggy/xpinstall/notifier/SoftwareUpdate.js