* @copyright 2010 Tela-Botanica * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL * @version SVN: * @link /doc/jrest/ */ /** * * in : utf8 * out : utf8 * * NameSearch.php * * Cas d'utilisation : * Service completion nom scientifique * * 1 : L'application recoit un debut de nom scientifique ainsi qu'un code de référentiel * 2 : Si le genre recu est >1, l'application retourne les 50 premieres genre commencant par ce prefixe * 3 : Si l'espece est presente l'application retourne les 50 premieres genre+espece commencant par ce prefixe */ class NameSearch extends Cel { public function getRessource(){ //TODO: description du service à renvoyer print "[]"; return; } public function getElement($uid){ $liste_genre_espece = array(); $referentiel = null; $genre = null; $espece = null; if(isset($uid[0])) { $referentiel = $uid[0]; } if(isset($uid[1])) { $genre = $uid[1]; } if(isset($uid[2])) { $espece = $uid[2]; } $chercheur_infos_taxon = new RechercheInfosTaxonBeta($this->config, $referentiel); $liste_genre_espece = $chercheur_infos_taxon->rechercherGenreEspeceSurPrefixe($genre,$espece); $this->envoyerJson($liste_genre_espece); return true; } } /* +--Fin du code ---------------------------------------------------------------------------------------+ * $Log$ * Revision 1.6 2008-01-30 08:57:28 ddelon * fin mise en place mygwt * * Revision 1.5 2007-05-21 18:13:30 ddelon * Refactoring et documentation * * */ ?>