def add_time(self, key, value, unit):
        """
        Add a time value (like an age, or the duration of an experiment for example).

        The value can be any number, supplied with a unit from a controlled vocabulary.

        The time unit should be one of the following:
            :py:attr:`~genestack_client.Metainfo.YEAR`,
            :py:attr:`~genestack_client.Metainfo.MONTH`,
            :py:attr:`~genestack_client.Metainfo.WEEK`,
            :py:attr:`~genestack_client.Metainfo.DAY`,
            :py:attr:`~genestack_client.Metainfo.HOUR`,
            :py:attr:`~genestack_client.Metainfo.MINUTE`,
            :py:attr:`~genestack_client.Metainfo.SECOND`,
            :py:attr:`~genestack_client.Metainfo.MILLISECOND`

        :param key: key
        :type key: str
        :param: number of units as float
        :type value: float | str
        :param unit: unit
        :type unit: str
        :rtype: None

        **Deprecated** since *0.32.0*, use compound metainfo keys instead
        """
        self._print_metainfo_type_deprecation_message('add_time')
        result = Metainfo._create_dict_with_type('time')
        result['value'] = MetainfoScalarValue._xstr(value)
        result['unit'] = unit.upper()
        self.setdefault(key, []).append(result)
    def add_temperature(self, key, value, unit):
        """
        Add a temperature value.
        The value can be any number, supplied with a unit from a controlled vocabulary.


        The temperature unit should be one of the following:
            :py:attr:`~genestack_client.Metainfo.CELSIUS`,
            :py:attr:`~genestack_client.Metainfo.KELVIN`,
            :py:attr:`~genestack_client.Metainfo.FAHRENHEIT`,

        :param key: key
        :type key: str
        :param value: number of units as float
        :type value: float | str
        :param unit: unit
        :type unit: str
        :rtype: None

        **Deprecated** since *0.32.0*, use compound metainfo keys instead
        """
        self._print_metainfo_type_deprecation_message('add_temperature')
        result = Metainfo._create_dict_with_type('temperature')
        result['value'] = MetainfoScalarValue._xstr(value)
        result['unit'] = unit.upper()
        self.setdefault(key, []).append(result)
 def _add_value(self, key, value, type):
     self.setdefault(key, []).append({
         'type':
         type,
         'value':
         MetainfoScalarValue._xstr(value)
     })
 def _parse_scalar_value(source_dict):
     java_type = source_dict['type']
     if java_type == BooleanValue._TYPE:
         return BooleanValue(source_dict['value'])
     elif java_type == DateTimeValue._TYPE:
         return DateTimeValue(source_dict['date'])
     elif java_type == ExternalLink._TYPE:
         return ExternalLink(
             source_dict['url'], source_dict['text'],
             source_dict.get('format')
         )
     elif java_type == IntegerValue._TYPE:
         return IntegerValue(source_dict['value'])
     elif java_type == DecimalValue._TYPE:
         return DecimalValue(source_dict['value'])
     elif java_type == MemorySizeValue._TYPE:
         return MemorySizeValue(source_dict['value'])
     elif java_type == Organization._TYPE:
         return Organization(
             source_dict['name'], source_dict['department'],
             source_dict['street'], source_dict['city'],
             source_dict['state'], source_dict['postalCode'],
             source_dict['country'], source_dict['email'],
             source_dict['phone'], source_dict['url']
         )
     elif java_type == Person._TYPE:
         return Person(source_dict['name'], source_dict['phone'], source_dict['email'])
     elif java_type == Publication._TYPE:
         return Publication(
             source_dict['title'], source_dict['authors'],
             source_dict['journalName'], source_dict['issueDate'],
             source_dict['identifiers'], source_dict['issueNumber'],
             source_dict['pages']
         )
     elif java_type == StringValue._TYPE:
         return StringValue(source_dict['value'])
     elif java_type == FileReference._TYPE:
         return FileReference(source_dict['accession'])
     else:
         # this is safer than raising an exception, since new metainfo types
         # can be added in Java (and some deprecated ones like physical values are not handled here)
         return MetainfoScalarValue(source_dict)
 def _add_value(self, key, value, type):
     self.setdefault(key, []).append({'type': type, 'value': MetainfoScalarValue._xstr(value)})