Example #1
0
 /**
  * Removes the triple from the MemModel. 
  * TRUE if the triple is removed.
  * FALSE otherwise.
  *
  * Checks, if it touches any statements, that added inference rules 
  * to the model.
  *
  * @param	object Statement	$statement
  * @return   boolean
  * @access	public
  * @throws	PhpError
  */
 function remove($statement)
 {
     if (parent::contains($statement)) {
         if (in_array($statement->getLabelPredicate(), $this->supportedInference)) {
         }
         while (count($this->_removeFromInference($statement)) > 0) {
         }
         $this->findDeadEnds = array();
         return parent::remove($statement);
     } else {
         return false;
     }
 }
Example #2
0
 /** 
  * Adds another model to this MemModel.
  * Duplicate statements are not removed. 
  * If you don't want duplicates, use unite().
  * If any statement of the model to be added to this model contains a blankNode 
  * with an identifier already existing in this model, a new blankNode is generated.
  *
  * @param	object Model	$model 
  * @access	public
  * @throws phpErrpr
  *
  */
 function addModel(&$model)
 {
     //Disable entailing to increase performance
     $this->inferenceEnabled = false;
     parent::addModel($model);
     //Enable entailing
     $this->inferenceEnabled = true;
     //Entail all statements
     $this->applyInference();
 }