public function addLink($predicate, Erfurt_Sparql_Query2_Abstraction_ClassNode $target) { if (is_string($predicate)) { $predicate = new Erfurt_Sparql_Query2_IriRef($predicate); } if (!$predicate instanceof Erfurt_Sparql_Query2_IriRef) { throw new RuntimeException('Argument 1 passed to Erfurt_Sparql_Query2_Abstraction_ClassNode::addFilter must be an instance of Erfurt_Sparql_Query2_IriRef instance of ' . typeHelper($predicate) . ' given'); } $this->outgoinglinks[] = new Erfurt_Sparql_Query2_Abstraction_Link($predicate, $target); $this->query->getWhere()->addElement(new Erfurt_Sparql_Query2_Triple($this->classVar, $predicate, new Erfurt_Sparql_Query2_Var($target->getClass()->getIri()))); return $this; //for chaining }