# Path: egasub/ega/entities/attribute.py
# class Attribute(object):
#     def __init__(self, tag, value="", unit=None):
#         self.tag = tag
#         self.value = value
#         self.unit = unit
# 
# 
#     def to_dict(self):
#         return {
#             "tag": self.tag,
#             "value": self.value,
#             "unit": self.unit
#         }
# 
# 
#     def to_xml(self):
#         xml_string = "<TAG>%s</TAG>\n<VALUE>%s</VALUE>\n" % (self.tag, self.value)
#         if self.unit is not None:
#             xml_string += "<UNIT>%s</UNIT>\n" % (self.unit)
#         return xml_string
# 
#     @staticmethod
#     def from_dict(attr_dict):
#         return Attribute(attr_dict.get('tag'),attr_dict.get('value'),attr_dict.get('unit'))


from .attribute import Attribute


class Sample(object):
    def __init__(self,alias,title,description,case_or_control_id,gender_id,organism_part,
                 cell_line,region,phenotype, subject_id, anonymized_name, bio_sample_id,
                 sample_age, sample_detail, attributes,id_=None,status=None,ega_accession_id=None):
        self.alias = alias
        self.title = title
        self.description  = description
        self.case_or_control_id = case_or_control_id
        self.gender_id = gender_id
        self.organism_part = organism_part
        self.cell_line = cell_line
        self.region = region
        self.phenotype = phenotype
        self.subject_id = subject_id
        self.anonymized_name = anonymized_name

# Path: egasub/ega/entities/attribute.py
# class Attribute(object):
#     def __init__(self, tag, value="", unit=None):
#         self.tag = tag
#         self.value = value
#         self.unit = unit
# 
# 
#     def to_dict(self):
#         return {
#             "tag": self.tag,
#             "value": self.value,
#             "unit": self.unit
#         }
# 
# 
#     def to_xml(self):
#         xml_string = "<TAG>%s</TAG>\n<VALUE>%s</VALUE>\n" % (self.tag, self.value)
#         if self.unit is not None:
#             xml_string += "<UNIT>%s</UNIT>\n" % (self.unit)
#         return xml_string
# 
#     @staticmethod
#     def from_dict(attr_dict):
#         return Attribute(attr_dict.get('tag'),attr_dict.get('value'),attr_dict.get('unit'))


# Path: egasub/ega/entities/sample.py
from .attribute import Attribute



class Sample(object):
    def __init__(self,alias,title,description,case_or_control_id,gender_id,organism_part,
                 cell_line,region,phenotype, subject_id, anonymized_name, bio_sample_id,
                 sample_age, sample_detail, attributes,id_=None,status=None,ega_accession_id=None):
        self.alias = alias
        self.title = title
        self.description  = description
        self.case_or_control_id = case_or_control_id
        self.gender_id = gender_id
        self.organism_part = organism_part
        self.cell_line = cell_line
        self.region = region
        self.phenotype = phenotype
        self.subject_id = subject_id
        self.anonymized_name = anonymized_name

        self.bio_sample_id = bio_sample_id