Re: RDF 'truthValue'

<"neil.stansbury () redbacksystems ! com"@lists.mozilla.org> Thu, 16 Apr 2009 16:30:03 +0100
Newsgroups gmane.comp.mozilla.devel.rdf
Message-ID <[email protected]>
Axel Hecht wrote:
> On 16.04.2009 16:27 Uhr, neil.stansbury () redbacksystems ! com wrote:
>> Axel (or anyone else),
>>
>> Could you clarify the semantics of the "truthValue" argument in calls to
>> nsIRDFDataSource?
>>
>> Are there any differences in its meaning in calls to hasAssertions() vs
>> GetTargets() etc etc
>>
>> I had read it meant some kind of underlying permanency, but the
>> somewhere else it meant a resource object could you clarify for me?
> 
> IIRC, and honestly, that's far fetched, as that stuff predates me, the 
> truth value is there to overwrite an existing arch in a read-only 
> datasource with a "non-existing arch" in another datasource, so that the 
> combined compound datasource would act like that arch doesn't exist.
> 
> http://mxr.mozilla.org/mozilla1.9.1/source/rdf/base/src/nsCompositeDataSource.cpp#278 
> is one of the fragments of implementing that.
> 
> Axel


Hi Axel,

Great thanks very much, I had looked through that code, but so little of it's documented I couldn't make much sense of it!  It seems it's 
basically a way of temporarily hiding an arc in a datasource?

My confusion was in my custom ds.GetTargets() I was getting called for the assertion:

#resource -> http://home.netscape.com/NC-rdf#child, true

and I didn't understand the implications of this truthValue in a non-assert call, but I guess it's a way of a) hiding and b) asserting temporary 
arcs, so that predicates like "http://home.netscape.com/NC-rdf#child" don't get rendered in XUL templates etc.


Cheers,

N