[Zope3-dev] createObject() and dc metadata

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Oct 16 09:28:16 EDT 2004


On Sunday 10 October 2004 11:56, Craig Ewington wrote:
> I have a need to pre-populate a site programmatically.    When I use
> the following construct, the created folder is not annotated with
> dublin core metadata.  Do I need to perform that annotation manually
> (is there some sample code?), or am I using the wrong approach to
> creating content types programatically?

Creating types manually is, as the term already suggests, very manual work. 
Therefore the dublin core data is not set automatically. However, whenever 
you create or modify a component, you need to create an IObjectCreatedEvent 
or IObjectModifiedEvent, respectively. There are subscribers to these events 
that will accomplish various tasks, such as adding DC meta-data, updating 
indices, or adding workflows to the object. Note that creating these events 
and sending them out using zope.event.notify() is of utmost importance in 
order to keep your framework working correctly.

See
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/Zope3Book/xmlrpc.html

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-dev mailing list