dmBridge PHP API
UNLVSpatialQueryTerm.php
00001 <?php
00002 #
00003 # UNLVSpatial: a dmBridge module for spatial content
00004 #
00005 # Copyright © 2009, 2010, 2011 Board of Regents of the Nevada System of Higher
00006 # Education, on behalf of the University of Nevada, Las Vegas
00007 #
00008 
00018 class UNLVSpatialQueryTerm {
00019 
00020    private static $valid_modes = array("within", "intersect", "outside");
00021 
00023    private $spatial_object_example;
00024 
00026    private $matching_mode = "within";
00027 
00031    public static function getValidModes() {
00032       return self::$valid_modes;
00033    }
00034 
00038    public function getMatchingMode() {
00039       return $this->matching_mode;
00040    }
00041 
00046    public function setMatchingMode($mode) {
00047       if (!in_array($mode, self::getValidModes())) {
00048          throw new DMIllegalArgumentException(
00049             sprintf("Matching mode must be one of the following: ",
00050                implode(', ', self::getValidModes())));
00051       }
00052       $this->matching_mode = $mode;
00053    }
00054 
00058    public function getExampleObject() {
00059       return $this->spatial_object_example;
00060    }
00061 
00065    public function setExampleObject(UNLVSpatialRectObject $obj) {
00066       $this->spatial_object_example = $obj;
00067    }
00068 
00072    public function isValid() {
00073       return $this->spatial_object_example->isValid();
00074    }
00075 
00076 }
 All Data Structures Functions Variables