protected function addNode(Individual $indi, $sosa) {                
        $birth_year = $indi->getEstimatedBirthDate()->gregorianYear();
        $death_year = $indi->getEstimatedDeathDate()->gregorianYear();
        
        $this->tmp_sosa_table[] = array(
            'indi' => $indi->getXref(), 
            'sosa' => $sosa, 
            'birth_year' => $birth_year,
            'death_year' => $death_year
        );
        
        $this->flushTmpSosaTable();
        
        if($fam = $indi->getPrimaryChildFamily()) {
            if($husb = $fam->getHusband()) $this->addNode($husb, 2 * $sosa);
            if($wife = $fam->getWife()) $this->addNode($wife, 2 * $sosa + 1);
        }
    }