user_query = $user_query; $this->object_key = "uri_id"; $this->object_fields_table = "onto_uri"; } public function _get_search_type(){ return parent::_get_search_type()."_concepts"; } public function get_full_query(){ $query = ""; if (is_numeric($this->user_query)) { $uri = onto_common_uri::get_uri($this->user_query); $broad_paths = skos_concept::get_broad_paths($uri); $narrow_paths = skos_concept::get_narrow_paths($uri); $ids = $this->user_query; //broad foreach ($broad_paths as $broad_path) { $broad_path = substr($broad_path,0, -1); $ids.= ','.str_replace('/', ',', $broad_path); } //narrow foreach ($narrow_paths as $narrow_path) { $narrow_path = substr($narrow_path,0,-1); $ids.= ','; $ids.= str_replace('/', ',', $narrow_path); } $query = " SELECT DISTINCT id_authority FROM authorities WHERE authorities.num_object IN (".$ids.") AND type_object = 10"; } return $query; } }