Exemplo n.º 1
0
    def filename(self, value):
        """Convert content filename to utf-8 encoded unicode string."""

        if value is None:
            self._reset_fields['filename'] = 'filename'

        self._filename = Parser.format_string(value)  # pylint: disable=attribute-defined-outside-init
Exemplo n.º 2
0
    def description(self, value):
        """Convert content description to utf-8 encoded unicode string."""

        if value is None:
            self._reset_fields['description'] = 'description'

        self._description = Parser.format_string(value)  # pylint: disable=attribute-defined-outside-init
Exemplo n.º 3
0
    def brief(self, value):
        """Convert content brief to utf-8 encoded unicode string."""

        if value is None:
            self._reset_fields['brief'] = 'brief'

        self._brief = Parser.format_string(value)  # pylint: disable=attribute-defined-outside-init
Exemplo n.º 4
0
    def identity(self, value):
        """Convert content identity to utf-8 encoded unicode string.

        The identity attribute is used when the content identity type is not
        known. The identity can be either a message digest or UUID.

        There is no failure proof way to tell if the identity string is a
        Digest or UUID. By creating a third identity field for unidentidied
        identity type, it quarantees that the digest and UUID attributes
        always have correctly matching identity against the type.
        """

        if value is None:
            self._identity = None  # pylint: disable=attribute-defined-outside-init
        else:
            self._identity = Parser.format_string(value)  # pylint: disable=attribute-defined-outside-init
Exemplo n.º 5
0
    def filename(self, value):
        """Resource filename."""

        self._filename = Parser.format_string(value)
Exemplo n.º 6
0
    def source(self, value):
        """Resource source."""

        self._source = Parser.format_string(value)
Exemplo n.º 7
0
    def description(self, value):
        """Resource description."""

        self._description = Parser.format_string(value)
Exemplo n.º 8
0
    def brief(self, value):
        """Resource brief."""

        self._brief = Parser.format_string(value)
Exemplo n.º 9
0
    def operation_file(self, value):
        """Convert operation filename to utf-8 encoded unicode string."""

        self._operation_file = Parser.format_string(value)  # pylint: disable=attribute-defined-outside-init