nsIRDFDataSource

IID:0F78DA58-8321-11d2-8EAC-00805F29F370
Inherits From:nsISupports

This interface is implemented by the following components:


Properties

readonly char* URI

The "URI" of the data source. This used by the RDF service's GetDataSource() method to cache datasources.


Methods

void AddObserver ( nsIRDFObserver observer ) nsISimpleEnumerator ArcLabelsIn ( nsIRDFNode node ) nsISimpleEnumerator ArcLabelsOut ( nsIRDFResource source ) void Assert ( nsIRDFResource source , nsIRDFResource property , nsIRDFNode target , PRBool truthValue ) void beginUpdateBatch ( ) void Change ( nsIRDFResource source , nsIRDFResource property , nsIRDFNode oldTarget , nsIRDFNode newTarget ) void DoCommand ( nsISupportsArray sources , nsIRDFResource command , nsISupportsArray arguments ) void endUpdateBatch ( ) nsISimpleEnumerator GetAllCmds ( nsIRDFResource source ) nsISimpleEnumerator GetAllResources ( ) nsIRDFResource GetSource ( nsIRDFResource property , nsIRDFNode target , PRBool truthValue ) nsISimpleEnumerator GetSources ( nsIRDFResource property , nsIRDFNode target , PRBool truthValue ) nsIRDFNode GetTarget ( nsIRDFResource source , nsIRDFResource property , PRBool truthValue ) nsISimpleEnumerator GetTargets ( nsIRDFResource source , nsIRDFResource property , PRBool truthValue ) PRBool hasArcIn ( nsIRDFNode node , nsIRDFResource arc ) PRBool hasArcOut ( nsIRDFResource source , nsIRDFResource arc ) PRBool HasAssertion ( nsIRDFResource source , nsIRDFResource property , nsIRDFNode target , PRBool truthValue ) PRBool IsCommandEnabled ( nsISupportsArray sources , nsIRDFResource command , nsISupportsArray arguments ) void Move ( nsIRDFResource oldSource , nsIRDFResource newSource , nsIRDFResource property , nsIRDFNode target ) void RemoveObserver ( nsIRDFObserver observer ) void Unassert ( nsIRDFResource source , nsIRDFResource property , nsIRDFNode target )

void AddObserver ( nsIRDFObserver observer )

Add an observer to this data source. If the datasource supports observers, the datasource source should hold a strong reference to the observer.

Arguments:
observer

nsISimpleEnumerator ArcLabelsIn ( nsIRDFNode node )

Get a cursor to iterate over all the arcs that point into a node.

Arguments:
node
Returns:
nsISimpleEnumerator object.

nsISimpleEnumerator ArcLabelsOut ( nsIRDFResource source )

Get a cursor to iterate over all the arcs that originate in a resource.

Arguments:
source
Returns:
nsISimpleEnumerator object.

void Assert ( nsIRDFResource source , nsIRDFResource property , nsIRDFNode target , PRBool truthValue )

Add an assertion to the graph.

Arguments:
source
property
target
truthValue

void beginUpdateBatch ( )

Notify observers that the datasource is about to send several notifications at once. This must be followed by calling endUpdateBatch(), otherwise viewers will get out of sync.


void Change ( nsIRDFResource source , nsIRDFResource property , nsIRDFNode oldTarget , nsIRDFNode newTarget )

Change an assertion from

[source]--[property]-->[oldTarget]

To

[source]--[property]-->[newTarget]

Arguments:
source
property
oldTarget
newTarget

void DoCommand ( nsISupportsArray sources , nsIRDFResource command , nsISupportsArray arguments )

Perform the specified command on set of sources.

Arguments:
sources
command
arguments

void endUpdateBatch ( )

Notify observers that the datasource has completed issuing a notification group.


nsISimpleEnumerator GetAllCmds ( nsIRDFResource source )

Returns the set of all commands defined for a given source.

Arguments:
source

nsISimpleEnumerator GetAllResources ( )

Retrieve all of the resources that the data source currently refers to.


nsIRDFResource GetSource ( nsIRDFResource property , nsIRDFNode target , PRBool truthValue )

Find an RDF resource that points to a given node over the specified arc & truth value

Arguments:
property
target
truthValue
Returns:
NS_RDF_NO_VALUE if there is no source that leads to the target with the specified property.

nsISimpleEnumerator GetSources ( nsIRDFResource property , nsIRDFNode target , PRBool truthValue )

Find all RDF resources that point to a given node over the specified arc & truth value

Arguments:
property
target
truthValue
Returns:
nsISimpleEnumerator points

nsIRDFNode GetTarget ( nsIRDFResource source , nsIRDFResource property , PRBool truthValue )

Find a child of that is related to the source by the given arc arc and truth value

Arguments:
source
property
truthValue
Returns:
NS_RDF_NO_VALUE if there is no target accessable from the source via the specified property.

nsISimpleEnumerator GetTargets ( nsIRDFResource source , nsIRDFResource property , PRBool truthValue )

Find all children of that are related to the source by the given arc arc and truth value.

Arguments:
source
property
truthValue
Returns:
nsISimpleEnumerator points

PRBool hasArcIn ( nsIRDFNode node , nsIRDFResource arc )

Returns true if the specified node is pointed to by the specified arc. Equivalent to enumerating ArcLabelsIn and comparing for the specified arc.

Arguments:
node
arc

PRBool hasArcOut ( nsIRDFResource source , nsIRDFResource arc )

Returns true if the specified node has the specified outward arc. Equivalent to enumerating ArcLabelsOut and comparing for the specified arc.

Arguments:
source
arc

PRBool HasAssertion ( nsIRDFResource source , nsIRDFResource property , nsIRDFNode target , PRBool truthValue )

Query whether an assertion exists in this graph.

Arguments:
source
property
target
truthValue

PRBool IsCommandEnabled ( nsISupportsArray sources , nsIRDFResource command , nsISupportsArray arguments )

Returns whether a given command is enabled for a set of sources.

Arguments:
sources
command
arguments

void Move ( nsIRDFResource oldSource , nsIRDFResource newSource , nsIRDFResource property , nsIRDFNode target )

'Move' an assertion from

[oldSource]--[property]-->[target]

To

[newSource]--[property]-->[target]

Arguments:
oldSource
newSource
property
target

void RemoveObserver ( nsIRDFObserver observer )

Remove an observer from this data source.

Arguments:
observer

void Unassert ( nsIRDFResource source , nsIRDFResource property , nsIRDFNode target )

Remove an assertion from the graph.

Arguments:
source
property
target

References

This interface is the type of the following properties:

nsIDownloadManager.datasource, nsIExtensionManager.datasource, nsIHTTPIndex.DataSource, nsIRDFContainer.DataSource, nsIRDFInferDataSource.baseDataSource

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

nsIAddressBook.deleteAddressBooks, nsIAddressBook.modifyAddressBook, nsIRDFCompositeDataSource.AddDataSource, nsIRDFCompositeDataSource.RemoveDataSource, nsIRDFContainer.Init, nsIRDFContainerUtils.IsAlt, nsIRDFContainerUtils.IsBag, nsIRDFContainerUtils.IsContainer, nsIRDFContainerUtils.IsEmpty, nsIRDFContainerUtils.IsSeq, nsIRDFContainerUtils.MakeAlt, nsIRDFContainerUtils.MakeBag, nsIRDFContainerUtils.MakeSeq, nsIRDFContainerUtils.indexOf, nsIRDFObserver.onAssert, nsIRDFObserver.onBeginUpdateBatch, nsIRDFObserver.onChange, nsIRDFObserver.onEndUpdateBatch, nsIRDFObserver.onMove, nsIRDFObserver.onUnassert, nsIRDFService.RegisterDataSource, nsIRDFService.UnregisterDataSource, nsIRDFXMLParser.parseAsync, nsIRDFXMLParser.parseString, nsIRDFXMLSerializer.init

This interface is returned from the following methods:

nsIInternetSearchService.GetCategoryDataSource, nsIRDFService.GetDataSource, nsIRDFService.GetDataSourceBlocking

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com