objects_type = 'concepts'; } public function proceed() { global $msg; global $class_path; global $action; global $objs, $caller, $element, $element_name, $order, $callback; global $range; global $param1, $param2; global $item_uri; global $deflt_concept_scheme; global $bt_ajouter; global $nb_per_page_gestion; global $authority_statut; global $pmb_base_url; global $mode; global $element_id; global $att_id_filter; global $concept_scheme; global $deb_rech; global $dyn; global $page; $entity_form = ''; $autoloader = new autoloader(); $autoloader->add_register("onto_class",true); if(!is_array($concept_scheme)){ $concept_scheme = explode(",",$concept_scheme); } global $base_url; $base_url = $this->get_base_url(); $params_array = array( 'base_url' => $base_url, 'categ'=>'concepts', 'sub'=> 'concept', 'objs'=>$objs, 'action' => $action, 'nb_per_page'=> $nb_per_page_gestion, 'id'=>'', 'parent_id'=>'', 'param1'=> $param1, 'param2'=> $param2, 'range'=>$range, 'page' => '1', 'user_input'=>'', 'item_uri' => $item_uri, 'concept_scheme'=>((isset($concept_scheme) && $concept_scheme != '') ? $concept_scheme : ((isset($_SESSION['onto_skos_concept_last_concept_scheme']) && ($_SESSION['onto_skos_concept_last_concept_scheme'] !== "")) ? $_SESSION['onto_skos_concept_last_concept_scheme'] : $deflt_concept_scheme)), 'only_top_concepts' => ((empty($skos_concept_search_form_submitted) && isset($_SESSION['onto_skos_concept_only_top_concepts'])) ? $_SESSION['onto_skos_concept_only_top_concepts'] : 0), 'base_resource'=> "autorites.php", 'element' => $element, 'caller' => $caller, 'deb_rech' => $deb_rech, /* Pour le replace */ 'by' => '', 'dyn' => $dyn, 'link_save' => '', 'authority_statut' => $authority_statut, 'selector_context' => 1, 'type' => '', 'callback' => '', 'return_concept_id' => false, 'mode' => $mode ); if(!isset($element) || $element != 'concept'){ if(empty($action)){ $action = "list_selector"; } $onto_ui = new onto_ui($class_path."/rdf/skos_pmb.rdf", skos_onto::get_store(), "", skos_datastore::get_store(), "", array(), 'http://www.w3.org/2004/02/skos/core#prefLabel', new onto_param($params_array)); $onto_ui->proceed(); }else { switch($action){ case 'simple_search': $entity_form = $this->get_simple_search_form(); break; case 'advanced_search': $entity_form = $this->get_advanced_search_form(); break; case 'add': case 'list': case 'last': case 'search': $onto_ui = new onto_ui($class_path."/rdf/skos_pmb.rdf", skos_onto::get_store(), "", skos_datastore::get_store(), "", array(), 'http://www.w3.org/2004/02/skos/core#prefLabel', new onto_param($params_array)); ob_start(); $onto_ui->proceed(); $display_contents = ob_get_contents(); ob_end_clean(); print encoding_normalize::utf8_normalize($display_contents); break; case 'results_search': ob_start(); print $this->results_search(); $entity_form = ob_get_contents(); ob_end_clean(); break; case 'element_display': global $id_authority, $caller, $element; $id_authority += 0; if($id_authority) { $elements_authorities_selectors_list_ui = new elements_authorities_selectors_list_ui(array($id_authority), 1, 1); $elements = $elements_authorities_selectors_list_ui->get_elements_list(); search_authorities::get_caddie_link(); $entity_form = $elements; } break; case 'update': $onto_ui = new onto_ui($class_path."/rdf/skos_pmb.rdf", skos_onto::get_store(), "", skos_datastore::get_store(), "", array(),'http://www.w3.org/2004/02/skos/core#prefLabel', new onto_param($params_array)); $id = $onto_ui->proceed(); $auth_instance = new authority(0, $id, AUT_TABLE_CONCEPT); $concept_instance = $auth_instance->get_object_instance(); $entity_form = ''; break; case 'authority_searcher': // $entity_form = "
"; //onglets de recherche autorites $searcher_tabs = new searcher_tabs('authorities'); ob_start(); $searcher_tabs->proceed($this->get_current_mode(), '','selector'); $entity_form.= ob_get_contents(); ob_end_clean(); $entity_form.= $this->get_search_tabs(); break; case 'get_composed_concept': if(isset($element_id) && $element_id){ //Identifiant d'autorité passé à l'aiguilleur $concept_id = $this->get_composed_concept($element_id); $concept_to_print = $this->compute_concept_list($concept_id); $elements_authorities_selectors_list_ui = new elements_authorities_selectors_list_ui($concept_to_print, count($concept_id), 1); //Pour l'instant les différents éléments composant l'url sont passés en dur //A voir pour essayer de les passer de façon automatique (modification de la méthode get_base_url) $elements_authorities_selectors_list_ui->set_current_url(static::get_base_url()."&action=get_composed_concept&module=selectors&element_id=".$element_id); $elements = $elements_authorities_selectors_list_ui->get_elements_list(); search_authorities::get_caddie_link(); print $elements; print $elements_authorities_selectors_list_ui->get_elements_list_nav(); } break; case "navigate" : $navigator = new selector_concept_navigator(); print $navigator->proceed(); break; default: print $this->get_js_script(); print $this->get_sub_tabs(); break; } if ($entity_form) { header("Content-Type: text/html; charset=UTF-8"); print encoding_normalize::utf8_normalize($entity_form); } if($action=='selector_save'){ print ''; } } } public static function get_params_url() { global $objs, $element, $unique_scheme, $return_concept_id, $concept_scheme; global $order, $grammar, $perso_id, $custom_prefixe, $perso_name; global $att_id_filter; $params_url = parent::get_params_url(); $params_url .= ($objs ? "&objs=".$objs : ""); $params_url .= ($element ? "&element=".$element : ""); $params_url .= ($unique_scheme ? "&unique_scheme=".$unique_scheme : ""); $params_url .= ($return_concept_id ? "&return_concept_id=".$return_concept_id : ""); $params_url .= ($concept_scheme ? "&concept_scheme=".implode(",",$concept_scheme) : ""); $params_url .= ($order ? "&order=".$order : ""); $params_url .= ($grammar ? "&grammar=".$grammar : ""); $params_url .= ($perso_id ? "&perso_id=".$perso_id : ""); $params_url .= ($custom_prefixe ? "&custom_prefixe=".$custom_prefixe : ""); $params_url .= ($perso_name ? "&perso_name=".$perso_name : ""); $params_url .= ($att_id_filter ? "&att_id_filter=".$att_id_filter : ""); return $params_url; } protected function get_change_link($display_mode) { $link = static::get_base_url(); if($display_mode == 2) { $link .= "&action=edit"; } else { $link .= "&action=selector_add"; } return $link; } protected function get_html_button($location='', $label='') { global $charset; return ""; } protected function get_search_fields_filtered_objects_types() { return array($this->get_objects_type(), "authorities"); } protected function get_searcher_tabs_instance() { if(!isset($this->searcher_tabs_instance)) { $this->searcher_tabs_instance = new searcher_selectors_tabs('authorities'); } return $this->searcher_tabs_instance; } protected function get_search_perso_instance($id=0) { return new search_perso($id, 'AUTHORITIES'); } protected function get_search_instance() { return new search_authorities(true, 'search_fields_authorities'); } protected function get_sub_tabs(){ $current_url = static::get_base_url(); $current_url = str_replace('select.php?', 'ajax.php?module=selectors&', $current_url); $searcher_tab = $this->get_searcher_tabs_instance(); global $concept_scheme; $schemes = ''; if(isset($concept_scheme)){ if(!is_array($concept_scheme) && $concept_scheme != -1){ $schemes = 'conceptSchemes:['.$concept_scheme.'],'; }else { for($i=0 ; $i