get_properties(); $this->get_restrictions(); $this->get_properties_and_restrictions_from_sub_class_of(); } // end of member function __construct /** * Retourne la liste des URI de propriétés liées à la classe * * @return array() * @access public */ public function get_properties( ) { $properties = $this->ontology->get_class_properties($this->uri); foreach($properties as $property_uri){ $this->set_property($this->get_property($property_uri)); } return $properties; } // end of member function get_properties /** * Retourne une instance de la propriété * * @param string uri_property uri de la propriété * @return onto_common_property * @access public */ public function get_property( $uri_property ) { return $this->ontology->get_property($this->uri,$uri_property); } // end of member function get_property /** * * * @param onto_common_property property objet représentant une propriété * @return void * @access public */ public function set_property( $property ) { $this->properties[$property->uri] = $property; } // end of member function set_property public function set_pmb_name($pmb_name){ $this->pmb_name = $pmb_name; } protected function fetch_label(){ $this->label = $this->ontology->get_class_label($this->uri); } public function get_restrictions(){ if (is_array($this->properties)) { foreach($this->properties as $property){ $this->onto_restrictions[$property->uri] = $this->ontology->get_restriction($this->uri,$property->uri); } } } public function get_property_range($uri_property) { $range = array(); if (isset($this->properties[$uri_property])) { $range = $this->properties[$uri_property]->range; } return $range; } public function get_property_pmb_datatype($uri_property) { $pmb_datatype = $this->properties[$uri_property]->pmb_datatype; return $pmb_datatype; } /** * * * @param string uri_property URI d'une propriété * @return onto_restriction * @access public */ public function get_restriction($uri_property){ return $this->onto_restrictions[$uri_property]; } public function get_base_uri(){ global $opac_url_base; return $opac_url_base."/".$this->pmb_name."#"; } /** * */ public function get_sub_class_of() { if (!isset($this->sub_class_of)) { $this->sub_class_of = $this->ontology->get_sub_class_of($this->uri); } return $this->sub_class_of; } public function get_properties_and_restrictions_from_sub_class_of() { $properties = array(); foreach ($this->get_sub_class_of() as $sub_class_of) { $properties = $this->ontology->get_class_properties($sub_class_of); foreach($properties as $property_uri){ $this->set_property($this->get_property($property_uri)); $this->onto_restrictions[$property_uri] = $this->ontology->get_restriction($sub_class_of,$property_uri); } } return $properties; } } // end of onto_common_class;