/usr/share/pyshared/zope/dublincore/property.txt is in python-zope.dublincore 3.8.2-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | ======================
Dublin Core Properties
======================
A dublin core property allows us to use properties from dublin core
by simply defining a property as DCProperty.
>>> from zope.dublincore import property
>>> from zope import interface
>>> from zope.annotation.interfaces import IAttributeAnnotatable
>>> class DC(object):
... interface.implements(IAttributeAnnotatable)
... title = property.DCProperty('title')
... author = property.DCProperty('creators')
... authors = property.DCListProperty('creators')
>>> obj = DC()
>>> obj.title = u'My title'
>>> obj.title
u'My title'
Let's see if the title is really stored in dublin core:
>>> from zope.dublincore.interfaces import IZopeDublinCore
>>> IZopeDublinCore(obj).title
u'My title'
Even if a dublin core property is a list property we can set and get the
property as scalar type:
>>> obj.author = u'me'
>>> obj.author
u'me'
DCListProperty acts on the list:
>>> obj.authors
(u'me',)
>>> obj.authors = [u'I', u'others']
>>> obj.authors
(u'I', u'others')
>>> obj.author
u'I'
|