Re: [Zope-CMF] IIndexableObjectWrapper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05.04.2009 16:36 Uhr, Martin Aspeli wrote: > yuppie wrote: >> Martin Aspeli wrote: >>> Plone 3.3's IIndexableObjectWrapper implementation (in plone.indexer) >>> has a method _getWrappedObject(), to return the object that was wrapped >>> by the indexable object wrapper. It is (or rather, will be) used by >>> TextIndexNG3, which needs to access the raw object during indexing. >> Why is there a need to access the raw object? The wrapper should provide >> all the interfaces and attributes required for indexing. > > TextIndexNG3 does some deeper inspection on the object. It basically > needs to bypass some of the things that are ordinarily intercepted by > the wrapper. Andreas Jung will have to give more detail, but it feels > prudent to me to have some kind of API to get the wrapped object for > cases like this in any case. > > If there are some requirements for TXNG3, I will work on TXNG 3.3.0 soon again. Also Wichert made (or intended) to make some related changes within the TXNG core directly due an incompatibility with TXNG 3.2.X and the newest Plone 3.2 release (coming with an updated CMF version). Andreas -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknjlS4ACgkQCJIWIbr9KYx3dwCeO4ofLAEAQ33IuxKHk1MEITm+ cFEAoJDv9k6lNntg0wsYD+mM1JgyRAO7 =+M+B -END PGP SIGNATURE- begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. & Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] IIndexableObjectWrapper
Wichert Akkerman wrote: > Previously yuppie wrote: >> Martin Aspeli wrote: >>> Plone 3.3's IIndexableObjectWrapper implementation (in plone.indexer) >>> has a method _getWrappedObject(), to return the object that was wrapped >>> by the indexable object wrapper. It is (or rather, will be) used by >>> TextIndexNG3, which needs to access the raw object during indexing. >> Why is there a need to access the raw object? The wrapper should provide >> all the interfaces and attributes required for indexing. > > TextIndexNG3 needs the unwrapped object to be able to look for adapters > that provide indexable text for that object. That's BBB code for old IndexableObjectWrappers that don't use IndexableObjectSpecification. With the correct __providedBy__ there is no need to unwrap the object before looking up adapters. Cheers, Yuppie ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] IIndexableObjectWrapper
Previously yuppie wrote: > Martin Aspeli wrote: > > Plone 3.3's IIndexableObjectWrapper implementation (in plone.indexer) > > has a method _getWrappedObject(), to return the object that was wrapped > > by the indexable object wrapper. It is (or rather, will be) used by > > TextIndexNG3, which needs to access the raw object during indexing. > > Why is there a need to access the raw object? The wrapper should provide > all the interfaces and attributes required for indexing. TextIndexNG3 needs the unwrapped object to be able to look for adapters that provide indexable text for that object. Wichert. -- Wichert Akkerman It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] IIndexableObjectWrapper
yuppie wrote: > Martin Aspeli wrote: >> Plone 3.3's IIndexableObjectWrapper implementation (in plone.indexer) >> has a method _getWrappedObject(), to return the object that was wrapped >> by the indexable object wrapper. It is (or rather, will be) used by >> TextIndexNG3, which needs to access the raw object during indexing. > > Why is there a need to access the raw object? The wrapper should provide > all the interfaces and attributes required for indexing. TextIndexNG3 does some deeper inspection on the object. It basically needs to bypass some of the things that are ordinarily intercepted by the wrapper. Andreas Jung will have to give more detail, but it feels prudent to me to have some kind of API to get the wrapped object for cases like this in any case. plone.indexer now has this (and we're rapidly approaching a stable release - rc2 just went today), so it's not crucial that it's in CMF, but it'd be nicer if it were. Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] IIndexableObjectWrapper
Martin Aspeli wrote: > Plone 3.3's IIndexableObjectWrapper implementation (in plone.indexer) > has a method _getWrappedObject(), to return the object that was wrapped > by the indexable object wrapper. It is (or rather, will be) used by > TextIndexNG3, which needs to access the raw object during indexing. Why is there a need to access the raw object? The wrapper should provide all the interfaces and attributes required for indexing. Cheers, Yuppie ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] IIndexableObjectWrapper
Jens Vagelpohl wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > On Apr 5, 2009, at 12:14 , Martin Aspeli wrote: > >> Hi, >> >> Plone 3.3's IIndexableObjectWrapper implementation (in plone.indexer) >> has a method _getWrappedObject(), to return the object that was >> wrapped >> by the indexable object wrapper. It is (or rather, will be) used by >> TextIndexNG3, which needs to access the raw object during indexing. >> >> Any objections to pushing this down into CMFCore's definition of that >> interface? > > A method name starting with an underscore is presumably a "private" > method with restricted use by the internal implementation. I would at > least rename it to something without underscore before putting it into > the interface. In general, I agree, but there's a problem: any method on the wrapper could collide with an index or metadata item and thus get indexed in the catalog. Thus, the method is "private" in the sense that it's not to be considered part of the "wrapped" object. It may not seem very likely that someone has an index called getWrappedObject, but there's (stupid) support in Archetypes to create indexes from fields based on the accessors of those fields, so an auto-created index for an AT field wrappedObject would default to being called getWrappedObject(). Again, not hugely likely, but I think it makes sense to say that all methods on the wrapper that are *not* "indexable" are "private" in this sense. Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] IIndexableObjectWrapper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Apr 5, 2009, at 12:14 , Martin Aspeli wrote: > Hi, > > Plone 3.3's IIndexableObjectWrapper implementation (in plone.indexer) > has a method _getWrappedObject(), to return the object that was > wrapped > by the indexable object wrapper. It is (or rather, will be) used by > TextIndexNG3, which needs to access the raw object during indexing. > > Any objections to pushing this down into CMFCore's definition of that > interface? A method name starting with an underscore is presumably a "private" method with restricted use by the internal implementation. I would at least rename it to something without underscore before putting it into the interface. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAknYlZsACgkQRAx5nvEhZLJJ+wCdET6ALpOqhnySeR2kmMPTa71H Vq8AoKxcUx7HfQPgv5CQh8kLWghU+n/6 =L3qs -END PGP SIGNATURE- ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
[Zope-CMF] IIndexableObjectWrapper
Hi, Plone 3.3's IIndexableObjectWrapper implementation (in plone.indexer) has a method _getWrappedObject(), to return the object that was wrapped by the indexable object wrapper. It is (or rather, will be) used by TextIndexNG3, which needs to access the raw object during indexing. Any objections to pushing this down into CMFCore's definition of that interface? Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests