Exemplo n.º 1
0
 function setup()
 {
     parent::setup();
     $this->_isPerson = array('type' => 'triple', 'subject' => array('type' => 'variable', 'text' => 'p'), 'predicate' => array('type' => 'literal', 'text' => 'class'), 'object' => array('type' => 'literal', 'text' => 'person'));
     $this->_personBob = array('type' => 'triple', 'subject' => array('type' => 'variable', 'text' => 'p'), 'predicate' => array('type' => 'literal', 'text' => 'name'), 'object' => array('type' => 'literal', 'text' => 'Bob'));
     $this->_personAlice = array('type' => 'triple', 'subject' => array('type' => 'variable', 'text' => 'p'), 'predicate' => array('type' => 'literal', 'text' => 'name'), 'object' => array('type' => 'literal', 'text' => 'Alice'));
     $this->_personCarol = array('type' => 'triple', 'subject' => array('type' => 'variable', 'text' => 'p'), 'predicate' => array('type' => 'literal', 'text' => 'name'), 'object' => array('type' => 'literal', 'text' => 'Carol'));
     $this->_bobUnionAlice = array('type' => 'union', 'lhs' => $this->_personBob, 'rhs' => $this->_personAlice);
     $this->_personRating = array('type' => 'triple', 'subject' => array('type' => 'variable', 'text' => 'p'), 'predicate' => array('type' => 'literal', 'text' => 'is rated'), 'object' => array('type' => 'variable', 'text' => 'rating'));
     $this->_personKnows = array('type' => 'triple', 'subject' => array('type' => 'variable', 'text' => 'p'), 'predicate' => array('type' => 'literal', 'text' => 'knows'), 'object' => array('type' => 'variable', 'text' => 'knows'));
     $this->_personLikes = array('type' => 'triple', 'subject' => array('type' => 'variable', 'text' => 'p'), 'predicate' => array('type' => 'literal', 'text' => 'likes'), 'object' => array('type' => 'variable', 'text' => 'likes'));
     $this->_ratingMinusCarol = array('type' => 'minus', 'lhs' => $this->_personRating, 'rhs' => $this->_personCarol);
     $this->_knowsOptionalLikes = array('type' => 'optional', 'lhs' => $this->_personKnows, 'rhs' => $this->_personLikes);
 }
Exemplo n.º 2
0
 function setup()
 {
     parent::setup();
 }