/**
  * Reads a backtrackoptions element and adds the content to the result object.
  * @param DOMNode $backTrackOptionsNode the node being inspected
  * @param GetSearchPageRecommendationResult $resultObj the result object to fill
  */
 private function readBackTrackOptions(DOMNode $backTrackOptionsNode, GetSearchPageRecommendationResult $resultObj)
 {
     foreach ($backTrackOptionsNode->childNodes as $domainNode) {
         if ($domainNode->nodeName == "backtrackoption") {
             $option = new CancellableOption();
             $option->setTextValue($domainNode->textContent);
             //read attributes
             foreach ($domainNode->attributes as $attribute) {
                 switch ($attribute->name) {
                     case "attname":
                         $option->setFilteredAttributeName($attribute->value);
                         break;
                     case "searchRefiningOptions":
                         $option->setSearchRefiningOption($attribute->value);
                         break;
                     case "discreteVal":
                         $option->setDiscreteValue($attribute->value);
                         break;
                     case "minVal":
                         $option->setRangeValueMin($attribute->value);
                         break;
                     case "maxVal":
                         $option->setRangeValueMax($attribute->value);
                         break;
                 }
             }
             $group = NULL;
             if (!array_key_exists($option->getFilteredAttributeName(), $this->backTrackHashed)) {
                 $group = new CancellableOptionGroup();
                 $group->setFilteredAttributeName($option->getFilteredAttributeName());
                 $resultObj->addCancellableFiltersGroup($group);
                 $this->backTrackHashed[$option->getFilteredAttributeName()] = $group;
             } else {
                 $group = $this->backTrackHashed[$option->getFilteredAttributeName()];
             }
             $group->addFilteringOption($option);
         }
     }
 }