} $array_selector[$row->id_entite . ',' . $idAdresse . ',' . $adresse] = htmlentities($row->raison_sociale, ENT_QUOTES, $charset); } $origine = "ARRAY"; break; case 'onto': if (!is_object($autoloader)) { require_once $class_path . "/autoloader.class.php"; $autoloader = new autoloader(); } $autoloader->add_register("onto_class", true); $onto_store_config = array('db_name' => DATA_BASE, 'db_user' => USER_NAME, 'db_pwd' => USER_PASS, 'db_host' => SQL_SERVER, 'store_name' => 'ontology', 'max_errors' => 100, 'store_strip_mb_comp_str' => 0); $data_store_config = array('db_name' => DATA_BASE, 'db_user' => USER_NAME, 'db_pwd' => USER_PASS, 'db_host' => SQL_SERVER, 'store_name' => 'rdfstore', 'max_errors' => 100, 'store_strip_mb_comp_str' => 0); $tab_namespaces = array("skos" => "http://www.w3.org/2004/02/skos/core#", "dc" => "http://purl.org/dc/elements/1.1", "dct" => "http://purl.org/dc/terms/", "owl" => "http://www.w3.org/2002/07/owl#", "rdf" => "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs" => "http://www.w3.org/2000/01/rdf-schema#", "xsd" => "http://www.w3.org/2001/XMLSchema#", "pmb" => "http://www.pmbservices.fr/ontology#"); $params = new onto_param(array('autexclude' => "", 'linkfield' => "", 'autfield' => "", 'typdoc' => "", 'att_id_filter' => "", 'listfield' => "", 'callback' => "", 'datas' => "", 'action' => 'ajax_selector')); $onto_ui = new onto_ui($class_path . "/rdf/skos_pmb.rdf", "arc2", $onto_store_config, "arc2", $data_store_config, $tab_namespaces, 'http://www.w3.org/2004/02/skos/core#prefLabel', $params); $list_results = $onto_ui->proceed(); $array_prefix = $list_results['prefix']; $array_selector = $list_results['elements']; $origine = 'ONTO_ARRAY'; break; case 'instruments': // $param1 : id du pupitre préféré. si 0 on retourne tous les instruments // $param2 = 0: Instruments du pupitre préféré seulement // $param2 = 1: Instruments du pupitre préféré en premier, puis les autres if ($autexclude) { $restrict = " AND id_instrument not in ({$autexclude}) "; } if (strlen($start) == $pos_cursor) { $liste_mots = explode("/", $start); $start = array_pop($liste_mots);
die("no access"); } /* $caller = Nom du formulaire appelant * $objs = type d'objet demandé * $element = id de l'element à modifier * $order = numéro du champ à modifier * $range = id du range à afficher * $deb_rech = texte à rechercher */ if (!isset($range)) { $range = 0; } if (!isset($page)) { $page = 1; } if ($parent_id) { $deb_rech = ""; } $base_url = "./select.php?what=ontology&caller=" . rawurlencode($caller) . "&objs={$objs}&element={$element}&order={$order}&infield={$infield}&callback={$callback}&dyn={$dyn}&deb_rech={$deb_rech}¶m1={$param1}¶m2={$param2}"; // contenu popup selection require './selectors/templates/sel_ontology.tpl.php'; require_once $class_path . "/autoloader.class.php"; $autoloader = new autoloader(); $autoloader->add_register("onto_class", true); $onto_store_config = array('db_name' => DATA_BASE, 'db_user' => USER_NAME, 'db_pwd' => USER_PASS, 'db_host' => SQL_SERVER, 'store_name' => 'ontology', 'max_errors' => 100, 'store_strip_mb_comp_str' => 0); $data_store_config = array('db_name' => DATA_BASE, 'db_user' => USER_NAME, 'db_pwd' => USER_PASS, 'db_host' => SQL_SERVER, 'store_name' => 'rdfstore', 'max_errors' => 100, 'store_strip_mb_comp_str' => 0); $tab_namespaces = array("skos" => "http://www.w3.org/2004/02/skos/core#", "dc" => "http://purl.org/dc/elements/1.1", "dct" => "http://purl.org/dc/terms/", "owl" => "http://www.w3.org/2002/07/owl#", "rdf" => "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs" => "http://www.w3.org/2000/01/rdf-schema#", "xsd" => "http://www.w3.org/2001/XMLSchema#", "pmb" => "http://www.pmbservices.fr/ontology#"); $params = new onto_param(array('categ' => '', 'sub' => '', 'objs' => $objs, 'action' => 'list_selector', 'page' => '1', 'nb_per_page' => '20', 'caller' => $caller, 'element' => $element, 'order' => $order, 'callback' => $callback, 'base_url' => $base_url, 'deb_rech' => $deb_rech, 'range' => $range, 'parent_id' => '', 'param1' => $param1, 'param2' => $param2, 'item_uri' => $item_uri, 'concept_scheme' => $deflt_concept_scheme, 'only_top_concepts' => '0')); $onto_ui = new onto_ui($class_path . "/rdf/skos_pmb.rdf", "arc2", $onto_store_config, "arc2", $data_store_config, $tab_namespaces, 'http://www.w3.org/2004/02/skos/core#prefLabel', $params); $onto_ui->proceed(); //
public function exec_data_framework($params = array()) { if (!$params) { $params = new onto_param(array('categ' => '', 'sub' => '', 'action' => '', 'page' => '1', 'nb_per_page' => '20', 'id' => '', 'parent_id' => '', 'user_input' => '', 'ontology_id' => $this->id, 'item_uri' => "", 'base_resource' => "semantic.php?ontology_id=" . $this->id)); } $onto_ui = new onto_ui(null, "arc2", $this->ontostore_params, "arc2", $this->datastore_params, $this->namespaces, 'http://www.w3.org/2000/01/rdf-schema#label', $params); $onto_ui->proceed(); }