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: Benja Fallenstein
Subject: Re: [Fenfire-dev] PEG swamp_easier--benja: An easier API for Swamp
Date: Mon, 22 Sep 2003 13:34:32 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030908 Debian/1.4-4

Tuomas Lukka wrote:
On Mon, Sep 22, 2003 at 12:54:32PM +0300, Benja Fallenstein wrote:
I feel better about find(), since it
...
And it's consistent with what code is there already. If there's
a change, change all the occurrences.
...
find...Triples: Any particular reason?

we have find_..._Iter, it would be easiest to put the return type
there and once we have used swamp for several years and *know* the
best solution, we'll take that as the return type.

ARGH. Didn't I make myself clear? I want these to be **replaced** by the TripleIter method(s). The PEG proposes all current methods in Graph/ConstGraph dealing with getting/adding/removing triples to be replaced by those in the PEG.

The points for TripleIter-- less code, automatically returned to the Graph for re-use in next ``get()``/``find()``-- hold for iterating over a single element of the triple as well; and due to the design of the Collections API, using Iterator buys you nothing in compatibility (you cannot create sets from it, etc.)

(If you want to use Collections API, see ``getSubjects()`` and ``getObjects()``.)

Clarified on IRC: The issue is what happens if there is more than one matching triple.

The current way is to throw NotUniqueException.
...
[S]ignalling an error isn't necessarily correct.

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.

Other suggestions? Don't have singular ``getObject()``?

Issue: Names. subj, pred, obj would be more consistent, i.e.
up to the *end* of the second consonant group.

Yes, but these are also impossible to pronounce... "SUB-djjjj"
...

"s", "p", "o"?

Hmmm. I thought that ``i.s``, ``i.p``, ``i.o`` are too abbreviashish, but might be ok.

Other alternative: "subject," "predicate," "object."

(More comments later.)
- Benja





reply via email to

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