Re: Interface to RDF Datasource

Neil <[email protected]> Thu, 28 Apr 2005 13:50:00 +0100
Newsgroups gmane.comp.mozilla.devel.rdf
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
vaab wrote:

> Why the interface of Datasource provided through nsIRDFDatasource is 
> so complicated ?
>
> I'm thinking of 2 things :
>
> - why is there several query functions (ArcLabelsIn/Out, GetTarget, 
> GetSource...), where one function could do the same ? (as in RAP (a 
> php librairy for manipulating RDF)
>
> function find(a,b,c)
>
> where a,b,c could be null. Find could return a nsISimpleEnumerator 
> holding Triples. Access to triples would need 3 functions 
> (getSubject/Predicate/Object).

Many built-in data sources can optimise their implementation of the 
specific functions because of their knowledge of their internal data 
structures. For instance, when querying the folder data source for the 
name of a folder, using GetTarget would be much more efficient than a 
generic query function.

-- 
Warning: May contain traces of nuts.