Lines Matching defs:tp
426 function _genCond($tp) {
430 if($tp['subject']['type'] == 'literal') {
433 $this->literals[$id] = $tp['subject']['text'];
437 if($tp['predicate']['type'] == 'literal') {
440 $this->literals[$id] = $tp['predicate']['text'];
444 if($tp['object']['type'] == 'literal') {
447 $this->literals[$id] = $tp['object']['text'];
451 if($this->_patternEquals($tp['subject'],$tp['predicate'])) {
456 if($this->_patternEquals($tp['subject'],$tp['object'])) {
461 if($this->_patternEquals($tp['predicate'],$tp['object'])) {
475 function _genPR($tp) {
479 $list[] = 'subject AS '.$this->_name($tp['subject']);
482 if(!$this->_patternEquals($tp['subject'], $tp['predicate'])) {
483 $list[] = 'predicate AS '.$this->_name($tp['predicate']);
487 if(!$this->_patternEquals($tp['subject'], $tp['object']) && !$this->_patternEquals($tp['predicate'],$tp['object'])) {
488 $list[] = 'object AS '.$this->_name($tp['object']);
497 function _trans_tp($tp) {
502 if($tp['subject']['type'] == 'variable') {
503 $terms[] = $this->_name($tp['subject']);
507 if($tp['predicate']['type'] == 'variable') {
508 $terms[] = $this->_name($tp['predicate']);
512 if($tp['object']['type'] == 'variable') {
513 $terms[] = $this->_name($tp['object']);
518 'sql'=>'SELECT '.$this->_genPR($tp).' FROM '.helper_plugin_strata_triples::$readable.' WHERE '.$this->_genCond($tp).$scopeRestriction,