rem: var container = Components.classes["@mozilla.org/rdf/container;1"].createInstance(); if (container) { container = container.QueryInterface(Components.interfaces.nsIRDFContainer); if (container) { var containerRes = gRDF.GetUnicodeResource("urn:mimetypes:root"); container.Init(this._DS, containerRes); var element = gRDF.GetUnicodeResource(MIME_URI(this.mimeType)); if (container.IndexOf(element) == -1) container.AppendElement(element); } } 
add: var container = this.ensureAndGetTypeList("mimetype"); var element = gRDF.GetUnicodeResource(MIME_URI(this.mimeType)); if (container.IndexOf(element) == -1) container.AppendElement(element); 
context:   buildLinks: function()  {    // assert the handler resource    var mimeSource = gRDF.GetUnicodeResource(MIME_URI(this.mimeType));    var handlerProperty = gRDF.GetUnicodeResource(NC_URI("handlerProp"));    var handlerResource = gRDF.GetUnicodeResource(HANDLER_URI(this.mimeType));    this._DS.Assert(mimeSource, handlerProperty, handlerResource, true);    // assert the helper app resource    var helperAppProperty = gRDF.GetUnicodeResource(NC_URI("externalApplication"));    var helperAppResource = gRDF.GetUnicodeResource(APP_URI(this.mimeType));    this._DS.Assert(handlerResource, helperAppProperty, helperAppResource, true);    // add the mime type to the MIME types seq    var container = Components.classes["@mozilla.org/rdf/container;1"].createInstance();    if (container) {      container = container.QueryInterface(Components.interfaces.nsIRDFContainer);      if (container) {        var containerRes = gRDF.GetUnicodeResource("urn:mimetypes:root");        container.Init(this._DS, containerRes);        var element = gRDF.GetUnicodeResource(MIME_URI(this.mimeType));        if (container.IndexOf(element) == -1)          container.AppendElement(element);      }    }  }, 
meta: 10520	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10520/60f3fe63fc8729d9862a1b263b55bb7b96b94628/helperApps.js/buggy/toolkit/mozapps/downloads/content/helperApps.js