'@todo: docstring'

def __init__(self, type, question_id, answerList):

    S3AbstractAnalysis.__init__(self, type, question_id, answerList)
    linkWidget = S3QuestionTypeLinkWidget(question_id)
    relation = linkWidget.get('Relation')
    type = linkWidget.get('Type')
    parent_qid = linkWidget.getParentQstnID()
    valueMap = {}
    for answer in self.answerList:
        complete_id = answer['complete_id']
        parent_answer = linkWidget.loadAnswer(complete_id, parent_qid, forceDB=True)
        if (relation == 'groupby'):
            valueMap.update({parent_answer: answer})
    valueList = []
    for answer in valueMap.values():
        valueList.append(answer)
    self.widget = survey_analysis_type[type](question_id, valueList)
