예제 #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
예제 #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
예제 #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
예제 #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
예제 #5
0
    def filename(self, value):
        """Resource filename."""

        self._filename = Parser.format_string(value)
예제 #6
0
    def source(self, value):
        """Resource source."""

        self._source = Parser.format_string(value)
예제 #7
0
    def description(self, value):
        """Resource description."""

        self._description = Parser.format_string(value)
예제 #8
0
    def brief(self, value):
        """Resource brief."""

        self._brief = Parser.format_string(value)
예제 #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