Source for file Constraint.php

Documentation is available at Constraint.php

  1. <?php
  2. require_once RDFAPI_INCLUDE_DIR 'util/Object.php';
  3. // ---------------------------------------------
  4. // class: Constraint.php
  5. // ---------------------------------------------
  6.  
  7.  
  8. /**
  9. * Represents a constraint. A value constraint is a boolean- valued expression
  10. * of variables and RDF Terms.
  11. *
  12. @author   Tobias Gauss <tobias.gauss@web.de>
  13. @version     $Id: fsource_sparql__sparqlConstraint.php.html 443 2007-06-01 16:25:38Z cax $
  14. *
  15. @package sparql
  16. */
  17. Class Constraint extends Object{
  18.  
  19.     /**
  20.     * The expression string.
  21.     * @var string 
  22.     */
  23.     protected $expression;
  24.  
  25.     /**
  26.     *  True if it is an outer filter, false if not.
  27.     * @var boolean 
  28.     */
  29.     protected $outer;
  30.  
  31.     /**
  32.     *   The expression tree
  33.     *   @var array 
  34.     */
  35.     protected $tree = null;
  36.  
  37.     /**
  38.     * Adds an expression string.
  39.     *
  40.     * @param  String $exp the expression String
  41.     * @return void 
  42.     */
  43.     public function addExpression($exp)
  44.     {
  45.         $this->expression = $exp;
  46.     }
  47.  
  48.     /**
  49.     * Returns the expression string.
  50.     *
  51.     * @return String  the expression String
  52.     */
  53.     public function getExpression()
  54.     {
  55.         return $this->expression;
  56.     }
  57.  
  58.  
  59.     /**
  60.     * Sets the filter type to outer or inner filter.
  61.     * True for outer false for inner.
  62.     *
  63.     * @param  boolean $boolean 
  64.     * @return void 
  65.     */
  66.     public function setOuterFilter($boolean)
  67.     {
  68.         $this->outer = $boolean;
  69.     }
  70.  
  71.     /**
  72.     * Returns true if this constraint is an outer filter- false if not.
  73.     *
  74.     * @return boolean 
  75.     */
  76.     public function isOuterFilter()
  77.     {
  78.         return $this->outer;
  79.     }
  80.  
  81.  
  82.     public function getTree()
  83.     {
  84.         return $this->tree;
  85.     }//public function getTree()
  86.  
  87.     public function setTree($tree)
  88.     {
  89.         $this->tree = $tree;
  90.     }//public function setTree($tree)
  91.  
  92. }
  93. // end class: Constraint.php
  94. ?>

Documentation generated on Fri, 1 Jun 2007 16:48:38 +0200 by phpDocumentor 1.3.2