[Zope] uncataloging

Tres Seaver tseaver at palladion.com
Thu Aug 14 10:28:20 EDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Darryl Caldwell wrote:
> Hey folks,
> 
> I have looked at the source of Catalog.py but am still confused about
> what parameters I need to uncatalog an object.
> 
> Is the uid the same as the object id? That which is returned from
> obj.getId(), or is it the same as the object Identifier listed on the
> Catalog tab within the catalog? Thanks in advance. Code samples
> welcome.

The UID is an application-specific token for the indexed object.  It is
what gets displayed on the 'Catalog' tab.  Often, it will be the
physical path, or a subset of it (e.g., trimmed to be relative to the
current "site").  Have a look at the CatalogAware class for how the uid
is generated.  The Zope2 version uses a a goofy version of a virtual
hosting-aware URL:

http://svn.zope.org/Zope/branches/2.11/lib/python/Products/ZCatalog/CatalogAwareness.py?rev=82440&view=auto

The CMF version lets the catalog figure it out:

http://svn.zope.org/Products.CMFCore/branches/2.1/Products/CMFCore/CMFCatalogAware.py?rev=82471&view=auto
http://svn.zope.org/Products.CMFCore/branches/2.1/Products/CMFCore/CatalogTool.py?rev=81780&view=auto


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIpEEE+gerLs4ltQ4RAptmAJ9gMEy0B0Mk2obH6EX0mIQTSgrZ6QCfbZDJ
1Px/GvmOGT+Np91a2Zop6Tg=
=3th6
-----END PGP SIGNATURE-----



More information about the Zope mailing list