/** * Adds a new triple to the Model without checking, if the statement * is already in the Model. So if you want a duplicate free Model use * the addWithoutDuplicates() function (which is slower then add()) * * @param object Statement $statement * @access public * @throws PhpError */ function add($statement) { parent::add($statement); //Reset the found dead-ends. $this->findDeadEnds = array(); }
/** * Entails every statement and adds the entailments if not already * in the model. * * @access private */ function applyInference() { //check every statement in the model foreach ($this->triples as $statement) { //gat all statements, that it recursively entails foreach ($this->entailStatement($statement) as $statement) { if (!$this->contains($statement)) { parent::add($statement); //add the InfStatement position to the index end($this->triples); $this->infPos[] = key($this->triples); } } } }