public function parseRules()
 {
     $rules = array();
     $CP = new ConnectiveParser($this->ER, $this->XPath);
     $BBAP = new BBAParser($this->ER, $this->XPath);
     $BBAP->parseBBAs();
     $DBAP = new DBAParser($this->ER, $this->XPath, $CP);
     $DBAP->parseDBAs();
     $TSR = @new TaskSettingRule($this->XPath->evaluate('//TaskSetting')->item(0), $this->ER, $this->attributes, $this->interestMeasures, $DBAP, $BBAP);
     // performance and legacy reasons
     try {
         $TSR->parse($DBAP, $BBAP);
         array_push($rules, $TSR);
     } catch (InvalidRuleException $e) {
     }
     return $rules;
 }
 public function parseRules()
 {
     $rules = array();
     $CP = new ConnectiveParser($this->ER, $this->XPath);
     $BBAP = new BBAParser($this->ER, $this->XPath);
     $BBAP->parseBBAs();
     $DBAP = new DBAParser($this->ER, $this->XPath, $CP);
     $DBAP->parseDBAs();
     $ARQR = @new ARQueryRule($this->XPath->evaluate('//ARQuery')->item(0), $this->ER, $this->attributes, $this->interestMeasures, $DBAP, $BBAP);
     // arrays are passed by reference for performance and legacy reasons
     try {
         $ARQR->parse($DBAP, $BBAP);
         array_push($rules, $ARQR);
     } catch (InvalidRuleException $e) {
     }
     return $rules;
 }
 public function parseRules()
 {
     $rules = array();
     $CP = new ConnectiveParser($this->ER, $this->XPath);
     $BBAP = new BBAParser($this->ER, $this->XPath);
     $BBAP->parseBBAs();
     $DBAP = new DBAParser($this->ER, $this->XPath, $CP);
     $DBAP->parseDBAs();
     foreach ($this->XPath->evaluate('//AssociationRule') as $iAR) {
         $AR = new AssociationRule($iAR, $this->ER, $this->attributes, $this->interestMeasures, $DBAP, $BBAP);
         try {
             $AR->parse($DBAP, $BBAP);
             array_push($rules, $AR);
         } catch (InvalidRuleException $e) {
         }
     }
     return $rules;
 }
Ejemplo n.º 4
0
 public function testParseBBAs()
 {
     $BBAP = new BBAParser($this->ER, $this->XPath);
     $this->assertEquals(140, $BBAP->parseBBAs());
 }