[Zope-dev] PathIndex doesn't index last part of path

Myroslav Opyr myroslav@zope.net.ua
Mon, 19 Aug 2002 01:55:36 +0300


Hi,

Sorry, maybe I'm too late ;) but I have a note here.

uid in Cataloc can be path but it can be any arbitrary unigue=20
identifier. In system I'm working with it is ID generated in the time of=20
object creation and it persists and it is uid in Catalog. Nothing wrong=20
with the methods themselves but about their name. As far as I understood=20
they are getRecordFromPath, getMetadataFromPath, getIndexFromPath.=20
Generally it will be path a uid of Catalolog, but naming in other cases=20
will be confusing. Maybe it is just a question of documentation?

Regards,

m.

Casey Duncan wrote:

>Your code looks fine, I think it meshes better with the underlying catal=
og
>code too. I don't have a problem with this getting checked in, just make
>sure you update IZCatalog.py, help/Catalog.py and add unit tests (that p=
ass
>;^).
>
>-Casey
>
>----- Original Message -----
>From: "Andy McKay" <andy@agmweb.ca>
>To: "Casey Duncan" <casey@zope.com>; <zope-dev@zope.org>
>Sent: Sunday, August 18, 2002 2:54 AM
>Subject: Re: [Zope-dev] PathIndex doesn't index last part of path
>
>
> =20
>
>>>If you call getObject, that actually does traversal anyway.
>>>     =20
>>>
>>Right, in that situation it would be pointless...
>>
>>You rock, Casey, thanks. I was thinking more about adding:
>>
>>def getMetadataFromPath(self, path):
>>    """ get metadata for an object using its path """
>>    rid =3D self._catalog.uids[path]
>>    return self._catalog.getMetadataForRID(rid)
>>
>>def getIndexFromPath(self, path):
>>    """ get index for an object using its path """
>>    rid =3D self._catalog.uids[path]
>>    return self._catalog.getIndexDataForRID(rid)
>>
>>Since this uses the same terminology and returns the same data as
>>getIndexDataForRID and getMetadataDataForRID. Is there any reason why I
>>couldn't checked these in?
>>--
>>  Andy McKay
>>  Agmweb Consulting
>>  http://www.agmweb.ca
>>   =20
>>
--=20
Myroslav Opyr
zope.net.ua <http://zope.net.ua/> =B0 Ukrainian Zope Hosting
e-mail: myroslav@zope.net.ua <mailto:myroslav@zope.net.ua>