'Sets metadata elements for dataset\'s attributes.'

def set_attribute_metadata(self, dataset):

    num_lines = 200
    attribute_types = {}
    for (i, line) in enumerate(open(dataset.file_name)):
        if (line and (not line.startswith('#'))):
            elems = line.split(' DCTB ')
            if (len(elems) == 9):
                try:
                    for (name, value) in parse_gff_attributes(elems[8]).items():
                        value_type = 'str'
                        try:
                            int(value)
                            value_type = 'int'
                        except:
                            try:
                                float(value)
                                value_type = 'float'
                            except:
                                pass
                        attribute_types[name] = value_type
                except:
                    pass
            if ((i + 1) == num_lines):
                break
    dataset.metadata.attribute_types = attribute_types
    dataset.metadata.attributes = len(attribute_types)
