Inherits From:nsIRDFNode

An nsIRDFResource is an object that has unique identity in the RDF data model. The object's identity is determined by its URI.

An object of this interface should be created in the following way:


This interface is implemented by the following components:


readonly char* Value

The single-byte string value of the resource.

readonly AUTF8String ValueUTF8

The UTF-8 URI of the resource.


PRBool EqualsString ( char* URI ) void GetDelegate ( char* key , nsIIDRef IID , out nsQIResult* result ) [noscript] void GetValueConst ( out char* constValue ) void Init ( char* uri ) void ReleaseDelegate ( char* key )

PRBool EqualsString ( char* URI )

Determine if the resource has the given URI.


void GetDelegate ( char* key , nsIIDRef IID , out nsQIResult* result )

Retrieve the "delegate" object for this resource. A resource may have several delegate objects, each of whose lifetimes is bound to the life of the resource object.

This method will return the delegate for the given key after QueryInterface()-ing it to the requested IID.

If no delegate exists for the specified key, this method will attempt to create one using the component manager. Specifically, it will combine key with the resource's URI scheme to produce a ContractID as follows:


This ContractID will be used to locate a factory using the FindFactory() method of nsIComponentManager. If the nsIFactory exists, it will be used to create a "delegate factory"; that is, an object that supports nsIRDFDelegateFactory. The delegate factory will be used to construct the delegate object.


void GetValueConst ( out char* constValue )

An unscriptable version used to avoid a string copy. Meant for use as a performance optimization. The string is encoded in UTF-8.


void Init ( char* uri )

This method is called by the nsIRDFService after constructing a resource object to initialize it's URI. You would not normally call this method directly


void ReleaseDelegate ( char* key )

Force a delegate to be "unbound" from the resource.

Normally, a delegate object's lifetime will be identical to that of the resource to which it is bound; this method allows a delegate to unlink itself from an RDF resource prematurely.



This interface is the type of the following properties:

nsIDOMXULElement.resource, nsIRDFContainer.Resource

This interface is passed as an argument to the following methods:

nsIBookmarksService.cloneResource, nsIBookmarksService.createBookmarkInContainer, nsIBookmarksService.createFolderInContainer, nsIBookmarksService.createLivemarkInContainer, nsIBookmarksService.getParent, nsIBookmarksService.getParentChain, nsIBookmarksService.isBookmarkedResource, nsIBookmarksService.setBookmarksToolbarFolder, nsIFolderListener.OnItemAdded, nsIFolderListener.OnItemBoolPropertyChanged, nsIFolderListener.OnItemIntPropertyChanged, nsIFolderListener.OnItemPropertyChanged, nsIFolderListener.OnItemRemoved, nsIFolderListener.OnItemUnicharPropertyChanged, nsIMessenger.CompactFolder, nsIMessenger.CopyFolders, nsIMessenger.CopyMessages, nsIMessenger.DeleteFolders, nsIMessenger.EmptyTrash, nsIMessenger.RenameFolder, nsIRDFContainer.Init, nsIRDFContainerUtils.IsAlt, nsIRDFContainerUtils.IsBag, nsIRDFContainerUtils.IsContainer, nsIRDFContainerUtils.IsEmpty, nsIRDFContainerUtils.IsOrdinalProperty, nsIRDFContainerUtils.IsSeq, nsIRDFContainerUtils.MakeAlt, nsIRDFContainerUtils.MakeBag, nsIRDFContainerUtils.MakeSeq, nsIRDFContainerUtils.OrdinalResourceToIndex, nsIRDFContainerUtils.indexOf, nsIRDFDataSource.ArcLabelsOut, nsIRDFDataSource.Assert, nsIRDFDataSource.Change, nsIRDFDataSource.DoCommand, nsIRDFDataSource.GetAllCmds, nsIRDFDataSource.GetSource, nsIRDFDataSource.GetSources, nsIRDFDataSource.GetTarget, nsIRDFDataSource.GetTargets, nsIRDFDataSource.HasAssertion, nsIRDFDataSource.IsCommandEnabled, nsIRDFDataSource.Move, nsIRDFDataSource.Unassert, nsIRDFDataSource.hasArcIn, nsIRDFDataSource.hasArcOut, nsIRDFDelegateFactory.CreateDelegate, nsIRDFInMemoryDataSource.EnsureFastContainment, nsIRDFObserver.onAssert, nsIRDFObserver.onChange, nsIRDFObserver.onMove, nsIRDFObserver.onUnassert, nsIRDFPurgeableDataSource.Mark, nsIRDFService.IsAnonymousResource, nsIRDFService.RegisterResource, nsIRDFService.UnregisterResource, nsISubscribeDataSource.NotifyObservers, nsIXULTreeBuilder.getIndexOfResource, rdfITripleVisitor.visit

This interface is returned from the following methods:

nsIBookmarksService.cloneResource, nsIBookmarksService.createBookmark, nsIBookmarksService.createBookmarkInContainer, nsIBookmarksService.createFolder, nsIBookmarksService.createFolderInContainer, nsIBookmarksService.createLivemark, nsIBookmarksService.createLivemarkInContainer, nsIBookmarksService.createSeparator, nsIBookmarksService.getBookmarksToolbarFolder, nsIBookmarksService.getParent, nsIInternetSearchContext.GetEngine, nsIInternetSearchContext.GetParent, nsIRDFContainerUtils.IndexToOrdinalResource, nsIRDFDataSource.GetSource, nsIRDFService.GetAnonymousResource, nsIRDFService.GetResource, nsIRDFService.GetUnicodeResource, nsIXULTreeBuilder.getResourceAtIndex

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com