'Add a new data element.
Arguments:
name       -- The name of the data element
typename   -- The type of data element
(boolean, color, string, date, dateTime,
double, duration, int, long, time)
value      -- The value of the data element'

def add_data(self, name, typename, value):

    if (name not in self._datas):
        dataObj = None
        if (typename == 'boolean'):
            dataObj = BooleanParameter(parent=self)
        elif (typename == 'color'):
            dataObj = ColorParameter(parent=self)
        elif (typename == 'string'):
            dataObj = StringParameter(parent=self)
        elif (typename == 'date'):
            dataObj = DateParameter(parent=self)
        elif (typename == 'dateTime'):
            dataObj = DateTimeParameter(parent=self)
        elif (typename == 'double'):
            dataObj = DoubleParameter(parent=self)
        elif (typename == 'duration'):
            dataObj = DurationParameter(parent=self)
        elif (typename == 'int'):
            dataObj = IntParameter(parent=self)
        elif (typename == 'long'):
            dataObj = LongParameter(parent=self)
        elif (typename == 'time'):
            dataObj = TimeParameter(parent=self)
        dataObj['name'] = name
        dataObj['value'] = value
        self._datas.add(name)
        self.iterables.append(dataObj)
        return dataObj
    return None
