Exemplo n.º 1
0
 /**
  * It creates AsociationRule based on the parameters
  *
  * @param <DomNode> $asociationRuleNode Node representing one rule
  * @param <DomDocument> $domER DomDocument representing XML containing rules
  */
 function __construct($asociationRuleNode, $domER)
 {
     $this->antecedent = Utils::getAttribute($asociationRuleNode, "antecedent");
     $this->consequent = Utils::getAttribute($asociationRuleNode, "consequent");
     $this->interestMeasures = array();
     $elements = $asociationRuleNode->childNodes;
     foreach ($elements as $element) {
         if ($element->nodeName == "IMValue") {
             $this->interestMeasures[] = Utils::getAttribute($element, "name");
         }
     }
     $this->elements = array();
     $elements = $domER->getElementsByTagName('BBA');
     foreach ($elements as $element) {
         $bba = new BBA($element, $this->elements);
         $this->elements[$bba->getId()] = $bba;
     }
     $elements = $domER->getElementsByTagName('DBA');
     foreach ($elements as $element) {
         $dba = new DBA($element, $this->elements);
         $this->elements[$dba->getId()] = $dba;
     }
 }