Lines Matching defs:subject

119     function removeTriples($subject=null, $predicate=null, $object=null, $graph=null) {
122 foreach(array('subject','predicate','object','graph') as $param) {
149 function fetchTriples($subject=null, $predicate=null, $object=null, $graph=null) {
154 foreach(array('subject','predicate','object','graph') as $param) {
176 $sql = "SELECT subject, predicate, object, graph FROM ".self::$readable." WHERE ". implode(" AND ", $filters).$scopeRestriction;
199 * @param subject string
205 function addTriple($subject, $predicate, $object, $graph) {
206 return $this->addTriples(array(array('subject'=>$subject, 'predicate'=>$predicate, 'object'=>$object)), $graph);
211 * @param triples array contains all triples as arrays with subject, predicate and object keys
217 $sql = "INSERT INTO ".self::$writable."(subject, predicate, object, graph) VALUES(?, ?, ?, ?)";
225 $values = array($t['subject'],$t['predicate'],$t['object'],$graph);
293 // resource-centric view by fetching all triples related to a single subject
294 // (each subject is in a single continuous block, due to the ordering)
302 'subject'=>array('type'=>'variable','text'=>$query['projection'][0]),
429 // the subject is a literal
430 if($tp['subject']['type'] == 'literal') {
432 $conditions[] = $this->_ci('subject').' = '.$this->_ci(':'.$id);
433 $this->literals[$id] = $tp['subject']['text'];
450 // subject equals predicate
451 if($this->_patternEquals($tp['subject'],$tp['predicate'])) {
452 $conditions[] = $this->_ci('subject').' = '.$this->_ci('predicate');
455 // subject equals object
456 if($this->_patternEquals($tp['subject'],$tp['object'])) {
457 $conditions[] = $this->_ci('subject').' = '.$this->_ci('object');
478 // always project the subject
479 $list[] = 'subject AS '.$this->_name($tp['subject']);
481 // project the predicate if it's different from the subject
482 if(!$this->_patternEquals($tp['subject'], $tp['predicate'])) {
486 // project the object if it's different from the subject and different from the predicate
487 if(!$this->_patternEquals($tp['subject'], $tp['object']) && !$this->_patternEquals($tp['predicate'],$tp['object'])) {
501 // the subject is a variable
502 if($tp['subject']['type'] == 'variable') {
503 $terms[] = $this->_name($tp['subject']);
947 $this->subject = null;
961 return $this->subject;
973 // construct a new subject
975 $this->subject = $peekRow[$this->__subject][0];
977 // continue aggregating data as long as the subject doesn't change and
979 while($this->data->valid() && $peekRow[$this->__subject][0] == $this->subject) {
1024 $this->subject = 0;
1039 return $this->subject;
1063 // construct a new subject
1064 $this->subject++;
1067 // continue aggregating data as long as the subject doesn't change and