Exemplo n.º 1
0
class Classification(metadata.MetadataBase):

    classification = metadata.DCFieldProperty(
        IClassification['classification'])
    privacy_layer = metadata.DCFieldProperty(IClassification['privacy_layer'])
    public_trial = metadata.DCFieldProperty(IClassification['public_trial'])
    public_trial_statement = metadata.DCFieldProperty(
        IClassification['public_trial_statement'])
class WFEffectiveRange(metadata.Publication):

    effective_transition = metadata.DCFieldProperty(
        IWFEffectiveRange['effective_transition']
    )

    expires_transition = metadata.DCFieldProperty(
        IWFEffectiveRange['expires_transition']
    )
Exemplo n.º 3
0
class OGMailBase(metadata.MetadataBase):
    """Behavior that adds a title field.

    The field value is stored on the Mail instannce.
    """
    def _get_title(self):
        return self.context.title

    def _set_title(self, value):
        self.context.title = value

    title = property(_get_title, _set_title)

    original_message = metadata.DCFieldProperty(IOGMail['original_message'])
    message_source = metadata.DCFieldProperty(IOGMail['message_source'])
Exemplo n.º 4
0
class OpenGeverBase(metadata.MetadataBase):

    title = metadata.DCFieldProperty(metadata.IBasic['title'],
                                     get_name='title',
                                     set_name='setTitle')

    def _get_description(self):
        return self.context.description

    def _set_description(self, value):
        if isinstance(value, str):
            raise ValueError('Description must be unicode.')
        self.context.description = value

    description = property(_get_description, _set_description)