fenfire-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fenfire-dev] PEG swamp_easier--benja: An easier API for Swamp


From: Tuomas Lukka
Subject: Re: [Fenfire-dev] PEG swamp_easier--benja: An easier API for Swamp
Date: Mon, 22 Sep 2003 14:12:21 +0300
User-agent: Mutt/1.5.4i

On Mon, Sep 22, 2003 at 02:07:09PM +0300, Benja Fallenstein wrote:
> Tuomas Lukka wrote:
> >>>>Jena returns just an arbitrary one of the matching triples in a similar 
> >>>>situation; I'm leaning towards that.
> >>>
> >>>I'd *really* hate that one -- I'd prefer swamp to have totally clear
> >>>semantics, with the only arbitrary thing being the order in which a set
> >>>is iterated through. 
> >>
> >>Hmm. Any ideas, then? Maybe remove ``getObject()`` etc.?
> >
> >Still throw an error, I think. Since the error has the info on what
> >tuple wasn't unique, there's a good opportunity to fix the problem.
> 
> Will *anybody* write correct code for handling this in the case that the 
> two triples (or more) are equivalent? I.e., just do what would be done 
> if any of the three triples were there individually, and get on? How 
> would a code example of this work?

Why *should* it work for "equivalent" triples? We define equivalence
by string equivalence; if two versions of a triple exist, something
is not right.

> Can you provide a code example using this?

Pseudocode, outside the outer scope:

        while(1) {
                try {
                        ... do stuff
                } catch(NotUniqueException e) {
                        ... get pattern from e
                        ... get matching triples from the graph
                        ... if all are equivalent,
                            remove all but one
                }
        }

        Tuomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]