def init_metadata(self, sheet):
    row = sheet.row_values(COLUMN_NAMES_ROW)
    self.is_parent = False
    self.is_child = False
    self.column_names = []
    for value in row:
        if (type(value) is not str):
            raise Exception(((('[' + self.name) + ']') + 'Column name is not string'))
            sys.exit()
        if (value == ID_COLUMN_NAME):
            self.is_parent = True
        if (value == PARENT_COLUMN_NAME):
            self.is_child = True
        self.column_names.append(value)
    if (self.is_root and self.is_child):
        raise Exception(((((('[' + self.name) + ']') + 'Root table must not have a "') + PARENT_COLUMN_NAME) + '" column'))
        sys.exit()
    if ((not self.is_root) and (not self.is_child)):
        raise Exception(((((('[' + self.name) + ']') + 'Child table must have a "') + PARENT_COLUMN_NAME) + '" column'))
        sys.exit()
def init_metadata(self, sheet):
    row = sheet.row_values(COLUMN_NAMES_ROW)
    self.is_parent = False
    self.is_child = False
    self.column_names = []
    for value in row:
        if (type(value) is not str):
            raise Exception(((('[' + self.name) + ']') + 'Column name is not string'))
            sys.exit()
        if (value == ID_COLUMN_NAME):
            self.is_parent = True
        if (value == PARENT_COLUMN_NAME):
            self.is_child = True
        self.column_names.append(value)
    if (self.is_root and self.is_child):
        raise Exception(((((('[' + self.name) + ']') + 'Root table must not have a "') + PARENT_COLUMN_NAME) + '" column'))
        sys.exit()
    if ((not self.is_root) and (not self.is_child)):
        raise Exception(((((('[' + self.name) + ']') + 'Child table must have a "') + PARENT_COLUMN_NAME) + '" column'))
        sys.exit()